This is a migrated thread and some comments may be shown as answers.

Programatically add Rows to Grid

1 Answer 80 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Armin
Top achievements
Rank 1
Armin asked on 10 Oct 2008, 11:04 PM

 

I have the following grid in my ASPX page. How can i add rows programatically (on server). 

GridDataItem item1 = new GridDataItem(RadGrid1.MasterTableView, 0, 0, GridItemType.Item);

 

 

does not work.


<

 

telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None" Height="241px">

 

 

<MasterTableView>

 

 

<RowIndicatorColumn>

 

 

<HeaderStyle Width="20px"></HeaderStyle>

 

 

</RowIndicatorColumn>

 

 

<ExpandCollapseColumn>

 

 

<HeaderStyle Width="20px"></HeaderStyle>

 

 

</ExpandCollapseColumn>

 

 

<Columns>

 

 

<telerik:GridBoundColumn EmptyDataText="&amp;nbsp;" HeaderText="Column 1" UniqueName="COL1">

 

 

<HeaderStyle Width="60px" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn EmptyDataText="&amp;nbsp;" HeaderText="Column 2" UniqueName="COL2">

 

 

<HeaderStyle Width="60px" />

 

 

</telerik:GridBoundColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

<FilterMenu EnableTheming="True">

 

 

<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

 

 

</FilterMenu>

 

 

</telerik:RadGrid>

 

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 13 Oct 2008, 04:12 AM
Hi Armin,

I have found the following forum link which discusses a similar requirement.
Add row to grid without DataSource

Shinu.
Tags
Grid
Asked by
Armin
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or