Hi ,
I have an ultra wing grid and row edit template bound to it. But SOMETIMES, template is not popping out.
i tried adding this event to clickcell event of the grid ,
this.ultraGridRowEditTemplate1.Show();
Even this did not help. When i tried to debug, i found that even after the above line is passed, IsShown property of the template is still false. and i am not able to find what is happening.
anyone please help.
Regards,
Parthiban
Hello ,
Could you please post a small sample which demonstrates your issue, or give me the exactly steps which I should followed in order to be able to reproduce your issue on my side. This will helps me to investigate this issue further for you.
I am waiting for your feedback.
Hi,
Sorry i could not come up with any sample. Please provide any info based on my following question.
When i open the form, the highlighted icon appears by the side of each row and Row Edit template pops up with out any issue. When i click the button to refresh the data, the icons disappear and theRow Edit Template is not popping up.
Thank you
Parthiban_Sekar said:When i click the button to refresh the data
To what button are you referring? What is this button doing?
My guess is that you are setting the DataSource property on the grid, which should be avoided, if possible, because this will blow away the entire DisplayLayout of the grid in favor of the new layout for the new data source.
If you absolutely must set the DataSource on the grid, then there are a number of things you can do to avoid problems like this
You could save the grid's DisplayLayout before setting the DataSource and then re-load it again afterward. You will still lose any row or cell level state information but not property settings like the RowEditTemplate.
Another option would be to set the properties of the grid that affect the layout (such as the RowEditTemplate) in the InitializeLayout event, which will fire after you change the grid's DataSource.
Hi Mike,
thanks for writing in.
yes, i am setting the datasource of grid in that button event as you said.
gridXXX.DataSource = _XXXdata.OutputDS.Tables[0];
Could you tell me how i can retian the row edit template even after reassigning the data source of the grid. Please explain how i can implement in terms of code to enable the grid to retain the row edit template in Intialise layout or wherever.
Thanks in advance.
Hello Parthiban Sekar,
We are still following this forum thread.
Please feel free to let us know if you still need assistance with it.
Setting the DataSource on the grid isn't just going to lose the RowEditTemplate, it's going to lose the entire layout. Column sizes and positions, expanded and selected states of the rows - everything.
So it's really a good idea to avoid setting the data source again if possible. It's much better to just update the existing data source if you can.
If you can't, then the easiest thing to do is save the layout and load it back in.
MemoryStream stream = new MemoryStream(); this.ultraGrid1.DisplayLayout.Save(stream); // Set the DataSource here. stream.Position = 0; this.ultraGrid1.DisplayLayout.Load(stream); stream.Close(); stream.Dispose();