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

Step over all GridViewCells in a RadGridView?

6 Answers 68 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Andi
Top achievements
Rank 2
Andi asked on 14 Dec 2010, 04:37 PM
Hi there,

I have to step over all GridViewCells in a RadGridView (perhaps with a foreach) but I have no plan how I can do it.
Would be nice if someone can help me.

Thx
Andi

6 Answers, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 14 Dec 2010, 05:22 PM
Hello Andi,

RadGridView follows the MVVM pattern and you cannot operate directly on GridViewCells or GridViewRows, you may operate on the raw data contained in it.
The recommended approach is to use the Items property which is a collection of all items that the grid is bound to, you can use the following snippet:

foreach(Employee emp in this.grid.Items)
{
//do some stuff here
}

Everything depends on your custom needs, you may change it based on your custom logic.

Kind regards,
Vanya Pavlova
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
0
Andi
Top achievements
Rank 2
answered on 15 Dec 2010, 12:13 PM
hmm...I think this is not what I need. 
I need to reach the specific cells to add Tooltips to them.
0
Vanya Pavlova
Telerik team
answered on 16 Dec 2010, 01:27 PM
Hello Andi,

 
You may use TooltipTemplateSelector as it is demonstrated in the following demo.

Best wishes,
Vanya Pavlova
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
0
Andi
Top achievements
Rank 2
answered on 16 Dec 2010, 01:58 PM
Hello Vanya,

the demo shows how to use in an static Grid.
My Grid is created by runtime. So I can not do anything in the xaml.
Over that, the demo seems to create one Tooltip for the whole column. In my case not every Cell has to get an Tooltip. But it is independend from the column. E.g. just the second Cell in the third column has to get a Tooltip. The Tooltips are comments about the value of the cell.

I hope you understand what I want to tell you :-)
0
Vanya Pavlova
Telerik team
answered on 17 Dec 2010, 02:13 PM
Hello Andi,

 

I understand what you mean, but even with dynamic columns you need to use TooltipTemplateSekector, just set it in code-behind to the desired column.
You may also need the following thread for reference.
Thank youI


In uden



wwwws!
I understand what you mean, but even with dynamic columns you need to use TooltipTemplateSekector, just set it in code-behind to the desired column.
You may also need the following thread for reference.
Thank youI undes
I understand what you mean, however I will strongly advocate for ToolTipTemplateSelector usage.
The demo suggested below shows a very simple implementation, but you may customize it in the way you need. Also you may use the following thread for reference. In case you need to generate dynamically the templates you may use the following one thread for further information.
Thank you!


Kind regards,
Vanya Pavlova
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
0
Andi
Top achievements
Rank 2
answered on 17 Dec 2010, 02:17 PM
ok, thank you. I will try it out and let you if it works
Tags
GridView
Asked by
Andi
Top achievements
Rank 2
Answers by
Vanya Pavlova
Telerik team
Andi
Top achievements
Rank 2
Share this question
or