Hi there,
let's just straight to the case:
The Problem is:
Notes:
thanks in advance
let's just straight to the case:
- I Have a RadGrid Which i have declared in Design Time:
<
telerik:RadGrid
ID
=
"grdResult"
runat
=
"server"
Width
=
"100%"
AutoGenerateColumns
=
"false"
AllowPaging
=
"true"
PageSize
=
"25"
ShowHeader
=
"true"
>
<
MasterTableView
AutoGenerateColumns
=
"False"
>
<
Columns
>
</
Columns
>
<
NoRecordsTemplate
>
<
div
> Search did not match with any of the existing data.</
div
>
</
NoRecordsTemplate
>
</
MasterTableView
>
</
telerik:RadGrid
>
- What i want to do with it is that i want to add the column dynamically while in run time, and the data is comming from Sharepoint List
GridBoundColumn col =
new
GridBoundColumn();
col =
new
GridBoundColumn();
col.HeaderText = SystemConstants.ExtenalName_Col1;
col.DataField = SystemConstants.InternalName_Col1;
grdResult.MasterTableView.Columns.Add(col);
col =
new
GridBoundColumn();
col.HeaderText = SystemConstants.ExtenalName_Col2;
col.DataField = SystemConstants.InternalName_Col2;
grdResult.Columns.Add(col);
col =
new
GridBoundColumn();
col.HeaderText = SystemConstants.ExtenalName_Col3;
col.DataField = SystemConstants.InternalName_Col3;
grdResult.MasterTableView.Columns.Add(col);
col =
new
GridBoundColumn();
col.HeaderText = SystemConstants.ExtenalName_Col4;
col.DataField = SystemConstants.InternalName_Col4;
grdResult.MasterTableView.Columns.Add(col);
col =
new
GridBoundColumn();
col.HeaderText = SystemConstants.ExtenalName_Col5;
col.DataField = SystemConstants.InternalName_Col5;
grdResult.MasterTableView.Columns.Add(col);
col.HeaderText =
"View"
;
//this will be hyperlink column
grdResult.Columns.Add(col);
The Problem is:
- When I have not bind it to any data why the does not show up at all? not event the header text?
- How do i bind / populate the grid ? *tried the documentation but as far as i see everything is using database..
Notes:
- I do not use the onNeedData event because i want to populate the grid after the user finish inputing the search criteria in the form and click the search button.
thanks in advance