I try to create a custom command ultrawingrid column that includes some ultrabuttons such as "edit button", "delete button", "show detail button"....
I want to add this column to grid at runtime.
I need your urgent help!
Mike,
Thanks for your help.
It works for me.
Thanks,
EEmran
Hi,
All you have to do is check e.Layout.Bands(ZERO).Columns.Exists("Command Col") to see if the column is already there before you try to add it.
Hello Mike,
I have ultraComboBox and UltraGridview on form.
Base on selected value in UltraCombo Box I need to populate or repopulate my ultraGrid. I have one unbounded column which I added using code below.
Problem is whenever change value in UltraCombo, during re-populate process, it fires ultragrid_InitializeLayout Event.
This event try to add column again and ends up throwing exception that "column Exist already ".
Private Sub ultragrid_InitializeLayout(sender As System.Object, e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles ultragrid.InitializeLayout Dim unboundCol As UltraGridColumn = e.Layout.Bands(ZERO).Columns.Add("Command Col") unboundCol.Style = ColumnStyle.Button unboundCol.ButtonDisplayStyle = ButtonDisplayStyle.Always unboundCol.Header.VisiblePosition = 3End Sub
What the better way to code this scenario?
Thanks
Imran
You should post this question in the UltraWebGrid forum.
I have a ultrawebgrid user control inside an aspx page. On my ResultGrid on the aspx page, I need to create a ImageButton column which inturn needs to call a javascript function. I looked at Templated columns but could not get them to work. I created a templated column at runtime and implemented as follows:
gResult_InitializeLayout(object sender, Infragistics.WebUI.UltraWebGrid.LayoutEventArgs e) {TemplatedColumn t = new TemplatedColumn();t.BaseColumnName = "PROCURE";t.IsBound = true;t.Key = "PROCURE";t.Header.Caption = "Procurement";PlantGrid.gResult.Bands[0].Columns.Add(t);}
void gResult_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e) {TemplatedColumn tCol = (TemplatedColumn)e.Row.Cells.FromKey("PROCURE").Column;Infragistics.WebUI.UltraWebGrid.CellItem CI = new CellItem(e.Row.Cells.FromKey("PROCURE"));ImageButton ib = new ImageButton();ib.ID = "imgbtnProcure";ib.ImageUrl = "images/find.gif";CI.Controls.Add(ib);tCol.CellItems[0] = CI;}
This does not work. I am not sure where I am going wrong. Should the Templted Column be implemented in the Usercontrol? Kindly advice.