Moiz Saifuddin
asked on
UltraWebgrid
In Infragistics, i want to use this logic and apply it to columns so instead of rows i want to add columns with increment of the i value. let me know if this is possible for an ultrawebgrid.
Dim row As Infragistics.WebUI.UltraWe bGrid.Ultr aGridRow
For i As Integer = 0 To 10
row = New Infragistics.WebUI.UltraWe bGrid.Ultr aGridRow(N ew String() {String.Format("MyCell{0}" , i)})
Me.WebCombo1.Rows.Add(row)
Next
Moiz
Dim row As Infragistics.WebUI.UltraWe
For i As Integer = 0 To 10
row = New Infragistics.WebUI.UltraWe
Me.WebCombo1.Rows.Add(row)
Next
Moiz
ASKER
WebCombo1.Columns.Add(colu mn), I dont want to add it to a webcombo, I want to add it to my ultrawebgrid itself, do i just say UltraWebGrid1.Columns.add( column) ?
Moiz
Moiz
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I added that by mistake earlier in my code
Me.WebCombo1.Rows.Add(row)
I am only talking about the webgrid, nothing to do with the combo, i was trying to add columns on the webgrid on runtime....
moiz
Me.WebCombo1.Rows.Add(row)
I am only talking about the webgrid, nothing to do with the combo, i was trying to add columns on the webgrid on runtime....
moiz
ASKER
ASKER
i wanted to rename my columns as they increment, nothing to do with the webcombo, and it worked.... as time1,time2,time3,time4... ....time(n )
Dim nRow as integer
For nRow = 1 To DataGrid2.Columns.Count - 1
DataGrid2.Columns(nRow).Ke y = String.Format("time{0}", nRow)
DataGrid2.Columns(nRow).He aderText = String.Format("time{0}", nRow)
Next
Moiz
Dim nRow as integer
For nRow = 1 To DataGrid2.Columns.Count - 1
DataGrid2.Columns(nRow).Ke
DataGrid2.Columns(nRow).He
Next
Moiz
ASKER
i still dont know what the word, Key means??
Moiz
Moiz
Dim column As New Infragistics.WebUI.UltraWe
column.Key = String.Format("column{0}",
column.HeaderText = String.Format("Column{0}",
WebCombo1.Columns.Add(colu
Next
Dim row As Infragistics.WebUI.UltraWe
For i As Integer = 0 To 10
row = New Infragistics.WebUI.UltraWe
Dim cell As Infragistics.WebUI.UltraWe
For x As Integer = 0 To 3
cell = New Infragistics.WebUI.UltraWe
cell.Text = String.Format("Cell {0}:{1}", i, x)
row.Cells.Add(cell)
Next
Me.WebCombo1.Rows.Add(row)
Next