[CLOSED] Loading data in gridpanel through WebService in sublassed window

  1. #1

    [CLOSED] Loading data in gridpanel through WebService in sublassed window

    Hello,

    I created subclassed ext.net window control and want use web service for populating gridpanel inside this window,
    but grid not load data. I don't see what is wrong and where I made mistake.
    This control I call in my page with following code:
       new Test.UI.TestWindow().Render(this.Page.Form.ClientID,RenderMode.RenderTo);
    Code for subclassed window control is following:
    namespace Test.UI
     
    {
     
      public class TestWindow : Ext.Net.Window    
     
      {
     
        public TestWindow()
     
        {
     
               this.IDMode = IDMode.Explicit;
     
               this.ID = "frmTest";
               this.Width = 600;
               this.Height = 600;
               this.Layout = "FitLayout";
               this.Padding = 5;
     
    this.Items.Add(new GridPanel
                {
                    ID = "gridCourses",
                    IDMode = IDMode.Explicit,
                    Height = 300,
                    AutoExpandColumn = "caption",
                    Store=
                    {
                    new Store
                        {
                            ID = "strCalcW",
                            IDMode = IDMode.Explicit,
                            RemoteSort = true,
                            Proxy =
                            {
                                new HttpProxy{Json=true,Method= HttpMethod.POST,Url="../Shared/GetStudyCourses.asmx/CoursePaging"}
                            },
                            AutoLoadParams =
                            {
                                new Parameter{Name="start",Value="0",Mode=ParameterMode.Raw},
                                new Parameter{Name="limit",Value="20",Mode=ParameterMode.Raw}
                            },
                            BaseParams =
                            {
                                new Parameter{Name="studycode",Value="SS",Mode=ParameterMode.Raw},
                                new Parameter{Name="semestar",Value="0",Mode=ParameterMode.Raw}
                            },
                            Reader =
                            {
                                new JsonReader
                                {
                                    IDProperty="idrec", 
                                    Root = "d.Data",
                                    TotalProperty="d.TotalRecords",
                                    Fields=
                                    {
                                        new RecordField{Name="idrec"},
                                        new RecordField{Name="caption"},
                                        new RecordField{Name="studycode"}
                                    }
                                }
                            },
                            SortInfo = { Field = "caption", Direction = SortDirection.ASC }
                        }
                    },
                    ColumnModel =
                    {
                        ID = "colCalcW",
                        IDMode = IDMode.Explicit,
                        Columns = 
                        { 
                            new RowNumbererColumn{Header="No.",Width=30,ColumnID="col1"},
                            new Column{Header="Caption",ColumnID="caption",DataIndex="caption",Sortable=true,MenuDisabled=true},
                            new Column{Header="",Width=30,ColumnID="col3",DataIndex="studycode",Sortable=true,MenuDisabled=true}
                        }
                    },
                    LoadMask = { ShowMask = true, Msg = "Loading..." },
                    SelectionModel = { new CheckboxSelectionModel { ID = "id", IDMode = IDMode.Explicit } },
                    BottomBar = { new PagingToolbar { PageSize = 20 } }
                });
     
      }
     
    }
    Please can you look what is wrong.

    Best regards,
    Sasa
    Last edited by Daniil; Jun 13, 2011 at 11:28 AM. Reason: [CLOSED]
  2. #2
    Hi,

    Please post response from webservice
  3. #3
    Quote Originally Posted by Vladimir View Post
    Hi,

    Please post response from webservice
    Hi,

    I looked through Fiddler and I don't have any response from web service when is subclassed window shown.
    Also, when I click on refresh button in pagging toolbar in gridpanel, nothing happen.
    This grid and store not call web service for loading data.
    Other test which I made is when I copy web service url path in address bar and call CoursePaging method with base parameters, I get all my data.

    Does exist some other test what I can make?
  4. #4
    Hi Vladimir,

    did you looked my last reply?
    How I can test or solve this issue?
  5. #5
    Hi,

    I am out of ideas, if HttpProxy is defined then a request must be initiated
    I guess that js error is occured before loading

    Can you clarify is SS js variable is defined in your page
    new Parameter{Name="studycode",Value="SS",Mode=ParameterMode.Raw},
    You use Raw mode, it means that value will not be wrapped by quotes
    May be you need to use ParameterMode.Value?
  6. #6
    Quote Originally Posted by Vladimir View Post
    Hi,

    I am out of ideas, if HttpProxy is defined then a request must be initiated
    I guess that js error is occured before loading

    Can you clarify is SS js variable is defined in your page
    new Parameter{Name="studycode",Value="SS",Mode=ParameterMode.Raw},
    You use Raw mode, it means that value will not be wrapped by quotes
    May be you need to use ParameterMode.Value?
    Yes, this is solution. I changed ParameterMode into Value and all work very nice.

    You are the best.
    Thank you very much.

    Best regards,
    Sasa

Similar Threads

  1. GridPanel Data loading problem
    By hmily6033 in forum 2.x Help
    Replies: 1
    Last Post: Jun 19, 2012, 12:24 AM
  2. Problem with IE6 and loading Store via WebService
    By macap in forum 1.x Legacy Premium Help
    Replies: 12
    Last Post: Dec 16, 2010, 4:26 PM
  3. [CLOSED] LoadMask while loading huge data in gridpanel
    By Hari_CSC in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 26, 2010, 9:01 AM
  4. [CLOSED] Error loading Gridpanel Data
    By SymSure in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Mar 17, 2010, 1:40 AM
  5. [CLOSED] GridPanel Loading with Large Data Set
    By bethc in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Oct 28, 2009, 3:20 PM

Posting Permissions