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
110
Updating Row/Cell when key is uniqueidentifier?
posted

Hello,

I am trying to use the WebDataGrid to update some backend support tables in a small web application for our I.S. staff but having issues getting the updates to occur. No errors are being thrown but the update simply doesn't happen. I have the DataKeyFields set and the OnRowUpdating method defined as indicated in the documentation.

Upon doing some of my own research, I suspect perhaps it has something to do with the fact that my primary key is of the datatype uniqueidentifier and there is another column in the same table holding a foreign key that is also a uniqueidentifier. Apparently there are some issues using this but I'm not sure how to get around them.

Has anyone gotten the update function to work in the WebDataGrid with uniqueidentifiers as the keys?

Parents
No Data
Reply
  • 2783
    posted

    Hi Craig,

    Does your database table have a Composite Primary Key?  Or is the Foreign key that you are talking about not used in the primary key for the table you are trying to update?

    If the foreign key is part of the Composite key make sure you indicate it as a primary key for the table on the grid as well.  This can be done like so: DataKeyFields="Column1,Column2"

    If the foreign key is not part of the composite key, then try to turn off cell editing for the column that holds the foreign key.  This can be done by adding a EditingColumnSetting on the Editing behavior, like so:
    <ig:EditingCore>
     <Behaviors>
      <ig:CellEditing>
       <ColumnSettings>
        <ig:EditingColumnSetting ColumnKey="Column 2" ReadOnly="True" />
       </ColumnSettings>
      </ig:CellEditing>
     </Behaviors>
    </ig:EditingCore>

    Regards,

    Olga

Children