AllowCustomPaging must be true and VirtualItemCount must be set for a DataGrid

Have you ever stuck up this error ? If yes you need to recheck the way you are binding datagrid. This error comes when you bind datagrid using a datareader. Because datareader is forward only. So paging backwards won’t work. To make datagrid paging work, bind it using a Datatable.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s