Could someone tell me how to put some html into RadGrid footer? I need to put it not into column footer, but to one for entire grid.
<telerik:RadGrid ID="radGrid" ShowFooter="true" runat="server" AutoGenerateColumns="false">
<MasterTableView>
<Columns>
<telerik:GridBoundColumn DataField="Name" HeaderText="Name">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Position" HeaderText="Position">
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
<FooterStyle BorderWidth="10px" BorderColor="Red" />
</telerik:RadGrid>
There is no <FooterTemplate> tag for "global" footer, so maybe somebody knows the elegant way to do it?
Yeah, I didn't see that as an option. The only thing I can think of, which I haven't verified, is:
Try to set a column span on the first column's cell; the RadGrid is essentially a table-based structure, and on itemcreated or itemdatabound, when the row type is a footer, you could try setting the column span on that cell.
You could try hiding the default footer, and put your own DIV at the bottom of the grid, with your additional contents. You should be able to place a DIV right against the bottom of the grid.
Related
I am working with text in C#. my problem is with big texts. In a big text I have a space at top and bottom of it.
How can I clear this space via CSS?
<asp:Label ID="Label16" runat="server" Text='<%# Eval("Home_Club_Goal") %>' Font-Bold="true" Font-Size="200px" />
Try to use "line-height" property.
http://www.w3schools.com/cssref/tryit.asp?filename=trycss_line-height
I am using DataList control in ASP.net application. I have set
DataList1.RepeatColumns = 3;
DataList1.RepeatDirection = RepeatDirection.Horizontal;
properties of DataList. When item count is more than 3 it shows up properly. However if it is less than 3 it distorts and occupies whole space.
e.g. if there is only 1 item, it takes complete width and distorts UI.
if $$$ is one item, for 3 it shows like,
$$$|$$$|$$$
for one item it shows like
$$$$$$$$$$$
and UI disturbs completely.
Is there any way to format display in proper manner?
As lcarus mentionned, try setting ItemStyle-Width property. Here is a snippet which worked for me:
<asp:DataList ID="myDataList" runat="server" RepeatColumns="3" HorizontalAlign="Center" RepeatLayout="Table" RepeatDirection="Horizontal">
<ItemStyle Width="33%" />
<ItemTemplate>
<your code here>
</ItemTemplate>
</asp:DataList>
When requiring 3 columns, set the column width to 33%.
Try setting the ItemStyle-Width property to the desired width. I would expect it to set the width of each item to the exact size you set it to: Here's a link to MSDN documentation: http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.datalist.itemstyle.aspx
I have the following problem: on runtime I am changing the name of the columns caption (the grid is linked to a table and I don't want the user to see their original name). However I have one header caption which is too long - "Total Number of votes" which actually represents an integer not bigger than 4 digits. My question is how I can fix the header caption width ... in my case I want it to appear on two lines?
If you want column caption to wrap set column HeaderStyle.Wrap to True.
<dxg:ASPxGridView runat="server">
<Columns>
<dxg:GridViewDataColumn FieldName="Test" VisibleIndex="1" >
<HeaderStyle Wrap="True"/>
</dxg:GridViewDataColumn>
</Columns>
</dxg:ASPxGridView>
you can add property ItemStyle-Width="your value"
Example for bound field
<asp:BoundField DataField="" HeaderText="" ItemStyle-Width="150"/>
I have a GridView with an ImageField and a ButtonField in it.
The Image is large .. but i want it to be displayed in a smaller size in the grid.. so I'm looking for a way to fix the cell size of my GridView.
How can I do this?
I had the same problem; solved it this way:
<asp:ButtonField ButtonType="Image" CommandName="EliminarFuente" HeaderText="Eliminar" ImageUrl="~/Themes/Images/Delete.png" >
<ControlStyle CssClass="BotonDeImagen"/>
<ItemStyle HorizontalAlign="Center" />
</asp:ButtonField>
The CSS class is like this:
.BotonDeImagen
{
width:25px;
height:25px;
}
and the result is a centered image of 25*25 pixels.
Alternative solution:
You could define height and width on the ControlStyle tag, instead of using a CSS class.
You can make set HighQualityBicubic InterpolationMode when you do the BinaryWrite
Checkout this example code.
Try using these two properties on your ImageField.
ItemStyle-Width=""
ItemStyle-Height=""
Explicity set the height and width of the image. Use CSS to control the size of the rendered tags.
i want to disable Footer gridlines in gridview.How can we do this
use <FooterStyle CssClass="FooterStyle" /> on your grid view and add .FooterStyle{border:0;} in your css