Hi,
I am create one application, In Which I am using datagridview. In this I am use multiple radiobuttons. but at the time of page load it takes more time to bind data to gridview..
how to bind data to gridview quikly..
Please Help Me..
Hi,
I am create one application, In Which I am using datagridview. In this I am use multiple radiobuttons. but at the time of page load it takes more time to bind data to gridview..
how to bind data to gridview quikly..
Please Help Me..
Quick, practical ways to reduce GridView bind time when the page has many radio buttons or heavy rows.
As described, the usual culprits are loading the full resultset every Page_Load, expensive SQL, or rendering lots of per-row server controls. was right that the binding code matters, and ’s dataset suggestion works for small sets but will be slow if you pull everything every request.
Try this checklist (measure first, then apply):
WITH CTE AS (
SELECT ROW_NUMBER() OVER (ORDER BY SomeColumn) AS rn, Col1, Col2
FROM MyTable
WHERE ...
)
SELECT Col1, Col2
FROM CTE
WHERE rn BETWEEN ((@PageIndex-1)*@PageSize)+1 AND (@PageIndex*@PageSize) <asp:GridView ID="GridView1" runat="server" EnableViewState="false" AllowPaging="true" PageSize="20"> Most effective combo: server-side paging + query/index tuning + removing heavy per-row controls. Measure before/after to verify improvements.
Jump to Post— Member #905211Hard to say without see your code. Can you give of some of the code, especially where you get the data and where you bind the data.
Hard to say without see your code. Can you give of some of the code, especially where you get the data and where you bind the data.
Simply you can bind gridview using result dataset...use below code
GridViewCategory.DataSource = result.ResultData;
GridViewCategory.DataBind();
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.