Dear all,
I am using infragistics 6.2 with vb.net 1.1. I have a UltraWinGrid.UltraGrid and it is connected to a datasource with 4 columns. I tried to add a new column which will have a button to open new form on the application.
I added an unbound column and it was shown correctly on the designer. After i opened the code, i saw that there was no row at the code side for the new column. i returned back again to the designer and the column was gone.
What can be the problem?
I'm not following what you mean by, "...saw that there was no row at the code side for the new column". Designer bugs are sometimes difficult unless you can identify the steps necessary to reproduce them, because unlike with code, there is no record of what happened.
You could use the InitializeLayout event to add an unbound column at runtime if you want:
void ultraGrid_InitializeLayout(object sender, InitializeLayoutEventArgs e){ UltraGridColumn column = e.Layout.Bands[0].Columns.Add( "unbound" );}
When i add the column with the designer, i expect it produces the code like:
UltraGridColumn5.CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly
Appearance7.FontData.BoldAsString = "False"
UltraGridColumn5.CellAppearance = Appearance7
UltraGridColumn5.DefaultCellValue = "..."
UltraGridColumn5.Header.Caption = ""
UltraGridColumn5.Header.VisiblePosition = 4
UltraGridColumn5.NullText = "..."
UltraGridColumn5.SortIndicator = Infragistics.Win.UltraWinGrid.SortIndicator.Disabled
UltraGridColumn5.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Button
UltraGridColumn5.Width = 24
But nothing changed after i add it.
The suprising part is, i closed the visual studio and after i open again, there was code, and the column. I am sure i made something wrong but i don't know where. Anyway my problem is solved.
But thanks for your quick response.
Regards,
Hi,
I have the same problem with visiblility of the UltraGridColumn. When I try for example this: browse_2:DisplayLayout:Bands:Item[0]:Columns:add('blablabla’) the column shows up in the ultragrid.
However, when I try this: browse_2:DisplayLayout:Bands:Item[0]:Columns:add(clsColumnCollection) then I see nothing. I have given ths clsColumnCollection all the properties which I think are useful and when I count the columns, one is added, without visible result.
Any comments on this would be greatly appreciated.
Greets, Thijs
I have the same issue. The result of adding a UltraColumn to the UltraGrid isn't visible at runtime. When I try for example 'Grid_2:DisplayLayout:Bands:Item[0]:Columns:add('blablabla')' when I click a button, the results shows up. in the Grid
However, when I try 'Grid_2:DisplayLayout:Bands:Item[0]:Columns:add(clsColumnCollection)' then I see nothing, despite the fact that the number of columns is increased. I have define the properties which I thing are useful, but without any visible result. Any advice would be appreciated!
Thijs
v6.2 is over 2 years old, so this might be a bug in the designer. The first thing I recommend is that you make sure you have the latest Hot Fix. You can get it from the Infragistics web site: My Infragistics Keys and Downloads - Download Anything and Everything You Own
If that doesn't help, then perhaps you could explain in more detail exactly how you added the unbound column. I assume you used the grid designer.
You might want to consider simply using the InitializeLayout event and adding the column at run-time, rather than design-time. This is generally easier, in my experience.