Worth the discussion
what are the pro's / Con's of firing the RowClick event from a telerik radgrid with following scenario's, they all work btw ;-)
Scenario 1:
Radgrid
OnSelectedIndexChanged="RG_SelectedIndexChanged"
ClientSettings.EnablePostBackOnRowClick="true"
Code behind
protected void RG_SelectedIndexChanged(){}
Scenario 2:
Radgrid
OnItemCommand="RG_ItemCommand"
ClientSettings.EnablePostBackOnRowClick="true"
Code Behind
Protected void RG_ItemCommand()
{
if(e.commandname == "RowClick")
{
}
}
Scenario 3:
Radgrid
OnItemCommand="RG_ItemCommand"
ClientSettings.ClientEvents.OnRowClick="RG_RowClick"
Javascript
function RG_RowClick(sender, eventArgs) {
var index = eventArgs.get_itemIndexHierarchical();
sender.get_masterTableView().fireCommand("RowClick", index);
}
Behind
Protected void RG_ItemCommand()
{
if(e.commandname == "RowClick")
{
}
}