This is a migrated thread and some comments may be shown as answers.

Checkbox on Gridview

1 Answer 83 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Kostas
Top achievements
Rank 1
Kostas asked on 25 Aug 2016, 10:53 PM

Hello

I have a gridview with the first column as checkbox.

I want to make a loop to the rows of gridview to see which rows are checked so to read data from the selected rows.

I cant fid how to check if the row is Checked

Thank you

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 26 Aug 2016, 09:26 AM
Hello Kostas,

Thank you for writing back.

The following snippet shows how you can check the value:
foreach (var item in radGridView1.Rows)
{
    if ((bool)item.Cells["Bool"].Value)
    {
        Console.WriteLine("RowIsChecked: " + item.Index);
    }
}

Please let me know if there is something else I can help you with. 

Regards,
Dimitar
Telerik by Progress
Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
Tags
GridView
Asked by
Kostas
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or