Using DevExpress's GridView, I would like to trigger a (clientside) event when a cell is selected (or simply clicked on).
There already is a way to get the click events for an entire row, but neither fiddling around nor the documentation gives me any clue how to achieve this for cells.
This is what I have for rows:
Html.DevExpress().GridView(settings =>
{
// removed a lot of code here
settings.ClientSideEvents.RowDblClick = "OnGridRowDblClick";
}).Bind(Model).GetHtml()
Which will cause the javascript function OnGridRowDblClick
to be called when a row is double clicked. Ideally there should be something like
settings.ClientSideEvents.CellClick = "OnCellClick";
However, this does not exist, nor can I find anything to achieve this.
See Question&Answers more detail:os