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

[Solved] Grouping and Column access

4 Answers 161 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Markus
Top achievements
Rank 1
Markus asked on 20 Mar 2008, 10:10 AM
Is it possible to find out which group are currently open and what is the value of the group (I look for some kind of a "GroupHeader" collection)?

All rows in a grid are available in "Items" collection. There I can access the value of each column with "Cells" collection. Is it possible to access such a cell by UniqueColumnName?

When I expand a group the group collapses again on a rebind, how can I avoid this behavior?

After expanding a group I press on a button in "CommandItemTemplate" of grid. The result for "Visible" property for all items is always "0". So how can I find out which rows in the group are currently visible (maybe this has something to do that groups always collaps automatically)?

4 Answers, 1 is accepted

Sort by
0
Accepted
Ves
Telerik team
answered on 24 Mar 2008, 05:08 PM
Hi Markus,

You can get any grid item using GetItems method, you can find more details here.

As for keeping the expanded state of RadGrid groups when rebinding the grid -- I hope this code library will help:

http://www.telerik.com/community/code-library/submission/b311D-bcmcgm.aspx

Greetings,
Ves
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Markus
Top achievements
Rank 1
answered on 25 Mar 2008, 03:07 PM
Thanks for help I get it work.

There is one remainig question. I use "Items" collection to get data for a row. Can I access the cells collection for an item by UniqueColumnName somehow to get a value or is access only possible by index?
0
Ves
Telerik team
answered on 26 Mar 2008, 07:01 AM
Hi Markus,

It is recommended accessing the cells by the column UniqueName. Here is an example:

item("ColumnUniqueName").Text or item("ColumnUniqueName").Controls

You can find more details in this help topic. However, this is not applicable for GridGroupHeaderItems, it does not have a cell for each column.

Regards,
Ves
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Markus
Top achievements
Rank 1
answered on 26 Mar 2008, 07:57 AM
Thankks for information
Tags
Grid
Asked by
Markus
Top achievements
Rank 1
Answers by
Ves
Telerik team
Markus
Top achievements
Rank 1
Share this question
or