ar.gorgin
ar.gorgin

Reputation: 5002

Callbacks are not supported on Templatefield

I am working with a GridView and an ObjectDataSource with templatefield. I am implementing Sorting.

I have a checkbox field in grid view for select a row and set autopostback=true.

When i checked checkbox and postback , templatefield don't show. If

EnableSortingAndPagingCallbacks = True;

I get exception:

NotSupportedException: Callbacks are not supported on TemplateField because some controls cannot update properly in a callback. Turn callbacks off on GridView.

Upvotes: 0

Views: 4477

Answers (1)

Yigit Pilevne
Yigit Pilevne

Reputation: 555

From documentation.

All columns in the Columns collection must support callbacks for this feature to work. If the Columns collection contains a column that does not support callbacks, such as TemplateField, a NotSupportedException exception is raised

Use this MSDN link for details.

Upvotes: 1

Related Questions