Last post Aug 12, 2008 02:57 PM by denniscy
Member
68 Points
210 Posts
Aug 10, 2008 04:38 PM|denniscy|LINK
Hi,
I am using css-friendly control adapters and have a gridview where I would like to style the
selected rows using css.
I tried
{
}
Where, in the Gridview, the CssClasses are set as
SelectedRowStyle-CssClass
--------------
I would be glad if someone could help me in styling selected rows.
Thanks.
Contributor
2450 Points
467 Posts
Aug 10, 2008 05:23 PM|Danish Ali|LINK
<
For example;
Regards,
Danish
GridView Selected Row Style
Aug 10, 2008 05:25 PM|Danish Ali|LINK
hi,
you can also use it as follows.
<SelectedRowStyle cssClass="test" />
Aug 11, 2008 04:29 AM|denniscy|LINK
Hi Danish,
Thanks for the reply. Setting the style at the markup of gridview doesnt work because I am using css friendly control adapters I think.
As for the class, I have already put a class name for the SelectedRowStyle but could not manage to make that work.
SelectedRowStyle-CssClass="SelectedRow" CssClass="GridView"
.AspNet-GridView .GridView .AspNet-GridView-Selected SelectedRow .td(and without td)
Aug 12, 2008 02:57 PM|denniscy|LINK
Member
68 Points
210 Posts
GridView Selected Row
Aug 10, 2008 04:38 PM|denniscy|LINK
Hi,
I am using css-friendly control adapters and have a gridview where I would like to style the
selected rows using css.
I tried
.AspNet-GridView .GridView .AspNet-GridView-Selected SelectedRow .td(and without td){
color:Green;background:Yellow;}
Where, in the Gridview, the CssClasses are set as
SelectedRowStyle-CssClass
="SelectedRow" CssClass="GridView"--------------
I would be glad if someone could help me in styling selected rows.
Thanks.
Contributor
2450 Points
467 Posts
Re: GridView Selected Row
Aug 10, 2008 05:23 PM|Danish Ali|LINK
Hi,
Use the following in the girdview markup to set the selected row style.<
SelectedRowStyle BackColor="Red" />For example;
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="testid"><Columns>
<asp:BoundField DataField="testid" HeaderText="testid" InsertVisible="False" ReadOnly="True" SortExpression="testid" />
</Columns>
<SelectedRowStyle BackColor="Red" />
</asp:GridView> Hope, it will help.
Regards,
Danish
GridView Selected Row Style
Contributor
2450 Points
467 Posts
Re: GridView Selected Row
Aug 10, 2008 05:25 PM|Danish Ali|LINK
hi,
you can also use it as follows.
<SelectedRowStyle cssClass="test" />
Regards,
Danish
Member
68 Points
210 Posts
Re: GridView Selected Row
Aug 11, 2008 04:29 AM|denniscy|LINK
Hi Danish,
Thanks for the reply. Setting the style at the markup of gridview doesnt work because I am using css friendly control adapters I think.
As for the class, I have already put a class name for the SelectedRowStyle but could not manage to make that work.
SelectedRowStyle-CssClass="SelectedRow" CssClass="GridView"
.AspNet-GridView .GridView .AspNet-GridView-Selected SelectedRow .td(and without td)
{
color:Green;background:Yellow;}
Member
68 Points
210 Posts
Re: GridView Selected Row
Aug 12, 2008 02:57 PM|denniscy|LINK
{
background:Yellow;}