[CLOSED] create gridpanel in code behind?

  1. #1

    [CLOSED] create gridpanel in code behind?

                var grid = new GridPanel
                {
                    Store = 
                { 
                    new Store 
                    { 
                        Model = {
                            new Model {
                                IDProperty = "vouchId",
                                Fields = 
                                {
                                    new ModelField("vouchId"),
                                    new ModelField("pzzh") 
                                }
                            }
                        },
                        DataSource = data1
                    }
                },
                    ColumnModel =
                    {
                        Columns = 
                        { 
                            new Column { Text = "凭证字号", DataIndex = "pzzh" }
                        }
                    },
                    Plugins =
                        {
                            new RowExpander
                                {
                                    Loader =
                                        {
                                             DirectMethod = "#{DirectMethods}.GetGrid1" ,
                                             LoadMask=
                                                {
                                                    ShowMask = true
                                                },
                                             Params=
                                                 {
                                                     new Ext.Net.Parameter
                                                         {
                                                             Name = "vouchId",   
                                                             Value = "this.record.data.vouchId",
                                                             Mode = ParameterMode.Raw
                                                         }
                                                 }
                                        } 
    
                                }
                        }
                };
    i doubt code's format is wrong , because ctrl+e+d can't format the source code.
    Last edited by Daniil; Nov 01, 2013 at 5:10 AM. Reason: [CLOSED]
  2. #2
    Hi @tobros,

    i doubt code's format is wrong , because ctrl+e+d can't format the source code.
    Yes, seems VS cannot format it well in such cases.

    Please replace
    Loader =
    with
    Loader = new ComponentLoader()

Similar Threads

  1. [CLOSED] Create a Chart in Code Behind
    By elisa in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 18, 2013, 11:37 PM
  2. How to Create Ext.net Chart from code behind
    By kavitha in forum 2.x Help
    Replies: 0
    Last Post: May 22, 2013, 6:56 AM
  3. Create TreeGrid in code behind
    By milenios in forum 2.x Help
    Replies: 0
    Last Post: Jul 26, 2012, 10:06 PM
  4. Create controls in code behind
    By Yannis in forum 1.x Help
    Replies: 1
    Last Post: Nov 26, 2009, 12:03 AM
  5. [CLOSED] Create a Tab in ASP.NET code-behind: HOW-TO
    By jsemple in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 17, 2009, 7:32 AM

Posting Permissions