1. #61
    Ext JS Premium Member
    Join Date
    Jul 2009
    Location
    Seattle, Washington USA
    Posts
    200
    Vote Rating
    0
    geewhizbang is on a distinguished road

      0  

    Default


    I posted this on general help, and someone says my method only creates the class, it doesn't actually render it. You code was using some other container to render the grid, and unfortunately the person that responded to my problem didn't mention HOW to get it to render.

  2. #62
    Sencha User
    Join Date
    Jan 2008
    Location
    Toronto, Canada
    Posts
    480
    Vote Rating
    4
    elishnevsky is on a distinguished road

      0  

    Default


    Can you post here the response data, that comes back from the server after the call?

  3. #63
    Ext JS Premium Member
    Join Date
    Jul 2009
    Location
    Seattle, Washington USA
    Posts
    200
    Vote Rating
    0
    geewhizbang is on a distinguished road

      0  

    Default


    This is what comes back from the call ( I encoded "r" in the reformatResult() function below
    Code:
    [{"ForumID":5,"ForumName":"Autos","ForumType":0,"ForumCatID":0,"ForumOrder":0,"CreatedBy":"KBAdmin,KBAdmin","ModifiedBy":"","ModifiedDate":"1-01-01T00:00:00","CreatedDate":"2009-07-19T14:20:57","NumberOfThreads":2,"NumberOfPosts":3}]
    This is what I used to change this into an array store that worked
    Code:
     
    function ReformatResult(r, rowIdField)
    {
      var columns = [];
      var dt = [];
      var rowIdIndex = 0;
      for (var col in r[0])
      {
          if (col == rowIdField) rowIdIndex = columns.length;
          columns.push({name: col});
      }
      for (iRow=0; iRow< r.length; iRow++)
      {
          dr = [];
          for (iCol=0; iCol< columns.length; iCol++)
          {
              dr[iCol] = r[iRow][columns[iCol].name];
          }
          dt[iRow] = dr;
       }
       var store = new Ext.data.ArrayStore({ fields: columns, idIndex: rowIdIndex })
       store.loadData(dt);
       return store;
    }

  4. #64
    Sencha User
    Join Date
    Jan 2008
    Location
    Toronto, Canada
    Posts
    480
    Vote Rating
    4
    elishnevsky is on a distinguished road

      0  

    Default


    I don't understand. Your data looks ok. You should be able to use DirectStore just fine.

  5. #65
    Ext User
    Join Date
    Sep 2008
    Posts
    11
    Vote Rating
    0
    liaoqihua is on a distinguished road

      0  

    Default The source code link is wrong!

    The source code link is wrong!


    what's pitty, the down link was wrong ,could you share for me by email(philps_liao@hotmail.com), thanks.

  6. #66
    Sencha User
    Join Date
    Jan 2008
    Location
    Toronto, Canada
    Posts
    480
    Vote Rating
    4
    elishnevsky is on a distinguished road

      0  

    Default


    The link works fine, just tested.

  7. #67
    Ext User
    Join Date
    Jan 2009
    Posts
    5
    Vote Rating
    0
    zihotki is on a distinguished road

      0  

    Default License of code

    License of code


    Greetings,

    First of all, thanks a lot for your implementation of Ext.Direct for ASP.NET MVC!
    I have few questions:
    - Which license is this code under? Could you please include it in the code?
    - And do you have some unit tests and a public repository? Are you planning to move this code to some repository (Google Code, Codeplex, etc)? That will be very helpful to submit patches and track bugs and whatever.

  8. #68
    Ext JS Premium Member
    Join Date
    Jul 2009
    Location
    Seattle, Washington USA
    Posts
    200
    Vote Rating
    0
    geewhizbang is on a distinguished road

      0  

    Default


    Quote Originally Posted by elishnevsky View Post
    I don't understand. Your data looks ok. You should be able to use DirectStore just fine.
    Perhaps the problem is that I am NOT using direct store in the code example. I was using the raw result directly, but that never worked, so I finally wrote the converter functiion to turn the raw result into a dataArray that did work.

    I was used to using the raw results directly in ASP.Net Ajax, but then again I was working with my own objects so I built them to use whatever was coming back rather than using a conversion class like ExtJS

    I have tried to stuff the result into a direct store, but the correct syntax has eluded me. I haven't succeeded at simplifying the grid in your example, since I haven't wrapped my head yet around Ext.Extend or class constructors yet. I'm perfectly happy to just create instances at this stage of my learning curve.

  9. #69
    Sencha User
    Join Date
    Jan 2008
    Location
    Toronto, Canada
    Posts
    480
    Vote Rating
    4
    elishnevsky is on a distinguished road

      0  

    Default


    I finally wrote the converter functiion to turn the raw result into a dataArray that did work
    This is a huge hack and you really shouldn't be doing this. If you like to work with raw data yourself, at least try to use JsonStore.

    Not to offend you in any way, but to help you, I think that you should spend more time learning Ext JS without Ext.Direct, forget about it for now. Read FAQ, study API, analyze examples, see how people solve common problems etc.

    Anyways, this is far off the original topic of this thread, so I would very much appreciate if we post here only to discuss my implementation of Ext.Direct for MVC.

  10. #70
    Ext JS Premium Member
    Join Date
    Jul 2009
    Location
    Seattle, Washington USA
    Posts
    200
    Vote Rating
    0
    geewhizbang is on a distinguished road

      0  

    Default


    All I am asking is for a clearer example on how to use the DirectStore object. Your current one is wrapped in some very elaborate distractions. I don't see how that is off topic.

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar