girddata vanishes during paging using c#

Posted by Deepakji under ASP.NET on 5/4/2012 | Points: 10 | Views : 733 | Status : [Member] | Replies : 3
hi, i am working with gird view i am able to generate the gridview which has data from database as well as dynamic generatedata but while paging its vanishing the dymanic data

i am sending the code also in zip file




Responses

Posted by: Patil_Rakesh on: 5/4/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,
add the following event in your .cs file..


protected void gvResult1_PageIndexChanging1(object sender, GridViewPageEventArgs e)
{
gvResult1.PageIndex = e.NewPageIndex;

//call databinding method once-again
}



Deepakji, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Deepakji on: 5/4/2012 [Member] Starter | Points: 25

Up
0
Down
i have added it previously but then also its showing problem

Deepakji, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Patil_Rakesh on: 5/4/2012 [Member] Starter | Points: 25

Up
0
Down
Try this while binding values to gridview,

Bind("column name in dataset")

rather than,
Container.DataItemIndex

Hope, this will help you.

Deepakji, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response