[CLOSED] V2.1 GridPanel Column Editor Help

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] V2.1 GridPanel Column Editor Help

    HI, help my to insert a textfied in a editor column server side...thanks..

    In the page aspx, insert this and work ok..
    <ext:Column ID="ColumnScaPagGio" runat="server" 
                                                        DataIndex="ScaPagGio" 
                                                        Text="Giorni" Align="Right"
                                                        Width="100">
                                                <Editor>
                                                    <ext:NumberField runat="server" MinValue="0" ID="EditGiorni" />
                                                </Editor>
                                            </ext:Column>
    But in c# can not configure the editor...where is my code:

    StoreArtColTag.AddField(new ModelField("Col" + taglia, ModelFieldType.String));
                    GridPanelBarCod.ColumnModel.Columns.Add(new Column
                    {
                        DataIndex = "Col" + taglia,
                        Text = taglia,
                        Width = 120,
                        EmptyCellText = taglia
                    });
    If you can help...thanks

    Aurelio
    Last edited by Daniil; Aug 26, 2012 at 10:01 AM. Reason: [CLOSED]
  2. #2
    HI.. i have resolt...grgrg
    StoreArtColTag.AddField(new ModelField("Col" + taglia, ModelFieldType.String));
                    var column = new Column();
                    column.DataIndex = "Col" + taglia;
                    column.Text = taglia;
                    column.Width = 120;
                    column.EmptyCellText = taglia;
                    column.Editor.Add(new TextField());
                    GridPanelBarCod.ColumnModel.Columns.Add(column);
    Close the post..and sorry

    Thanks
    Aurelio
  3. #3
    Hi,

    Please clarify when did you call this code?

    Quote Originally Posted by Aurelio View Post
    StoreArtColTag.AddField(new ModelField("Col" + taglia, ModelFieldType.String));
    If during DirectEvent/DirectMethod, it is OK. If during initial page load, then please populate the Fields collection of the Store Model.
  4. #4
    HI..Daniil, sorry, call the code in a DirectMethod

    [DirectMethod]
            public void AddTaglieBarCode(string pTaglie)
            {
                var taglie = pTaglie.ToString().Split(new char[] {','});
    
                StoreArtColTag.Model.Clear();
                GridPanelBarCod.SelectionModel.Clear();
                StoreArtColTag.AddField(new ModelField("ColId"));
                StoreArtColTag.AddField(new ModelField("ColDes"));
    
                GridPanelBarCod.ColumnModel.Columns.Clear();
                GridPanelBarCod.ColumnModel.Columns.Add(new Column { DataIndex = "ColDes", Text = "Colore", Locked=true });
    
    
                foreach (string taglia in taglie)
                {
                    StoreArtColTag.AddField(new ModelField("Col" + taglia, ModelFieldType.String));
                    var column = new Column();
                    column.DataIndex = "Col" + taglia;
                    column.Text = taglia;
                    column.Width = 120;
                    column.EmptyCellText = taglia;
                    column.Editor.Add(new TextField());
    
                    GridPanelBarCod.ColumnModel.Columns.Add(column);
                }
                
                GridPanelBarCod.Reconfigure();
            }
    It's work ok...

    Thanks
    Aurelio
  5. #5
    I think you can remove these lines:
    StoreArtColTag.Model.Clear();GridPanelBarCod.SelectionModel.Clear();
    since they should not cause any effect during a DirectEvent.
  6. #6
    Hi..Daniil..Ok

    Thanks
    Aurelio

Similar Threads

  1. [CLOSED] How to Get Values From Column Editor in GridPanel?
    By tlfdesarrollo in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Apr 03, 2012, 9:54 PM
  2. Replies: 1
    Last Post: Feb 19, 2012, 1:07 PM
  3. [CLOSED] gridpanel with combobox column editor
    By Marcelo in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Dec 30, 2011, 6:53 PM
  4. Replies: 2
    Last Post: Aug 23, 2010, 8:15 PM
  5. Replies: 0
    Last Post: Feb 25, 2009, 3:02 AM

Posting Permissions