asp.net - GridView pagination performance -
let's have gridview 1.000 rows. , don't want pagination , have rows visible. can 2 things:
set allowpaging="false" (most logical)
or
set allowpaging="true" , higher pagesize total rows: pagesize="9999"
so question if there significant difference in performance between both options , if so, how measure that.
i have been working more 4 years web developer asp.net developer. have used datatables.net. powerful,rich of features , evry easy use.
if gridview has 250 rows max datatable can digest 250 rows. recommed load 250 rows , when user change number of rows can set option of datatable show many records.
once gridview has loaded can apply datatable it.here little example. here jsfiddle
you need set 'pagelength': 25 property decide how many records display. set 250 after user change option no server side call sent.
and use 'lengthmenu' option show number of records show.
$("#tblinfo").datatable({ 'pagelength': 25, 'lengthmenu': [[10, 25, 50, 100, 150, 200, 250], [10, 25, 50, 100, 150, 200, 250]] });
Comments
Post a Comment