Title: Deleting rows in a grid with multiple IDs Post by: jherrera on July 24, 2013, 04:46:27 AM Hi,
I've some grids where I have more than one ID field. For example, one of my grids has a column called order_id and another one called order_item_id (both fields are part of the PK of my order_items table in the backend). The values for those two columns must be sent to the server when I want to delete a row but, in the standard grid definition, I can only use one field as "idField". Which is the best way to handle row deletions on tables where there's more than one idField? Thanks in advance. Title: Re: Deleting rows in a grid with multiple IDs Post by: stworthy on July 24, 2013, 07:53:27 AM Get a specified row and you will be able to post any fields to server. The code below shows how to delete the selected row.
Code: var row = $('#dg').datagrid('getSelected'); Title: Re: Deleting rows in a grid with multiple IDs Post by: jherrera on July 25, 2013, 07:25:24 AM Thanks! It worked like a charm.
|