Insert Record Form Panel

Page 2 of 2 FirstFirst 12
  1. #11

    Form view example does not help

    Daniil,

    I've been over that example and found that it does not help.

    I've provided a comprehensive code example here: http://forums.ext.net/showthread.php...6202#post56202

    I've also attempted to manually create a record and insert it into the store, then call Store1.save() with no luck - if you could show me how the above example should be modified to work, that would make my day.

    Just so you know, we are creating a product that we plan to resell and will be purchasing the tools + support as long as we know they are capable of doing what we want. We need to scale - i don't want to have to create a hidden grid control just to get this working - i have yet to find an example of a FormPanel + Store + SqlDataSource being used to provide data i/o.

    Thank you!
  2. #12
    Ok

    The first thing I should say - it must work without GridPanel, the key thing is a store.

    Regarding the sample you posted in that thread.

    I believe the database is not required to reproduce the problem. The last time I'm very rarely works with databases and I even have no MS SQL Server on my currect PC. I have a MySQL server instance, but it shows me SQL syntax error when I'm trying the SQL script you provided. Another problem which may take some time - connection string. I'd really like to avoid it.

    Can you create a sample without depending on database, which I can copy, paste and run?
  3. #13

    think a DB is required

    Since it uses the SqlDataSource control - i don't think i can provide an example that doesn't use it.

    However, your comment made me focus a little more on the actual communication between the client and server - this is what i found when the Store.save() event fires:

    Process_CD:	1
    Process_Type_1_ID:	
    __EVENTARGUMENT:	cfveStore|postback|update
    __EVENTTARGET:	ResourceManager2
    fld_1_23_CD:	Sanborn North
    fld_1_23_CD:_SelIndex	1
    fld_1_23_CD_Value:	3
    fld_2:	asdasd
    fld_3:	asdasd
    fld_4:	asdasdasd
    fld_5_29_CD:	
    fld_5_29_CD_SelIndex:	-1
    fld_5_29_CD_Value:	
    submitDirectEventConfig:	{"config":{"serviceParams":"{\"Updated\":[{\"Process_Type_1_ID\":-1,\"Process_CD\":1,\"fld_1_23_CD\":3,\"fld_2\":\"asdasd\",\"fld_3\":\"asdasd\",\"fld_4\":\"asdasdasd\"}]}"}}
    Most useful is probably the submitDirectEventConfig parameter - does this tell you anything?
  4. #14
    I see only "Updated" section, must be "Created" one also if a new record was added.

    Lets consider
    https://examples1.ext.net/#/GridPane...SqlDataSource/

    If you'd insert a record, you will see something like this:
    {"config":{"serviceParams":"{\"Created\":[{\"CompanyName\":\"dsf\",\"ContactName\":\"\",\"ContactTitle\":\"\",\"Address\":\"\",\"City\":\"\",\"Region\":\"Alabama (AL)\",\"PostalCode\":\"\",\"Country\":\"\",\"Phone\":\"\",\"Fax\":\"\",\"SupplierID\":-66}]}"}}
    I see that you pass 'true' as the second parameter.
    #{Store1}.addRecord(#{FormPanel1}.getForm().getFieldValues(false, 'dataIndex'), true, true);
    It causes that this record passes as "updated" one.

    Try to pass "false".
    #{Store1}.addRecord(#{FormPanel1}.getForm().getFieldValues(false, 'dataIndex'), false, true);
  5. #15

    YESSSS!!!!

    You are my Hero Daniil!!

    that parameter change is what i needed!

    Thank you thank you thank you!

    Mark this one CLOSED!
  6. #16
    I'm glad to help!:) You was really insightful when posted an ajax request's content!

    In the future please feel free to bump threads where you makes the initial post in according to this guide:
    Forum Guidelines For Posting New Topics
    and provide us with all additional info we requests.

    Just sometimes we are too busy with our main priorities: the Premium Help forum, and the toolkit - new features, bug fixing.

    Please note that Premium Help is for support subscription owners and maximum initial response time is 24 hour. But almost always this time is much smaller. I believe you would get a solution during one-two working days:)
  7. #17

    Store.addRecord documentation?

    Daniil -

    Last question on this one - How would i know what the parameters mean for this method call? I see in the sencha documents a method called "add()" - but no addRecord (I assume this is an Ext.NET method).

    Any assistance regarding where to find documentation would be great - i have been looking here:
    http://dev.sencha.com/deploy/ext-3.3.1/docs/
  8. #18
    Yes, it's Ext.Net method. We have no docs like ExtJS ones.

    So, the sources and the forums are at your service. Just review .addRecord() in the Ext.Net sources.
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Insert record with linked GridPanels
    By ElArZ in forum 1.x Help
    Replies: 3
    Last Post: Feb 17, 2012, 3:38 PM
  2. Replies: 1
    Last Post: Aug 04, 2011, 10:14 PM
  3. [CLOSED] Insert Grid Record - Edit First Cell?
    By peter.campbell in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: May 10, 2011, 11:01 AM
  4. [CLOSED] insert record
    By 78fede78 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Oct 12, 2010, 4:08 PM
  5. [CLOSED] Insert Record into grid
    By sharif in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 08, 2010, 2:16 PM

Posting Permissions