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

problem in switching data in RadGrid on button click

3 Answers 85 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ananthalvan
Top achievements
Rank 1
Ananthalvan asked on 13 Feb 2012, 09:33 PM
Hi,
   This is my first time using Telerik controls. I need some input/help in the problem I face with RadGrid. I have a functionality where I have to bind empty data on a asp button control click and rebind the original data on another asp button click. Both the functionality are through same button which I have in my page. When I click the button for the first time, i'm able to bind empty data to the grid. I use below code
grdMember.DataSource = dtMembers.Clone();
grdMember.DataBind();

When I want to bind the original data, I'm not able to. To rebind the original data, I use below code
grdMember.DataSource = dtMembers;
grdMembers.DataBind();

Am I missing something here?

Ananth

3 Answers, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 14 Feb 2012, 10:22 AM
Hi Ananthalvan,

Do use the grid's Rebind() method, not DataBind().
 
Greetings,
Tsvetoslav
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Ananthalvan
Top achievements
Rank 1
answered on 16 Feb 2012, 06:08 PM
That doesn't help. I used Rebind() in both the places. still the same result. Any other suggestions to switch empty dataset and populated dataset?
0
Tsvetoslav
Telerik team
answered on 21 Feb 2012, 10:54 AM
Hello Ananthalvan,

Could you paste your complete aspx and code-behind - do use the code formatter tool of the ticket editor (last option on the lower tool bar).

Greetings,
Tsvetoslav
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
Grid
Asked by
Ananthalvan
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Ananthalvan
Top achievements
Rank 1
Share this question
or