i have a TcxGridDBBanded column in delphi , which takes the value from database.
the colindex property of all the columns is already set in the delphi form.
now at run time if the user changes the order of the column, and try to open it again, the GridDBBanded returns to it original state,
that is it does not show the GridDBBanded with he position of column changed.
i want to show the grid with the positions of its columns changed at run time.


i have attached a image.
the upper portion of the image is the original state of the form.
the lower portion of the image when i change the position of columns at run time.

i want that the changed positon of columns retains if i close the form and then open it again.
at present what happens is , after changing the position of columns at run time and then closing the form when i open it again, it looks like the upper portion rather then the lower portion of the image.

Please suggest a reasonable solution.

Pascal
procedure WriteComponentResFile(const FileName: string; Instance: TComponent);
File
Classes
Description
Use WriteComponentResFile to save the component specified by the Instance parameter to the specified file, storing it in a resource-file format.

To read a component written with WriteComponentResFile, call ReadComponentResFile.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.