datagrid challanges ,,,need help plzzzz

hello ,

i have a problem with something in datagrid

1-i want to add checkbox column in the datagrid .
then i want to get all the checked checkboxes when i hit a button

how can i get all the checked checkboxes when i hit a button ??????


2- i wanna make the odd numbers of rows in the datagrid in bold font
how can i do this ??

Comments

  • add a template field for checkbox by writing below code



    HeaderTemplate>


    < ItemTemplate>
    < asp:TemplateField>

    check for check boxes

    foreach (GridViewRow row in GridView3.Rows)
    {
    //get checkBox from gridview
    CheckBox chkDelete = (CheckBox)row.FindControl("chkSelect");
    if (chkDelete.Checked) //checking checkboxes
    {
    //your code
    }

    Check this tutorial...
    http://csharpings.blogspot.com/2010/02/checkboxex-in-gridview.html
    }
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion