Ext1 Grid Panel Insert Record Issue

  1. #1

    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:

    You have uncommitted changes. Are you sure you want to reload data?
    store code:
    <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"
    it prevents the prompt but gives errory

    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?
  2. #2

    just changed a propert and it is working now

    i just removed this property of store and it is working now, need further testing but for the time, it is working:
    RemoteSort="true"

Similar Threads

  1. Insert and update grid record from Javascript
    By SaleCar in forum 3.x Help
    Replies: 1
    Last Post: Apr 27, 2015, 7:20 PM
  2. Replies: 4
    Last Post: Oct 07, 2011, 11:49 AM
  3. Insert Record Form Panel
    By lindgrenm in forum 1.x Help
    Replies: 17
    Last Post: May 17, 2011, 8:01 PM
  4. [CLOSED] Insert Grid Record - Edit First Cell?
    By peter.campbell in forum 1.x Premium Help
    Replies: 3
    Last Post: May 10, 2011, 12:01 PM
  5. [CLOSED] Insert Record into grid
    By sharif in forum 1.x Premium Help
    Replies: 2
    Last Post: Apr 08, 2010, 3:16 PM

Tags for this Thread

Posting Permissions