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

Delete Command and Grid Refresh

4 Answers 243 Views
Grid
This is a migrated thread and some comments may be shown as answers.
John Mark Mikhail
Top achievements
Rank 1
John Mark Mikhail asked on 10 Apr 2010, 06:55 PM
Hi,

I have a strange issue.

I have a form that has multiple RadGrids. On a few of these Grids I have a Delete Command which would delete that particular row.

When the delete command is called, the appropriate event is fired and the code is executed correctly. The right row gets deleted from the database. However, when the control refreshes, it results in an empty grid. If I refresh the entire page, the grid will show the correct number of rows.

I've used the delete command on many other forms without this issue. and I'm stuck on what could be the cause.

Anyone else had the issue when the Delete Command is fired that the grid displays no rows, even though the database rows are there?

Thanks
JM

4 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 15 Apr 2010, 07:50 AM
Hello John Mark Mikhail,

How is the control in question databound? How and where is its datasource set? Are you resetting the datasource in any other event?

Regards,
Yavor
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
John Mark Mikhail
Top achievements
Rank 1
answered on 16 Apr 2010, 12:19 AM
All of the radgrid controls are bounded via the NeedDataSource event. There is no other binding on the page.
0
Yavor
Telerik team
answered on 21 Apr 2010, 06:54 AM
Hi John Mark,

In this case, the best option would be for you to open a formal support ticket, and send us the problematic code, in the form of a small working project. We will debug it locally, and get back to you with more information on the matter.

Regards,
Yavor
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Paul
Top achievements
Rank 1
answered on 14 Dec 2011, 06:08 PM
I was having the same problem (Grid not refreshing)...

The tricks is to set the RadGrid1.DataSource = null and RadGrid1.Rebind() --- Solve the problem.
Tags
Grid
Asked by
John Mark Mikhail
Top achievements
Rank 1
Answers by
Yavor
Telerik team
John Mark Mikhail
Top achievements
Rank 1
Paul
Top achievements
Rank 1
Share this question
or