Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
UltraWebGrid custom paging
posted

This is Naresh Kumar,

Working as SSE in a Software Company.

I am using Infragistics Control UltraWebGrid to display record.

My dataset is so heave. return approximate 20000 record. so my pages is loading very slow.

My need is get only 10 or 20 record on every database hit.

with show all pages in grid footer like

[page:first:First] | [prev] | [1],[2],[3],[4],[5] | [next] | [page:last:Last]

ect..

 

this is very helpful is somebody reply very soon.

its urgent

 

 

 

 

Parents
No Data
Reply
  • 215
    Suggested Answer
    posted

    Hi Dude,

    Earlier I too faced the same issue and I got the solution.

    1.

     

    < igtbl : UltraWebGrid ID ="UltraGridName" runat ="server" OnPageIndexChanged ="UltraGridName_PageIndexChanged"

    2.

    <

     

    DisplayLayout Name ="UltraGridName" ......

     

     

     

     

    < Pager PagerAppearance ="Bottom" AllowPaging ="True" PageSize ="100"

    >

     

     

    < PagerStyle BackColor ="LightGray" BorderStyle ="Solid" BorderWidth

    ="1px">

     

     

    < BorderDetails ColorLeft ="White" ColorTop ="White" WidthLeft ="1px"

     

     

    WidthTop ="1px"

    />

     

     

    </ PagerStyle

    >

     

     

    </ Pager

    >

    3.

    Place dataset or datatable or list values in to Cache and get values from it using

    OnPageIndexChanged

     

    event  in design code.

    4.

    override

     

    protected void OnInit( EventArgs e)

    {

    InitializeComponent();

     

    base .OnInit(e);

    }

     

    private void InitializeComponent()

    {

     

    this .UltraGridName.PageIndexChanged += new Infragistics.WebUI.UltraWebGrid. PageIndexChangedEventHandler ( this .UltraGridName_PageIndexChanged);

    }

     

    protected void UltraGridName_PageIndexChanged( object sender, Infragistics.WebUI.UltraWebGrid. PageEventArgs e)

    {

    Dataset (or) DataTable=FromCache("DataTable");

    UltraGridName.DataSource = Dataset (or) DataTable;

    UltraGridName.DataBind();

     

    }

    This worked for me.Hope it helps

    ---Prakash

Children
No Data