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
240
Auto CRUD on edit won't always update database
posted

I am using AutoCRUD functionality.
I have created a couple of SQLDataSource with Insert, Update and Delete auto geerated,
they are then used as relational tables in a WebHierarchicalDataSource 
Which then is used to link to the grid; the data is loaded correctly, I can add a new row correctly and I can delete a row by selecting it.
The problem is when I want to edit the row when I double click a cell it goes in the edit mode and allows me to type the text in (change the text), then I hit the enter button to confirm the changes. This doesn't updates the database right a way, even if I select another row the changes text is displyed in the grid but not updated in the database, Now if I do some other thing like expand collapse the child rows then the data is updated in the database.

I am now clueless what triggers the update in the database? is there any seetings required?

I tried setting the Edit Grid Baviour -> Activation -> AutoPostBackFlags -> ActiveCellChanged -> True, but this doesn't work either. Pease help me how can I make this work. I also made sure that the bands have the DataKeyFields poperty correctly set. Please help.

thanks

D

 

Parents
  • 5739
    posted

    Hi,

    This is a bit of a hassle in the WDG and WHDG.  Any postback will update your datasources. Ajax postbacks of the grid will also update the datasources.  That's the easiest way.  The other way is to handle some of the client side events on leaving edit mode or leaving the row and then forcing the postback yourself with something like:

    grid.get_behaviors().get_editingCore().commit();

    Then, you might run into the problem that many of us have that the above line doesn't cause the postback like they (Infragistics forum people)  say it should. There's at least 5 or 6 posts complaining about it, but I don't know of a response.

    I hope this will be helpful,

    Ed


Reply Children