Checkbox on Gridview

2 posts, 0 answers
  1. Kostas
    Kostas avatar
    1 posts
    Member since:
    Aug 2016

    Posted 25 Aug Link to this post


    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

  2. Dimitar
    Dimitar avatar
    1326 posts

    Posted 26 Aug Link to this post

    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. 

    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.
  3. DevCraft R3 2016 release webinar banner
Back to Top