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

Accessing System and Header rows for empty child view

3 Answers 116 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Brian Manning
Top achievements
Rank 1
Brian Manning asked on 01 Nov 2010, 07:20 PM
Hi there,

Just a quick question for you all:  How can I get access to the SystemRows or the header row/cells of a child collection that's empty?  Generally if I wanted to access those guys for a row that already exists I'd go

((GridViewDataRowInfo)row).ViewInfo.SystemRows

or

((GridViewDataRowInfo)row).ViewInfo.TableHeaderRow

respectively, but I can't figure out how to get access to those guys for an empty child collection because there's no "row" object I can latch onto if the parent's ChildRows is empty.  I know they exist somewhere though because they're sitting there on my screen.  I just feel like I must be missing something simple.

For reference, I'd like to set the child NewRow as the currently selected row when a new hierarchy row is created (so insertion would drill through the hierarchy, following the way my users would prefer to enter data) and I need to force an InvalidateRow on a child HeaderRow so that it fires the ViewCellFormatting event when the value of a certain cell is changed (so I can set the header text of the child view even if there are no children yet).

As an aside, in an attempt to solve the second issue I've tried to fire the grid.TableElement.Update() method with a parameter of GridUINotifyAction.Reset and GridUINotifyAction.DataChanged in my grid_CellValueChanged event, and it's throwing exceptions up to my Main method (bypassing my try/catch around the actual Update() call).  Not sure if that's intentional/expected.

Thanks for any direction!

3 Answers, 1 is accepted

Sort by
0
Brian Manning
Top achievements
Rank 1
answered on 04 Nov 2010, 04:58 PM
*Bump*

Anyone?  I'm getting desperate to the point where I've considered inserting a blank child row when a parent row is inserted just to have something to latch onto.  At which point I might as well just take over the whole process of row insertion...
0
Accepted
Alexander
Telerik team
answered on 04 Nov 2010, 07:59 PM
Hello Brian,

Thank you for contacting us.

Currently, RadGridView does not support this scenario. It is an interesting case and we will try to extend the control in the desired direction for a future release.

Do not hesitate to write back if you have further questions.

Best regards,
Alexander
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
Brian Manning
Top achievements
Rank 1
answered on 05 Nov 2010, 02:54 PM
Not what I was hoping for, but that's good to know.  Thanks for the reply.
Tags
GridView
Asked by
Brian Manning
Top achievements
Rank 1
Answers by
Brian Manning
Top achievements
Rank 1
Alexander
Telerik team
Share this question
or