What is the best way to submit Empty values in the Two Grid Sample?

  1. #1

    What is the best way to submit Empty values in the Two Grid Sample?

    Hi

    I'm trying to use approach from Two Grid Sample,
    I move record from one grid to the second, click Submit, Submit was successfull.

    Now I move record back, so second grid is empty, also I need to let server know about this event, but clicking on Submit do nothing.

    It can be reproduced on Two Grid sample itself.

    Should I check record count in the grid and if 0, then insert fake empty record and submitData, on the server side I will check fake record and clear appropriate table? Don't like this approach, maybe there is exists a better way?

    Thanks
  2. #2
    Anybody knows?
    I really need to know, pretty urgent.
  3. #3
    Hi,

    If there is no data in grid, the .submitData() does nothing.

    You could check grid.store.getCount(). If it's 0, you could use DirectMethod to pass this info on a server.
  4. #4
    I thought this record will be moved to the deleted collection, and send to the server

    so on server side I can extract it something like this

    var data = dataHandler.ObjectData<...>();
    foreach (var item in data.Deleted)
    {
    }
    Repeat myself, .submitData() passes the grid's data to a server.

    To pass modified, deleted, new records, you could use grid.save() method. But it doesn't pass records which was not changed.
    Last edited by Daniil; Mar 25, 2011 at 10:12 AM.

Similar Threads

  1. [CLOSED] Getting Empty values from all fields .(AddEvent : Calender)
    By Suntico in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Aug 19, 2011, 2:11 PM
  2. [CLOSED] Gride columns with empty values usingr change event.
    By flormariafr in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Aug 25, 2010, 1:15 PM
  3. [CLOSED] Empty values from text fields
    By CSG in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Apr 21, 2009, 10:14 AM
  4. [CLOSED] Submit FormPanel values via AjaxEvent
    By danielg in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Mar 12, 2009, 8:40 AM

Posting Permissions