web control Datagrid

  • Thread starter Thread starter jack
  • Start date Start date
J

jack

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
 
Put 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top