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

How to get invisible column value in RadGridView

4 Answers 406 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Anita
Top achievements
Rank 1
Anita asked on 11 Jan 2011, 06:11 AM
Hi,

I am using RadGridView in my application. I have 4 GridViewDataColumns in my grid. I want one of column  to hide ,So i set that column to IsVisible=false.

On Grid SelectionChanged event when i got the perticular GridViewRowItem., this row contain only 3 Columns (It does not contain the hidden column).

 So can you Please help to get the hidden Column Value.


Thanks & Regards,
Anita.

4 Answers, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 11 Jan 2011, 06:13 PM
Hello Anita,

 
Due to virtualization issues RadGridView can realize only the cells that are currently visible. You may get the values from the underlying business object, not from the UI. You may get access to the underlying business object using the DataContext property of the row, as it is shown below:

var businessObject =  e.Row.DataContext as Employee;
//now you can read all the properties you need

 

Regards,
Vanya Pavlova
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
HL
Top achievements
Rank 1
answered on 07 Apr 2011, 05:58 PM
I have the same issue. so it is impossible to get the cell value from client side if the cell is invisible

Thanks
Helena
0
HL
Top achievements
Rank 1
answered on 07 Apr 2011, 05:59 PM
I have the same issue. so it is impossible to get the cell value from client side if the cell is invisible

Thanks
Helena
0
Vlad
Telerik team
answered on 08 Apr 2011, 06:45 AM
Hello,

 You can use Items collection to access any value - no matter if you have visible column for this property or not. I'm not sure about the client-side - are you working with WPF?

Kind regards,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Anita
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
HL
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or