May 16, 2019, 9:38 AM
Ext1 Grid Panel Insert Record Issue
I am using Ext1 controls and visual studio 2015. I had a grid which was working fine before applying grouping. I have an "Add" button to insert a new record in grid. before applying "GroupField" property of store, the insert code was working fine but after applying grouping, it inserts a record but also displays following prompt:
store code:
it prevents the prompt but gives errory
You have uncommitted changes. Are you sure you want to reload data?
<ext:Store
ID="dsObjectives"
IDMode="Explicit"
AutoLoad="false"
runat="server"
RemoteSort="true"
UseIdConfirmation="true" GroupField="ObjectiveTypeDesc">
script code to insert a record: var InsertNewRecord = function(){
var pos;
pos = #{grdObjectives}.insertRecord(0,{});
//pos = #{grdObjectives}.addRecord({});
#{grdObjectives}.getView().focusRow(pos);
#{grdObjectives}.getRowEditor().startEditing(pos);
#{CmbObjectives}.setDisabled(false);
}
i also tried to use "addRecord()" but issue remains same. Further, i also tried
WarningOnDirty="false"
The parameters dictionary contains a null entry for parameter 'limit' of non-nullable type 'System.Int32' for method 'Ext.Net.MVC.AjaxStoreResult GetObjectiveAppraisalDet(System.String, Int32, Int32, System.String, System.String)' in 'SmartHCM.Controllers.HrsController'. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter.
Rest works fine, it also inserts a record and when I give some data in that record it also reflects in database. I guess the grid is reloading the data and submitting null values to function. any idea?