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

Addnewrecord set defaults with batch edit

1 Answer 11 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 03 Feb 2015, 01:58 PM
Hi

I am need to add a new row and then setup some default values while using batch edit.  The code below causes problems once it has executed.  It executes fine but seems to not save the values properly.  Could someone verify if I am setting the column data properly with the last two lines?

Many thanks,

Jon
  var uxRadGrid = $find("<%=uxRadGrid.ClientID%>");
  var uxRadGrid_MasterTable = uxRadGrid.get_masterTableView();
  var uxRadGrid_batchEditingManager = uxRadGrid.get_batchEditingManager();
  uxRadGrid_batchEditingManager.addNewRecord(uxRadGrid_MasterTable);
 
  var uxRadGrid_MasterTable_row = uxRadGrid_MasterTable.get_dataItems()[0];
//  uxRadGrid_MasterTable_row.get_cell("BudgetValue").innerText = '£0.00';
  //uxRadGrid_MasterTable_row.get_cell("BudgetDetailId").innerText = ' ';
  uxRadGrid_MasterTable_row.get_cell("CategoryId").innerText = idValue;
  uxRadGrid_MasterTable_row.get_cell("Category").innerText = textValue;

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 06 Feb 2015, 12:07 PM
Hello Jon,

In this case you should try using the changeCellValue method:
http://www.telerik.com/forums/radgrid-client-side-batchediting-event#N7TIb03wxk6Wwet_qDgy2Q

Hope this helps.

Regards,
Eyup
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Jon
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or