dynamic gridview select

dynamic gridview select

am 23.01.2008 16:24:00 von 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

RE: dynamic gridview select

am 23.01.2008 16:26:04 von rodchar

oh, here's my stylesheet too:

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

..gvSelect a:hover
{
color: White;
background-color: #ff3300;
}

"rodchar" wrote:

> 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

RE: dynamic gridview select

am 23.01.2008 21:27:01 von Manish

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

"rodchar" wrote:

> 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

RE: dynamic gridview select

am 24.01.2008 02:20:00 von rodchar

Thank you for the help.
rod.

"Manish" wrote:

>
> 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
>
> "rodchar" wrote:
>
> > 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