dynamic gridview select

  • Thread starter Thread starter rodchar
  • Start date Start date
R

rodchar

hey all,

// Show the Select Button
CommandField selectcol = new CommandField();
selectcol.ShowSelectButton = true;
selectcol.ItemStyle.CssClass = "gvSelect";
selectcol.ControlStyle.CssClass = "gvSelect";
GridView1.Columns.Add(selectcol);

I added the following snippet to my code-behind and I'm trying to get the
Select Button's font to be white and it's not working for some reason. I have
other css attributes working on the select button like the
text-decoration:none is working. can someone please explain possible issues?

thanks,
rodchar
 
oh, here's my stylesheet too:

body
{
}
..gvSelect a
{
color: White;
text-decoration: none;
}

..gvSelect a:hover
{
color: White;
background-color: #ff3300;
}
 
I tried the following code to set the ForeColor for the Select Column to
white in the Gridview control and it works fine.

Dim col As CommandField = New CommandField()
col.ShowSelectButton = True
col.ItemStyle.BackColor = color.red
col.ItemStyle.ForeColor = Color.White
Me.GridView1.Columns.Add(col)

Regards,
Manish
www.componentOne.com
 
Thank you for the help.
rod.

Manish said:
I tried the following code to set the ForeColor for the Select Column to
white in the Gridview control and it works fine.

Dim col As CommandField = New CommandField()
col.ShowSelectButton = True
col.ItemStyle.BackColor = color.red
col.ItemStyle.ForeColor = Color.White
Me.GridView1.Columns.Add(col)

Regards,
Manish
www.componentOne.com
 
Back
Top