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

RadGrid not showing after Deletion

1 Answer 98 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Joby
Top achievements
Rank 1
Joby asked on 15 Nov 2010, 07:32 AM
Hi, I have one telerik rad grid.Using a method i am filling the grid.I have enabled paging property.I have used itemtemplate-->ImageButton for delete and edit options.I have set page size as 10.Page load time it is working properly and populating the grid.After inserting 11 th row the pagination starts and it will show in next page with one record.But when i am deleting the 11th row the grid become blank.I have used dataset to bind the records. radgrid.DataBind(); dsDataset.Dispose();. But its item.count is 0. What is the reason?
This is my code

DataSet

 

dsPackage= new DataSet();

 

dsPackage = objSQL.ExecuteDataset(

"AL_PackageType_List_Retrieve",

 

objUtl.NumericEntry(Session[

"LocationId"].ToString()));

 

gvPackage.DataSource = dsPackage.Tables[0];

gvPackage.DataBind();

 

dsPackage.Dispose();

 

 

if (gvPackage.Items.Count <= 0)

 

{

lblMessage.Text =

"No Package Details Found...";

 

gvPackage.Visible =

false;

 

}

 

else

 

{

gvPackage.Visible =

true;

 

}

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 16 Nov 2010, 04:33 PM
Hi Joby,

Modify your code to use either NeedDataSource binding (preferably) or assign a data source for the grid and see whether this helps.

Regards,
Pavlina
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
General Discussions
Asked by
Joby
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or