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

Could not access the rad grid column via their name

1 Answer 57 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Mahesh V
Top achievements
Rank 2
Mahesh V asked on 04 Jul 2012, 09:48 AM
Hi,

I am implementing the rad grid at run time.I need to access the value of a cell (say,case_number) in every row by column name,Plz let me know how to do it?

here is my code,

   IList<GridViewRow> rows = radGrid1.ChildrenOfType<GridViewRow>().ToList();
           foreach (GridViewRow  drow in rows)
{
                                   //drv.Cells[1].Text;          I can do this via column index but I need the same with column name
}

Thanks

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 04 Jul 2012, 10:11 AM
Hi,

 You should not access directly UI elements in both WPF in Silverlight. In both platforms everything is UI virtual and to achieve your goal you can use MVVM. 

All the best,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
Mahesh V
Top achievements
Rank 2
Answers by
Vlad
Telerik team
Share this question
or