Hello,
I'm using an UltraGrid containing a column with a boolean value. I want to change the style of the checkbox displayed in this column. I defined this style in an isl file designed using AppStylist application.
This works fine except if I want to change the checkBoxGlyphInfo property of the checkbox. Then nothing is changed in my grid. I tried to place a checkbox outside of my grid and then the style I defined with the checkBoxGlyphInfo property is applied to this checkbox.
Am I doing something wrong?
Ok let me know if there is a workaround for this issue.
One last problem related to your previous post : when I update the content of my DataGrid, the checkbox in the header is not updated according to the boolean content in each row. Note that I don't reassign the datasource of the grid each time the content change, I only call Rows.Refresh(RefreshRow.ReloadData) on the grid object.
Hi,
Now that I think about it, even when you are using the workaround, I would think that the CheckBoxUIElements would pick up the grid's GlyphInfo. If that's not happening, something is wrong.
So I tried this out in AppStylist. I created a new Style Library and set the CheckBoxGlyphInfo on the grid and then I went to the grid canvas and turned on the header checkboxes, and the glyphs apply to the cells in the grid, but not to the headers.
So then just for fun I tried applying CheckBoxGlyphInfo to the All Components role and it still doesn't apply.
So it looks like something is wrong here. I'm going to forward this over to Infragistics Developer Support and ask them to write this up for developer review.
You're right, I was using a more complex way to display checkbox in the header. So now I define the CheckBoxVisibility of the header and the checkbox is displayed in the header without workaround.
However, the style is not applied automatically. I also tried to define the StyleLibraryName of the header (because I actually want a different style for the header content) like this in the InitializeComponent() method of my control without success:
appearance2.StyleLibraryName = "customStyle";ultraGridColumn37.Header.Appearance = appearance2;
Note that I load the style in the constructor of the control like this:
const string styleIslFile = "SingleInjectionsTable.gridStyle.isl"; StyleManager.Load(Assembly.GetExecutingAssembly().GetManifestResourceStream(styleIslFile ), true, "customStyle");
What am I doing wrong?
What version of the controls are you using? That article is out of date. We added inherent support to the grid for CheckBoxes in the column headers a few releases ago.
If you are using the latest version, you can turn on the header CheckBoxes with a few simple property settings and they should pick up the grid's GlyphInfo settings from the isl file automatically.
Thanks. I changed the CheckBoxGlyphInfo for the UltraGrid and it works fine.
I have another question related to this topic. To display a checkbox in the header of the UltraGrid, I use a CreationFilter as explained here: http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=4883. I don't understand how I can define the style for the CheckBoxUIElement displayed in the header. Is it possible to define the CheckBoxGlyphInfo for this element?