I have a grid with about 30 items. When I expand out Parent Row #1 I am firing the RowExpandedEvent and getting the child row header text from the database, however when I expand it out the header texts never change. Then when I expand out Parent Row #2 the event fires but the header text is the text that should have been in Parent Row #1. When I debug it I am getting the correct values but they are not displayed correctly in the grid. Infragstics support says it may be an issue with the grid but it takes forever to go through their development to verify this so at this point I am looking for any suggestions or work arounds as I need this thing going ASAP!
Thanks for any help you may be able to provide.
Hi wins903,
I'm a little confused as to what exactly it is you're trying to do and where. Could you maybe attach a small sample here to look at?
regards,David Young
I dont have a samply handy at the moment but let me try to explain:
Lets say I have the following grid:
Parent Row #1
Child Row #1 - Header Text is my column name of "Child"
Parent Row #2
Child Row #2 - Header Text is my column name of "Child"
Parent Row #3
Child Row #3 - Header Text is my column name of "Child"
In the example above I have 3 parent rows and 1 child row for each parent, with a single column (Child, Child, Child). What I want to do is change the header text depending on what parent row is clicked. So if I clicked Parent Row #1 I want the child header text to say "Child 1 RowExpanded", as follows:
Child Row #1 - Header Text is supposed to be "Child 1 RowExpanded"
Child Row #2 - Header Text is supposed to be "Child 2 RowExpanded"
Child Row #3 - Header Text is supposed to be "Child 3 RowExpanded"
The problem I am having is when I click on the first row Parent #1 the child text is staying as "Child" instead of displaying "Child 1 RowExpanded". Then, when I click on Parent Row #2 the child text is displaying "Child 1 RowExpanded" whereas it should display "Child 2 RowExpanded" and the same for Parent Row #3, the child header text is displaying "Child 2 RowExpanded" instead of "Child 3 RowExpanded".
Does that help at all, once I get back maybe I can put up a sample too if this doesnt make sense.
Thanks alot.
Hi,
This actually does make sense. I'm not entirely sure where you're changing the header text. In the row expanded of the parent? Maybe try in row island databinding? Another thing to try would be to turn EnableAjax to false and put the whole grid in an update panel. Until I see a sample, its hard to give more detailed suggestions.
thanks,dave
Hi Dave -
Yes I am doing this is the RowExpanded of the parent. I have not tried the RowIslandDataBinding event as I wasn't 100% sure of what it was.
I have tried setting the EnableAjax property to false and wrapped the grid in an update panel but didn't work. I also tried it without the update panel and that didn't work either. I think I may end up playing the waiting game on this one until infragistics development can verify this as a bug. Their support said it could take a while which is unfortunate because I need to have this thing up and running in some kind of working state tomorrow :). Maybe I can get by with generic headers for now. In any case I will try to post a sample soon.
Thanks again!
Please download the sample here: http://www.wins-wellness.com/testgrid.zip
I couldnt upload as the file size was too big.
If I select the first row, Andrew Fuller, the first name on the child rows should change to "Fuller Emp" however they do not. The header stays as "First"
If I select Test Person the first name header on the child rows should change to "Test Person Emp" however it changes to "Fuller Emp"
Lastly, when I select Joe Smith the first name header on the child rows should change to "Jow Smith Emp" however it changes to "Test Person Emp"
Thanks
Hello,
In the RowExpanded event you can get the child grid of the row using the RowIslands property. Once you have the child Grid you can set the header text of the column:
Select Case i
Case 2
e.Row.RowIslands(0).Columns(2).Header.Text = "Fuller Emp"
'whdg1.Bands(0).Columns(2).Header.Text = "Fuller Emp"
Case 12
e.Row.RowIslands(0).Columns(2).Header.Text = "Test Person Emp"
'whdg1.Bands(0).Columns(2).Header.Text = "Test Person Emp"
Case 13
e.Row.RowIslands(0).Columns(2).Header.Text = "Joe Smith Emp"
'whdg1.Bands(0).Columns(3).Header.Text = "Joe Smith Emp"
End Select
Please let me know if you have any questions.
Valerie
Abhijeet,
For us to assist you it is important to provide more details about how the solution isn't working as well as what version of the toolset you are using.
Above solution not working.
Thanks everyone who helped. Valerie's answer worked.