I have a class which inherits a ultrawingrid I set some default properties in the constructor but when the grid is drawn on the form the grid does not keep the properties. Any ideas on whats happening. It appears when the control is first drawn its correct but a few seconds later it changes.
I included a scaled down verion of my class which demostrates mky issue.
John
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Infragistics.Win.UltraWinGrid;
{
public class grid: UltraGrid
}
~grid()
Check if in the form constructor these values are changed. This constructor happens after the grid class constructor.
In my project, all the changes I set to the grid class, are being copied to the form constructor, so if I change something in the class grid, it won't effect on the controls I have been already dragged.
If the property I change belongs to the grid itself (like RightToLeft) and it can be overriden, I overrided it and wrote my new value in an attribute of DefaultValue, and changed the value in the constructor.
For other properties like those in the appearance or those that can't be overriden, I don't have a nice solution. Currently I have some functions that set some properties in the grid class. In the form I call the appropriate functions to set the properties. That's works fine but you can't see the changes in the designer, only by runtime.
If someone has a solution for that I'll be glad to know.
The grid designer loads a Preset file into the grid by deafult when you create a new grid on a form. So it could be the designer. I beleive you can go into the Presets tab of the grid designer and turn this off.