Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1355
could not setcellvalue for hidden column igGridUpdating
posted

hello

can you help me!

I have an igGrid with updating feature and I have 2 hidden column.

on event editRowEnded I want to set cell value for that 2 hidden column but I can do it.

I recieve an error "The specified record or property was not found. Verify the criteria for your search and adjust them if necessary."

I'm using infragistics 15.2 build 2146

How can i fix this issue?

thank you very much!

Parents
  • 17590
    Offline posted

    Hello Cuong,

    Thank you for posting in our community.

    What I can suggest for achieving your requirement is modifying the value for the desired hidden column via using values collection in the editRowEnding event. For example:

     $("#grid").igGrid({
                    columns: [
         { headerText: "ID", key: "ProductID", dataType: "number", width:"50px" },
         { headerText: "Product Name", key: "Name", dataType: "string",  width:"200px"  },
         { headerText: "Make Flag", key: "MakeFlag", dataType: "bool",  width:"80px"  },
         { headerText: "Sell Start Date", key: "SellStartDate", dataType: "date",  width:"350px"  },
         { headerText: "Price", key: "ListPrice", dataType: "number",  width:"100px"  },
                 ],
                    autoGenerateColumns: false,
        autofitLastColumn : true,
        autoCommit:true,
                    dataSource: adventureWorks ,
                    width: "600px",
                    height: "600px",
        primaryKey: "ProductID",
                    features: [
        {
         name: "Updating",
         editRowEnding: function(evt, ui){
          ui.values["Name"] = "NEW VALUE";
         }
        },
        {
         name: "Hiding",
         columnSettings: [
           {
            columnKey: "Name",
            hidden: true
           }
          ]
        }
                    ]
                });

    I am attaching a small sample illustrating my suggestion for your reference. In my sample "Name" column is initially hidden. When a row is modified in the editRowEnding event handler I am setting a value for this hidden column. Afterwards, I am showing this column and the value is successfully changed.

    Please have a look at my sample. If this is not an accurate demonstration of what you are trying to achieve please feel free to modify my sample and send it back to me along with steps to reproduce and I will investigate this matter further.

    Please feel free to continue sending updates to this case at any time.

    igGridSetHiddenValues.zip
Reply Children