Hi,
I want to set default values to the new record created in my listgrid.
I added a roweditorhandler to the listgrid.
In the onRowEditorEnter method of the handler class, I am trying to set the value of the field by using:
When I run my application, and start editing a new record, I get the following exception:
Any ideas on how o solve this issue or on how to set the default value for a field in a new list grid record?
Thanks.
I want to set default values to the new record created in my listgrid.
I added a roweditorhandler to the listgrid.
In the onRowEditorEnter method of the handler class, I am trying to set the value of the field by using:
Code:
event.getRecord().setAttribute("fieldName", "testDefault")
Code:
Uncaught JavaScript exception [com.google.gwt.core.client.JavaScriptException: (TypeError): Object expected number: -2146823281 description: Object expected at com.smartgwt.client.util.JSOHelper.setAttribute(Native Method) at com.smartgwt.client.core.DataClass.setAttribute(DataClass.java:47) at com.sns.crm.opportunities.client.Opportunities$11$1.onRowEditorEnter(Opportunities.java:865) at com.smartgwt.client.widgets.grid.events.RowEditorEnterEvent.dispatch(RowEditorEnterEvent.java:96) at com.smartgwt.client.widgets.grid.events.RowEditorEnterEvent.dispatch(RowEditorEnterEvent.java:1) at com.google.gwt.event.shared.HandlerManager$HandlerRegistry.fireEvent(HandlerManager.java:65) at com.google.gwt.event.shared.HandlerManager$HandlerRegistry.access$1(HandlerManager.java:53) at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:178) at com.smartgwt.client.widgets.BaseWidget.fireEvent(BaseWidget.java:66)] in http://localhost:8890/com..mainmenu.MainMenu/hosted.html?com__mainmenu_MainMenu, line 9
Thanks.
Comment