Hi Guys
Whats the correct method to get and set the row height for all rows on the grid. I wish to allow the user to resize the rows and then save the row height when the form is closed.Then Reset the row height when the form is reloaded.
In the form load event
set the row height from a config file.
In the form close event
Get the current row height and save it in my config file
Thanks
Hi,
There's no way the grid can save this information. The grid creates rows based on the data source. Once you close the application, the rows are destroyed. If you run the application again and bind it to a data source, the grid has no way to know that it's the same one. There is no way for hte grid to relate the original rows to the new rows. They data may be completely different.
So the only way for something like this to work is for you to persist the information yourself. You would have to determine how to uniquely identify the row of data - maybe using a Primary Key value, and then store and restore the values yourself.
Hello Mike,
how to set the row height? before the data binding or after it. could you give some code to describe about it.
thanks.