c# - Repeater with paging through ObjectDataSource -


Is it possible to apply custom paging to the repeater using ObjectDataours:

  EnablePaging = "True" max. Rowspermmentnatal = "max rouz" startAUNDEXAPAM MTN = "startrvindex" selectCoparamp = "total numberofproducts" & gt;  

Or I have to set all the values ​​back in the code and pass the parameter of the ObjectDataSource:

   & Lt; ASP: parameter name = "max rouge" dbtv = "int 32" default value = "10" /> & Lt; / SelectParameters & gt; Repeater does not support paging as 

and you do not use it objectstrokes can do .. .
But if you want to paging, you have to handle at the code level ...
I paging at the code level for the dentists because the donor does not even support paging ...
If you need the code I can provide you .... call bind RPT method when you want to bind the repetitive data, note: handle this example, next, back, last, first button .... if anything is clear No, plz tell me

  private void BindRpt () {PagedDataSource ObjPds; ObjPds = DoPagging (DataTable) ViewState ["dtblProducts"]); DlProducts.DataSourceID = ""; DlProducts.DataSource = ObjPds; DlProducts.DataBind (); } Secure PagedDataSource DoPagging (DataTable dt) {if (dt.Rows.Count> 0) {lblNoRecord.Visible = false; PnlNavigation.Visible = True; PnlTopNavigation.Visible = true; } And {lblNoRecord.Visible = true; PnlNavigation.Visible = false; PnlTopNavigation.Visible = false; } PagedDataSource ObjPagDataSource = New PagedDataSource (); // 'paged data source ObjPagDataSource.DataSource = dt.DefaultView declares; ObjPagDataSource.AllowPaging = true; ObjPagDataSource.PageSize = PgSize; If (hdfPageIndex.Value == "SetLastPageIndex") {CurrentPageIndx = ObjPagDataSource.PageCount - 1; ObjPagDataSource.CurrentPageIndex = ObjPagDataSource.PageCount - 1; } And {ObjPagDataSource.CurrentPageIndex = CurrentPageIndx; } If (ObjPagDataSource.PageCount> 1) {if (ObjPagDataSource.IsFirstPage == true) {ibtnLast.Enabled = true; IbtnFirst.Enabled = false; IbtnPrevious.Enabled = false; IbtnNext.Enabled = true; IbtnLastTop.Enabled = true; IbtnFirstTop.Enabled = false; IbtnPreviousTop.Enabled = false; IbtnNextTop.Enabled = true; } And if (ObjPagDataSource.IsLastPage == true) {ibtnFirst.Enabled = true; IbtnLast.Enabled = false; IbtnNext.Enabled = false; IbtnPrevious.Enabled = true; IbtnFirstTop.Enabled = true; IbtnLastTop.Enabled = false; IbtnNextTop.Enabled = false; IbtnPreviousTop.Enabled = true; } Else {ibtnFirst.Enabled = true; IbtnPrevious.Enabled = true; IbtnNext.Enabled = true; IbtnLast.Enabled = true; IbtnFirstTop.Enabled = true; IbtnPreviousTop.Enabled = true; IbtnNextTop.Enabled = true; IbtnLastTop.Enabled = true; }} And {ibtnFirst.Enabled = false; IbtnLast.Enabled = false; IbtnPrevious.Enabled = false; IbtnNext.Enabled = false; IbtnFirstTop.Enabled = false; IbtnLastTop.Enabled = false; IbtnPreviousTop.Enabled = false; IbtnNextTop.Enabled = false; } Return ObjPagDataSource; } Public In Current Page Index {{System. Object o = it. Vuestet ["_ current page index"]; If returned (o == empty) 0; And return convert ToInt32 (o); } Set {viewstate ["_ _ _ _ _ _ _"] = value; }} Secure void ibtnFirst_Click (Object Sender, ImageClickEventArgs e) {hdfPageIndex.Value = ""; Current page = 0; BindRpt (); } Secure void ibtnPrevious_Click (Object Sender, ImageClickEventArgs e) {hdfPageIndex.Value = ""; Current page = current page = 1; BindRpt (); } Secure Zero ibtnNext_Click (Object Sender, ImageClickEventArgs e) {hdfPageIndex.Value = ""; Current page = index = current page + 1; BindRpt (); } Secure Zero ibtnLast_Click (Object Sender, ImageClickEventArgs e) {hdfPageIndex.Value = "SetLastPageIndex"; BindRpt (); }  

Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -