I need to update one row of RadGrid after ajax call.
I get correct dataItem by rowIndex:
var dataItem = $find("<%= MyGrid.ClientID %>").get_masterTableView().get_dataItems()[radGridRowIndex];
But then it's a total mess!
I have tried a lot of ways to get correct cell to update its value, but in vain:
<telerik:GridBoundColumn HeaderStyle-CssClass='GridHeaderGreen la gridBottomHeaderGreen' ItemStyle-CssClass='la' DataField="CounterName" HeaderText="Performance counter" />
dataItem["CounterName"]
dataItem.get_dataItem()["CounterName"]
dataItem.CounterName
dataItem.get_dataItem().CounterName
I have also tried to use UniqueColumn name = DataField and apply get_cell method, but also in vain.
I can use GridTemplateColumn instead, but it will generate more markup (will add span inside td), I wanted to avoid this.
p.s. Had to use UniqueColumnName everywhere. And did
$($find("<%= MyGrid.ClientID %>").get_masterTableView().getCellByColumnUniqueName(dataItem, "CounterName")).text(bla-bla-bla);
I get correct dataItem by rowIndex:
var dataItem = $find("<%= MyGrid.ClientID %>").get_masterTableView().get_dataItems()[radGridRowIndex];
But then it's a total mess!
I have tried a lot of ways to get correct cell to update its value, but in vain:
<telerik:GridBoundColumn HeaderStyle-CssClass='GridHeaderGreen la gridBottomHeaderGreen' ItemStyle-CssClass='la' DataField="CounterName" HeaderText="Performance counter" />
dataItem["CounterName"]
dataItem.get_dataItem()["CounterName"]
dataItem.CounterName
dataItem.get_dataItem().CounterName
I have also tried to use UniqueColumn name = DataField and apply get_cell method, but also in vain.
I can use GridTemplateColumn instead, but it will generate more markup (will add span inside td), I wanted to avoid this.
p.s. Had to use UniqueColumnName everywhere. And did
$($find("<%= MyGrid.ClientID %>").get_masterTableView().getCellByColumnUniqueName(dataItem, "CounterName")).text(bla-bla-bla);