Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
30
Set the Row height on a Grid
posted

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

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

     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.

Children