This question is locked. New answers and comments are not allowed.
Hello,
In my Project i want to set the forms with special values, when the user insert a new record. I use the InCellEditing Mode. I foundthe following code in the Grid-API. But this code do not work, because the $(form).find() will not find the form. I think this is because in the InCellEditing Mode the Forms are not "active" when i add a new record.
Have somebody an Idea how i can set the form controls/values via javascript when using InCellEditing Mode?
In my Project i want to set the forms with special values, when the user insert a new record. I use the InCellEditing Mode. I foundthe following code in the Grid-API. But this code do not work, because the $(form).find() will not find the form. I think this is because in the InCellEditing Mode the Forms are not "active" when i add a new record.
<script type="text/javascript">function Grid_onEdit(e) { var dataItem = e.dataItem; var mode = e.mode; var form = e.form; var priceTextBox = $(form).find("#Price"); if (mode == "insert") { // Set default value priceTextBox.val("Enter price"); } var customerDropDownList = $(form).find("#Customer"); if (mode == "edit") { //Select the proper dropdown list item customerDropDownList.val(dataItem.CustomerID); }}</script>Have somebody an Idea how i can set the form controls/values via javascript when using InCellEditing Mode?