-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: Rocking_Start
Message 1 in Discussion

 Hi 

I am building a datagrid dynamically during which I am finding problem while 
paging.

The problem is for example if I am having three pages to be displayed in the 
datagrid, I have set the paging mode to be numeric.
Now I am going to have 1,2,3 for navigation.

The mysterious thing that is happening here when I am clicking 2 or 3, paging 
is happening perfect but when I go back to page 1 after page 2 or 3, the 
PageIndexChanged event is not triggered and I happen to see only the 
information of page 2.

Here with I am attaching the code for this. Please suggest me what has to be 
done regarding this.


Thanks in advance

//DataGrid Settings
dgDetailedDocumentList.CellPadding=2;
dgDetailedDocumentList.CellSpacing=0;
dgDetailedDocumentList.Width=550;
dgDetailedDocumentList.BorderWidth=1;
dgDetailedDocumentList.BorderColor=Color<WBR>Translator<WBR>.FromHtml(<WBR>"Black");
dgDetailedDocumentList.AutoGenerateColum<WBR>ns = false;
               
dgDetailedDocumentList.ForeColor=ColorTr<WBR>anslator.F<WBR>romHtml("B<WBR>lack");
dgDetailedDocumentList.Font.Size=8;
dgDetailedDocumentList.Font.Name="Arial"<WBR>;
dgDetailedDocumentList.AllowSorting=true<WBR>;
dgDetailedDocumentList.ItemStyle.Wrap = false;
               

dgDetailedDocumentList.PageSize = 4;
dgDetailedDocumentList.PagerStyle.Mode = PagerMode.NumericPages;
dgDetailedDocumentList.AllowPaging = true;
dgDetailedDocumentList.EnableViewState = true;

               
//sets the headerstyle
dgDetailedDocumentList.HeaderStyle.BackC<WBR>olor=Color<WBR>Translator<WBR>.FromHtml(<WBR>"333399");
dgDetailedDocumentList.HeaderStyle.ForeC<WBR>olor=Color<WBR>Translator<WBR>.FromHtml(<WBR>"white");
dgDetailedDocumentList.HeaderStyle.Font.<WBR>Name="Aria<WBR>l";
dgDetailedDocumentList.HeaderStyle.Font.<WBR>Size=9;
dgDetailedDocumentList.HeaderStyle.Font.<WBR>Bold=true;
dgDetailedDocumentList.HeaderStyle.Horiz<WBR>ontalAlign<WBR>=Horizonta<WBR>lAlign.Cen<WBR>ter;

//sets the itemstyle
dgDetailedDocumentList.ItemStyle.Horizon<WBR>talAlign=H<WBR>orizontalA<WBR>lign.Left;
dgDetailedDocumentList.SortCommand += new 
dataGridSortCommandEventHandler(dgDetail<WBR>edDocument<WBR>List_SortC<WBR>ommand);
dgDetailedDocumentList.PageIndexChanged +=new 
DataGridPageChangedEventHandler(dgDetail<WBR>edDocument<WBR>List_PageI<WBR>ndexChange<WBR>d);
dgDetailedDocumentList.ItemDataBound +=new 
DataGridItemEventHandler(dgDetailedDocum<WBR>entList_It<WBR>emDataBoun<WBR>d);


public void dgDetailedDocumentList_PageIndexChanged(<WBR>object source, 
System.Web.UI.WebControls.DataGridPageCh<WBR>angedEvent<WBR>Args e)
          {
               dgDetailedDocumentList.CurrentPageIndex = e.NewPageIndex;
               BindDataggrid();
          }

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member 
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you 
received this message by mistake, please click the "Remove" link below. On the 
pre-addressed e-mail message that opens, simply click "Send". Your e-mail 
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to