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

Binding using datatable in code behind

1 Answer 73 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Derek
Top achievements
Rank 1
Derek asked on 27 Feb 2009, 06:07 PM
Code is being written in C# for a Web App that is .net 2.0 framework

Right now I'm taking XML and parsing it into a DataTable in the code behind . Then I set the datasource

RadGrid1.DataSource = dataTable;
RadGrid1.DataBind();

Now it shows up correctly on my page. I have Edit and Delete buttons set up on that same table.

Yet when I click on the edit button my table disappears, as in, it turns to a black line. Which I assume means it lost it's data.

Where am I going wrong here?


1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 27 Feb 2009, 06:15 PM
Hello Derek,

I suggest you use NeedDataSource event as shown in the following links:
Binding to DataTable or DataSet
Advanced Databinding (using NeedDataSource event)

Best regards,
Daniel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Derek
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or