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
120
Can I change the grid column name at runtime?
posted

Hi.

Is it possible for me as a user to change the column names/titles while the application is running. Something like a rename/edit feature. And if yes, can these updated column names be persisted (maybe in xml file or resource) so that they can be reused when the application starts again.

Appreciate your help.

Thanks.

Parents
No Data
Reply
  • 12773
    Suggested Answer
    posted

    Hello,

    Yes you can change the column name runtime using the caption property of the column you want to rename:

    this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].Header.Caption. = "Test";

     And yes you can use Save Layouts - SaveAsXml and Load Layout - LopadFormXml in order to get the changes that you make in your grid. And when you run you application and load the saved layout, the changes will be appear in the grid.

    See more details here:
    http://help.infragistics.com/Help/NetAdvantage/WinForms/2009.1/CLR2.0/html%5CWinGrid_Save_and_Load_a_Layout_to_a_File.html

    I hope this is helpful.

    Sincerely,
    Dimi
    Developer Support Engineer
    Infragistics, Inc.

Children