3 Answers, 1 is accepted
0
Hi anna,
We would suggest you to review this documentation article here to get you started.
Hope this helps.
Kind regards,
Maria Ilieva
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
We would suggest you to review this documentation article here to get you started.
Hope this helps.
Kind regards,
Maria Ilieva
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
anna
Top achievements
Rank 1
answered on 01 May 2008, 04:01 PM
problem is, I placed a grid in my pageview and I am trying to programmatically add columns in it: my code is
Dim sConnectionString As String = "conn ..."
con.ConnectionString = sConnectionString
con.Open()
and i get data in my array. and i am binding this data to gidcolumns:
Dim
boundColumn As GridBoundColumn
boundColumn =
New GridBoundColumn
boundColumn.DataField = orderdata(11)
boundColumn.HeaderText =
"data"
RadGrid1.MasterTableView.Columns.Add(boundColumn)
but I dont see my grid during run time at all.
0
Princy
Top achievements
Rank 2
answered on 02 May 2008, 05:27 AM
Hi Anna,
To define the structure of a RadGrid control that is declared in the ASPX page, use the Page_Load event handler. Columns and detail table should be added to the corresponding collection first, before the values for their properties are set.
CS:
| private void Page_Load(object sender, System.EventArgs e) |
| { |
| if ( !IsPostBack ) |
| { |
| GridBoundColumn boundColumn; |
| //Important: first Add column to the collection |
| boundColumn = new GridBoundColumn(); |
| this.RadGrid1.MasterTableView.Columns.Add(boundColumn); |
| //Then set properties |
| boundColumn.DataField = "CustomerID"; |
| boundColumn.HeaderText = "CustomerID"; |
| } |
| } |
Thanks
Princy.