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

Grid not Showing

1 Answer 112 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Joby
Top achievements
Rank 1
Joby asked on 15 Nov 2010, 08:25 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?

Here is my code:---

SqlHelper objSQL = new SqlHelper();
                DataSet dsPackage = new DataSet();
                dsPackage = objSQL.ExecuteDataset("AL_PackageType_List_Retrieve",
                                                 objUtl.NumericEntry(Session["LocationId"].ToString()));
                gvPackage.DataSource = dsPackage.Tables[0];

//Here i can see the number of rows.Total 10
                gvPackage.Rebind();
                //dsPackage.Dispose();
                if (gvPackage.Items.Count <= 0)
                {
                    lblMessage.Text = "No Package Details Found...";
                    gvPackage.Visible = false;
                }
                else
                {
                    gvPackage.Visible = true;
                }

Thank you

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 15 Nov 2010, 11:37 AM
Hello Joym,


Use the AdvancedDataBinding technology using NeedDataSource event to populate the grid.
More information about advanced data-binding will be available here:
Demo
documentation


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