This is a migrated thread and some comments may be shown as answers.

[Solved] Handle Event central

1 Answer 75 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Berthold
Top achievements
Rank 1
Berthold asked on 31 Jan 2011, 06:27 PM
Hi,
is it possible to handle an event of a grid in one class ?

Currently I've added it on each view, e.g.:

....          
    _grid.Sorting += new EventHandler<GridViewSortingEventArgs>(_grid_Sorting);
  }

  void _grid_Sorting(object sender, GridViewSortingEventArgs e)
  {
            _grid.CommitEdit();
            e.Cancel = dataSource.HasChanges
      }

Remarks: dataSource is typ of DomainDataSource.  I not only want to prevent sorting when CanLoad is false, but implement save and the pending sort as well

Thanks
Berthold

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 01 Feb 2011, 08:11 AM
Hello Berthold,

 Why not do this with attached behavior? You can check this demo for more info about this technique.

All the best,
Vlad
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
GridView
Asked by
Berthold
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or