Waleed Seada
Top achievements
Rank 2
Waleed Seada
asked on 03 Jan 2010, 08:27 AM
Dear all,
I have a grid with TemplateItem contains table (without border set) with asp:textboxes to display data.
Q1: how do I remove the grid normal columns header (inside the red box in the attached image)?
Q2: the table is displaying a left and bottom lines around the controls, how can I remove them ?
I checked that the RadFormDecorator doesn't cause this ...
Thanks and best regards
Waleed
I have a grid with TemplateItem contains table (without border set) with asp:textboxes to display data.
Q1: how do I remove the grid normal columns header (inside the red box in the attached image)?
Q2: the table is displaying a left and bottom lines around the controls, how can I remove them ?
I checked that the RadFormDecorator doesn't cause this ...
Thanks and best regards
Waleed
4 Answers, 1 is accepted
0
Accepted
Princy
Top achievements
Rank 2
answered on 04 Jan 2010, 10:28 AM
Hello Waleed,
You can hide the headers for the grid in its ItemDataBound event as shown below:
c#:
Happy New Year!
Princy
You can hide the headers for the grid in its ItemDataBound event as shown below:
c#:
protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e) |
{ |
if (e.Item is GridHeaderItem) |
{ |
GridHeaderItem header = (GridHeaderItem)e.Item; |
header.Display = false; |
} |
} |
Happy New Year!
Princy
0
Waleed Seada
Top achievements
Rank 2
answered on 05 Jan 2010, 05:45 AM
Hello Princy,
Thanks, that's solve the first question.
What about the thin border around the controls inside the table, I didn't express this behavior outside the template column.
maybe it's the reason.
I want to remove that border !!
Thanks and Happy new year !!
Waleed
Thanks, that's solve the first question.
What about the thin border around the controls inside the table, I didn't express this behavior outside the template column.
maybe it's the reason.
I want to remove that border !!
Thanks and Happy new year !!
Waleed
0
Princy
Top achievements
Rank 2
answered on 06 Jan 2010, 03:26 PM
Hello Waleed,
The table cells inside your template column may inherit border styles from RadGrid. Try adding the following CSS style to get over this:
css:
or try using the ItemStyle-CssClass for the TemplateColumn as shown below:
aspx:
css:
Thanks
Princy.
The table cells inside your template column may inherit border styles from RadGrid. Try adding the following CSS style to get over this:
css:
.GridRow_[SkinName] td td, |
.GridAltRow_[SkinName] td td |
{ |
border: 0; |
} |
or try using the ItemStyle-CssClass for the TemplateColumn as shown below:
aspx:
<telerik:GridTemplateColumn UniqueName="TemplateColumn"> |
<ItemStyle CssClass="Item" /> |
css:
.Item table td |
{ |
border: 0; |
} |
Thanks
Princy.
0
Waleed Seada
Top achievements
Rank 2
answered on 07 Jan 2010, 03:56 PM
Hello Princy,
I followed the second approach
It isn't working for me, I don't know maybe I have something in-proper in my template item, look at my script:
this is part of it only, as you can see here I have a radDock with radGrid inside, I put the ItemStyle before the ItemTemplate as you can see.
Best regards
Waleed
I followed the second approach
It isn't working for me, I don't know maybe I have something in-proper in my template item, look at my script:
<ContentTemplate> |
<telerik:RadGrid |
ID="UserDetailsGrid" |
runat="server" |
AllowSorting="true" |
AllowPaging="true" |
PageSize="5" |
OnNeedDataSource="UserDetailsGrid_NeedDataSource" |
OnItemDataBound="UserDetailsGrid_ItemDataBound"> |
<MasterTableView Width="100%"> |
<ItemStyle CssClass="Item" /> |
<ItemTemplate> |
<table id="parentTable" border="0" cellpadding="5"> |
<tr> |
Best regards
Waleed