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

get all row with checkboxcolumn checked

1 Answer 89 Views
GridView
This is a migrated thread and some comments may be shown as answers.
pcprogrammer9
Top achievements
Rank 1
pcprogrammer9 asked on 12 Dec 2019, 07:02 AM

How I can loop through all row of my grid and detect only row with checkbox column checked ?

i use this solution and got error :  

-------------------------------------------------------------------------------------------------------

Error:

"System.NullReferenceException: 'Object reference not set to an instance of an object.'Telerik.WinControls.UI.GridViewCellInfo.Value.get returned null."
-------------------------------------------------------------------------------------------------------

Code:

IList<GridViewRowInfo> gridRows = new List<GridViewRowInfo>();
foreach (GridViewRowInfo rowInfo in radGridView.ChildRows)
{
    bool isChecked = (bool)rowInfo.Cells["CheckboxColumn"].Value;
    if (isChecked == true)
    {
        gridRows.Add(rowInfo);
    }
}

1 Answer, 1 is accepted

Sort by
0
Nadya | Tech Support Engineer
Telerik team
answered on 13 Dec 2019, 03:01 PM

Hello,

Your question has already been answered in the thread (Ticket ID: 1445891) you have opened on the same topic. Please, see our answer there for more information.

We kindly ask you to use just one thread for a specific problem to contact us. Posting the same questions numerous times slows down our response time because we will need to review and address two or more tickets instead of one. Moreover, threads are handled according to license and time of posting, so if it is an urgent problem, we suggest you use a support ticket, which would be handled before a forum thread.

Thank you for your understanding.

Regards,
Nadya
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
GridView
Asked by
pcprogrammer9
Top achievements
Rank 1
Answers by
Nadya | Tech Support Engineer
Telerik team
Share this question
or