[CLOSED] Json max length

Page 1 of 2 12 LastLast
  1. #1

    [CLOSED] Json max length

    Currently I take value from gridpanel on button direct event with bellow code.
     de.Click.ExtraParams.Add(new Parameter
                                        {
    
                                            Name = "values",
                                            Value = "Ext.encode(#{GridPanel1}.getRowsValues())",
                                            Mode = ParameterMode.Raw
                                        });
    its give a JSON format data in code behind


    [{"MaterialCode":"MOB","ReqMaterialID":0,"MaterialCatergoryID":2,"MaterialID":1,"UOMCode":2,"AvaiableStock":2,"RequireQTY":0,"Moveing_Average_Price":200,"TotalValue":0},{"MaterialCode":"P1","ReqMaterialID":0,"MaterialCatergoryID":2,"MaterialID":2,"UOMCode":3,"AvaiableStock":1,"RequireQTY":0,"Moveing_Average_Price":500,"TotalValue":0}]
    please let me know,if the data volume increase then I will not get all records because of MaxJsonLength property,then how I solve this situation.
    Last edited by Daniil; Aug 05, 2014 at 1:00 PM. Reason: [CLOSED]
  2. #2
    There is no MaxJsonLength on the client side
    Vladimir Shcheglov
    Sr. Developer
  3. #3
    The property MaxJsonLength not related to EXT.Net its related to Microsoft . I found http://msdn.microsoft.com/en-us/libr...vs.110%29.aspx where I will see The default is 2097152 characters,
    but the characters can be increase,can you please advice what I do in this situation
  4. #4
    Ext.Net doesn't use Microsoft serializer, so that property will not affect on Ext.Net behaviour
    Vladimir Shcheglov
    Sr. Developer
  5. #5
    thanks for your reply,so now we can transmit any amount of data with JSON,which is very good news.
  6. #6
    In any way, i don't recommend to transmit such amount of data because you can easly to break down of browser
    I don't know cases when such amount of data to be required,

    - do not bind many records to a grid, use remote paging, user cannot operate by thousands records at one time
    - if you bind many records then do not send all of them to the server, send back only changed records because non changed records can be retrieved on the server side (from DB or other storages)
    Vladimir Shcheglov
    Sr. Developer
  7. #7
    thanks for your suggestion.
    actually I will not use json for display data in grid.

    I have an order entry form,in this page I take a grid,user fill this grid and save record,currently I am not worried because now they enter small amount of data like 50-100 rows ,but I think about future then data will be huge may be 500 and more rows and 15-20 columns in grid.can you please advice what is best dos and don's
  8. #8
    Well, if all records are added by user then there is no another way
    Are you sure that user can add 500 records manually?
    In any way, 500 records is not a problem to submit to the server
    Vladimir Shcheglov
    Sr. Developer
  9. #9
    yes ,because previously they do this manually and now they automate there system,so they manually add there old records.and I told 500 or more rows of records in JSON format ,like bellow.this is sample of 2 rows .Is Ext.Net json support set of 500 data like bellow?
    [{"MaterialCode":"MOB","ReqMaterialID":0,"MaterialCatergoryID":2,"MaterialID":1,"UOMCode":2,"AvaiableStock":2,"RequireQTY":0,"Moveing_Average_Price":200,"TotalValue":0},{"MaterialCode":"P1","ReqMaterialID":0,"MaterialCatergoryID":2,"MaterialID":2,"UOMCode":3,"AvaiableStock":1,"RequireQTY":0,"Moveing_Average_Price":500,"TotalValue":0}]
  10. #10
    It is a valid JSON object and Ext.NET should not have any problem with that. If it does, please provide a test case to reproduce it.
Page 1 of 2 12 LastLast

Similar Threads

  1. About label text's length
    By kulolo in forum 2.x Help
    Replies: 1
    Last Post: Oct 21, 2013, 3:54 PM
  2. length with TextField
    By zhdl in forum 2.x Help
    Replies: 0
    Last Post: Aug 30, 2012, 1:28 AM
  3. About store Field length
    By supermanok in forum 1.x Help
    Replies: 1
    Last Post: Jul 20, 2009, 8:46 AM
  4. set the length for TextArea
    By Dinesh.T in forum 1.x Help
    Replies: 4
    Last Post: Jun 19, 2009, 2:42 AM
  5. set the length for textbox
    By Dinesh.T in forum 1.x Help
    Replies: 4
    Last Post: May 30, 2009, 2:12 AM

Posting Permissions