Wednesday, March 28, 2012

web control Datagrid

Hi all,
how to get a check box in the first column of the data grid as it only
shows a:link and a button type control to be inserted.
Please helpPut in a template column of type <asp:CheckBox id="myCheck"> in the aspx. Or
you can do this programatically before binding (which i prefer)
Then reference it via e.Items.FindControl["myCheck"] and assign that to a
casted checkbox variable. I am assuming you will run this code in the
binding event of your datagrid. Use this to assign initial vals to your
checkbox.
Also a foreach item loop can be used the same as above to iterate through
the datagrid and retrieve the values of the check on a postback
Dan
"jack" <gautams.mail@.gmail.com> wrote in message
news:1136534571.546911.309050@.g49g2000cwa.googlegroups.com...
> Hi all,
> how to get a check box in the first column of the data grid as it only
> shows a:link and a button type control to be inserted.
> Please help
>

0 comments:

Post a Comment