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

[Solved] Find Object in GridView column

3 Answers 94 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Sravan Kumar Uddarraju
Top achievements
Rank 1
Sravan Kumar Uddarraju asked on 05 Oct 2010, 02:39 PM

Hi,

 

I am having some trouble finding the object in the gridview column. I have graphic object which will have attributes associated and those attributes are binded to the RadGridView including the graphic as column in the grid. My question is, if I know the graphic object, how I can find that object in that graphic column and also I would want to select that row and scroll to that record. Something like this.

 
gridView.ScrollIntoView(_gridView.SelectedItem);

 

Regards,

Sravan

3 Answers, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 05 Oct 2010, 02:43 PM
Hi Sravan Kumar Uddarraju,

Well if you have a refference to the graphic object, you may then easily find the DataItem ( row)  containing it.
Then all you need is to call RadGridView.ScrollIntoView(dataItem)  method.

Having the dataItem , to select the row , you will need to do something like :

this.gridView.SelectedItem = dataItem; 








Kind regards,
Pavel Pavlov
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
0
Sravan Kumar Uddarraju
Top achievements
Rank 1
answered on 05 Oct 2010, 03:02 PM

Thanks for the quick reply.

But I'm having trouble with 1) finding the specific graphic object in Graphics column and then 2) subsequent row of that column.

0
Pavel Pavlov
Telerik team
answered on 08 Oct 2010, 09:18 AM
Hello Sravan Kumar Uddarraju,

I am afraid it does not become quite clear what the problem is. Can you please paste me the implementation of your business objects - the ones you use in the RadGridView ItemsSource.

Then let me know what are the requirements in a few words and I will be glad to prepare a small working sample for you .

Meanwhile - here are some thoughts :
In case you have a reference to the graphic object , you can do the following :

1. Perform a foreach iteration over RadGridView.Items to check which item contains the graphic
2. After you know the item , call ScrollIntoView and/or  set it as selected item .

Kind regards,
Pavel Pavlov
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
Sravan Kumar Uddarraju
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Sravan Kumar Uddarraju
Top achievements
Rank 1
Share this question
or