girish
girish

Reputation: 731

datagrid speed issue

i m binding gridview in asp.net application... i m about to bind some thousand records in datagrid... on RowDataBound event of the grid i need to check if the log in user is authorised to view the perticuler record...so i need to send database request...like wise such other two to three operation requires to send request to database....

about three to four request are sended to database during each row bound of the gridview...is it effective on speed of the grid?

Upvotes: 0

Views: 87

Answers (2)

Xulfee
Xulfee

Reputation: 986

First of all turn off your ViewState for the grid as you are bidding the rows.

Upvotes: 0

Daniel Dyson
Daniel Dyson

Reputation: 13230

You are performing your permission checks too late. Filter the data before you try to bind it to the grid. Preferably on the initial data access.

Upvotes: 2

Related Questions