[CLOSED] Component focus problem in the rowExpander

Page 1 of 2 12 LastLast
  1. #1

    [CLOSED] Component focus problem in the rowExpander

    Hi, I have a gridpanel. My store get data with pageproxy. Gridpanel is loaded successfull but component is not focus when i expanded rowexpander and i click it. If i delete pageproxy everything ok.
    Last edited by Daniil; Jan 11, 2012 at 7:58 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Please clarify what component do you mean and how do you focus it?
  3. #3
    textfield, textarea etc... i click in the textfield. cursor is once visible then lost. Cursor is correct work when i deleted pageproxy.
  4. #4
    I was unable to reproduce the problem using the example below.

    Please provide your test case.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <%@ Import Namespace="System.Collections.Generic" %>
    
    <script runat="server">
        public List<object> MyData = new List<object> 
        { 
            new { test = "test1" },
            new { test = "test2" },
            new { test = "test3" },
            new { test = "test4" },
            new { test = "test5" },
            new { test = "test6" },
            new { test = "test7" },
            new { test = "test8" },
            new { test = "test9" }
        };
    
        protected void Store_RefreshData(object sender, StoreRefreshDataEventArgs e)
        {
            List<object> data = this.MyData;
            var limit = e.Limit;
            if ((e.Start + e.Limit) > data.Count)
            {
                limit = data.Count - e.Start;
            }
            List<object> rangeData = (e.Start < 0 || limit < 0) ? data : data.GetRange(e.Start, limit);
            e.Total = data.Count;
            (sender as Store).DataSource = rangeData;
        }
    </script>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.NET Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:GridPanel runat="server" AutoHeight="true">
                <Store>
                    <ext:Store runat="server" OnRefreshData="Store_RefreshData">
                        <Proxy>
                            <ext:PageProxy />
                        </Proxy>
                        <Reader>
                            <ext:JsonReader>
                                <Fields>
                                    <ext:RecordField Name="test" />
                                </Fields>
                            </ext:JsonReader>
                        </Reader>
                        <BaseParams>
                            <ext:Parameter Name="start" Value="0" Mode="Raw" />
                            <ext:Parameter Name="limit" Value="3" Mode="Raw" />
                        </BaseParams>
                    </ext:Store>
                </Store>
                <ColumnModel runat="server">
                    <Columns>
                        <ext:Column Header="Test" DataIndex="test" Width="200" />
                    </Columns>
                </ColumnModel>
                <BottomBar>
                    <ext:PagingToolbar runat="server" PageSize="3" />
                </BottomBar>
                <Plugins>
                    <ext:RowExpander runat="server">
                        <Component>
                            <ext:TextField runat="server" />
                        </Component>
                    </ext:RowExpander>
                </Plugins>
            </ext:GridPanel>
        </form>
    </body>
    </html>
  5. #5
    Yes is work but i am using wcf for get data. I tested get local data and it worked. But wcf didn't work.
  6. #6
    Please provide a sample to reproduce.
  7. #7
    
    
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    
    using Class.DataModel;
    using RSD.Utils.Enum;
    using Ext.Net;
    using RasadBusiness;
    
    /// <summary>
    /// Summary description for ScenarioEventsGridPanel
    /// </summary>
    /// 
    
    namespace test
    {
    
         public  class test : GridPanel
        {
            private const string SCOPE = "SecurityOrchestrator.ScenarioTablesGridPanel";
    
            public test()
            {
                this.ID = StringEnum.GetStringValue(WebControlPrefix.GridPanel) + "ScenarioTables";
                this.AutoScroll = true;
                this.Region = Region.Center;
                this.AutoHeight = true;
    
                this.BuildBottomBar();
                this.BuildColumnModels();
                this.BuildRowExpander();
                this.BuildStore();
                this.BuildSelectionModel();
                this.BuildTopBar();
                this.BuildView();
    
         //       this.Controls.Add(new ConfigScenarioTableWindow());
            }
    
            private void BuildBottomBar()
            {
                this.BottomBar.Add(new PagingToolbar
                {
                    ID = StringEnum.GetStringValue(WebControlPrefix.PagingToolbar) + "ScenarioTables",
                    PageSize = 10,
                });
            }
    
            private void BuildColumnModels()
            {
                this.ColumnModel.Columns.AddRange(new List<ColumnBase>
    			{
    				new RowNumbererColumn(),
    				new Column{
    					ColumnID="Name",
    					DataIndex="Name",
    					Align=Alignment.Left,
    					Editable=false,
    					Width=360,
    					Header="Adı",
    					Renderer={
    						Fn=SCOPE+".format",
    						Scope=SCOPE
    					}
    				},
    				new Column{
    					ColumnID="TableName",
    					DataIndex="TableName",
    					Align=Alignment.Left,
    					Editable=false,
    					Width=300,
    					Header="Tablo Adı",
    					Renderer={
    						Fn=SCOPE+".format",
    						Scope=SCOPE
    					}
    				}
    			});
            }
    
            private void BuildRowExpander()
            {
                this.Plugins.Add(new RowExpander
                {
                    ID = StringEnum.GetStringValue(WebControlPrefix.RowExpander) + "ScenarioTables",
                    Component =
    				{
    					new Container{
    						Layout="Column",
    						Height=160,
    						Items={
    							new FormPanel{
    								ID=StringEnum.GetStringValue(WebControlPrefix.FormPanel)+"UpdRecordPnl1",
    								Border=false,
    								ColumnWidth=0.55,
    								Items={                                    
    									new TextField{                                        
    										FieldLabel="Adı",
    										AnchorHorizontal="95%",
    										DataIndex="Name"
    									},
    									new TextArea{
    										FieldLabel="Bilgi",
    										AnchorHorizontal="95%",
    										DataIndex="Info",
    										Height=70
    									},
    									new TextField{
    										FieldLabel="Tablo İsmi",
    										AnchorHorizontal="95%",
    										DataIndex="TableName"
    									},
    								}
    							},
    							new FormPanel{     
    								ID=StringEnum.GetStringValue(WebControlPrefix.FormPanel)+"UpdRecordPnl2",
    								Border=false,
    								ColumnWidth=0.45,
    								Items={                                    
    									new TextField{
    										FieldLabel="Sunucu Adı",
    										AnchorHorizontal="95%",
    										DataIndex="ServerName"
    									},
    									new TextField{
    										FieldLabel="Veritabanı Adı",
    										AnchorHorizontal="95%",
    										DataIndex="DatabaseName"
    									},
    									new TextField{
    										FieldLabel="Kullanıcı Adı",
    										AnchorHorizontal="95%",
    										DataIndex="UserName"
    									},
    									new TextField{
    										FieldLabel="Şifre",
    										AnchorHorizontal="95%",
    										DataIndex="Password"
    									},
    									new TextField{
    										FieldLabel="Birincil Anahtar",
    										AnchorHorizontal="95%",
    										DataIndex="PrimaryKey"
    									},
    									new CompositeField{
    										Items={
    											new Button{
    												Text="Kaydet",
    												Icon=Icon.Disk,
    												AnchorHorizontal="50%",
    												DirectEvents={
    													Click={
    														ExtraParams={
    															new Parameter("ConfigID","fplUpdRecordPnl2.record.data.ID",ParameterMode.Raw),
    															new Parameter("ConfigName","fplUpdRecordPnl1.items.items[0].getValue()",ParameterMode.Raw),
                                                                new Parameter("ConfigInfo","fplUpdRecordPnl1.items.items[1].getValue()",ParameterMode.Raw),
                                                                new Parameter("ConfigServerName","fplUpdRecordPnl2.items.items[0].getValue()",ParameterMode.Raw),
                                                                new Parameter("ConfigDBName","fplUpdRecordPnl2.items.items[1].getValue()",ParameterMode.Raw),
                                                                new Parameter("ConfigUsername","fplUpdRecordPnl2.items.items[2].getValue()",ParameterMode.Raw),
                                                                new Parameter("ConfigPassword","fplUpdRecordPnl2.items.items[3].getValue()",ParameterMode.Raw),
                                                                new Parameter("ConfigTableName","fplUpdRecordPnl1.items.items[2].getValue()",ParameterMode.Raw),
                                                                new Parameter("ConfigPK","fplUpdRecordPnl2.items.items[4].getValue()",ParameterMode.Raw),
                                                            },
                                                            EventMask={
                                                                Msg="Güncelleniyor",
                                                                ShowMask=true,
                                                            }                                                        
    													},
    												}
    											},
    											new Button{
    												Text="İptal",
    												Icon=Icon.Decline,
    												AnchorHorizontal="50%",
    												Listeners={
    													Click={
    														Handler="rweScenarioTables.collapseAll();"
    													}
    												}
    											},
    										}
    									}
    								},
    							}
    						}
    					}
    				},
                    Listeners =
                    {
                        Expand =
                        {
                            Handler = "fplUpdRecordPnl1.record = record; fplUpdRecordPnl1.getForm().loadRecord(record);" +
                                      "fplUpdRecordPnl2.record = record; fplUpdRecordPnl2.getForm().loadRecord(record);"
                        }
                    }
                });
    
                //((Button)((CompositeField)((FormPanel)((Container)((RowExpander)
                //    this.Plugins[0]).Component[0]).Items[1]).Items[5]).Items[0]).DirectEvents.Click.Event += UpdateScenarioTable;
            }
    
            private void BuildStore()
            {
                this.Store.Add(new Store
                {
                    ID = StringEnum.GetStringValue(WebControlPrefix.Store) + "ScenarioTables",
                    //	AutoLoad=true,
                    Proxy ={
                        new PageProxy()
                    },
                    Reader =
    				{
    					new JsonReader{
    						IDProperty="ID",
    						Fields={
    							new RecordField("ID",RecordFieldType.Int),
    							new RecordField("Name",RecordFieldType.String),
    							new RecordField("Info",RecordFieldType.String),
    							new RecordField("ServerName",RecordFieldType.String),
    							new RecordField("DatabaseName",RecordFieldType.String),                            
    							new RecordField("UserName",RecordFieldType.String),                            
    							new RecordField("Password",RecordFieldType.String),                           
    							new RecordField("TableName",RecordFieldType.String),                        
    							new RecordField("PrimaryKey",RecordFieldType.String), 
    						}
    					}
    				}
                });
    
                this.Store[0].RefreshData += new Store.AjaxRefreshDataEventHandler(ScenarioTablesRefreshData);
                //   this.Store[0].BeforeStoreChanged += new Store.BeforeStoreChangedEventHandler(DE_ProjectActivityBeforeStoreChanged);
            }
    
            private void BuildSelectionModel()
            {
                this.SelectionModel.Add(new RowSelectionModel
                {
                    SingleSelect = true,
                    Listeners =
                    {
                        RowSelect =
                        {
                            Fn = SCOPE + ".rowSelect",
                            Scope = SCOPE
                        },
                        RowDeselect =
                        {
                            Handler = "if (!gplScenarioTables.hasSelection()) {btnDelScenarioTable.disable();}",
                            Scope = SCOPE
                        }
                    }
                });
            }
    
            private void BuildTopBar()
            {
                this.TopBar.Add(new Toolbar
                {
                    Items ={
    					new Button{
    						ID=StringEnum.GetStringValue(WebControlPrefix.Button)+"AddScenarioTable",
    						Icon=Ext.Net.Icon.Add,
    						Text="Senaryo Tablosu Ekle",
    						Listeners={
    							Click={
    								Handler = StringEnum.GetStringValue(WebControlPrefix.Window)+"ConfigScenarioTables.show();",
    								Scope=SCOPE
    							   // Handler="pnlViewDetail.expand(true); hddActivityID.setValue(-1);",
    							}
    						}
    					},new Button{
    						ID=StringEnum.GetStringValue(WebControlPrefix.Button)+"DelScenarioTable",
    						Icon=Ext.Net.Icon.Delete,
    						Text="Aktivite Sil",
                            Disabled=true,
    						DirectEvents={
                                Click={
                                    ExtraParams={
                                        new Parameter("ConfigID","gplScenarioTables.getSelectionModel().getSelected().data.ID",ParameterMode.Raw)
                                    },
                                    Confirmation={
                                        Message="Silmek istediğinizden emin misiniz?",
                                        Title="Uyarı",
                                        ConfirmRequest=true,
                                    }
                                }
                            }
    					}
    				}
                });
    
             //   ((Button)((Toolbar)this.TopBar[0]).Items[1]).DirectEvents.Click.Event += DelScenarioTable;
            }
    
            private void BuildView()
            {
                this.View.Add(new GridView
                {
                    EnableRowBody = true,
                    Height = 50,
                    GetRowClass =
                    {
                        Handler = "rowParams.body = '<p>' + record.data.Info + '</p>'; return 'x-grid3-row-expanded';"
                    },
                    HeaderRows ={
    					new HeaderRow{
    						Columns={                                
    							new HeaderColumn(),
    							new HeaderColumn{
    								Component={
    									new Button{
    										Icon=Icon.Cancel,
    										ToolTips={
    											new ToolTip{
    												Html="Sil"
    											}
    										},
    										Listeners={
    											Click={
    												Fn=SCOPE+".clearFilter",
    												Scope=SCOPE
    											}
    										}
    									}
    								}
    							},
    							new HeaderColumn{
    								Component={
    									new TextField{
    									}
    								}
    							},
    							new HeaderColumn{
    								Component={
    									new TextField{
    										EnableKeyEvents=true,
    										Listeners={
    											KeyUp={
    												Handler="",
    												Scope=SCOPE
    											}
    										}
    									}
    								}
    							}
    						}
    					}
    				}
                });
            }
    
            protected void ScenarioTablesRefreshData(object sender, StoreRefreshDataEventArgs e)
            {
                //     Ext.Net.X.Msg.Alert("Mesaj", box.msg).Show();
    
                this.Store[0].SetDataFromJson(GetScenarioTables());
                this.Store[0].DataBind();
            }
    
            private string GetScenarioTables()
            {
                CompositeType type = new CompositeType
                {
                    ClassName = BusinessClasses.ScenarioTables,
                    MethodName = "LoadScenarioTables"
                };
    
                RasadServiceClient client = new RasadServiceClient();
                BoxRasadWCFReturn box = client.GetDataUsingDataContract(type);
                return box.msg;
            }
  8. #8
    I'm getting a lot of compile errors when trying to run the code you posted.

    Please simplify to run it locally without any changes from our side.
  9. #9
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using RasadBusiness;
    
    using Ext.Net;
    
    
    namespace test
    {
        /// <summary>
        /// Summary description for Test
        /// </summary>
        public class Test : GridPanel
        {
            public Test()
            {
                this.AutoHeight = true;
                this.Store.Add(new Store
                {
                    AutoLoad = true,
                    Proxy =
                    {
                        new Page{                        
                        }
                    },
                    Reader =
                    {
                        new JsonReader{
                            Fields={
                                new RecordField("Name")
                            }
                        }
                    },
                    BaseParams =
                    {
                        new Parameter("start","0",ParameterMode.Raw),
                        new Parameter("limit","3",ParameterMode.Raw)
                    }
                });
                this.ColumnModel.Columns.Add(new Column
                {
                    Header = "Name",
                    DataIndex = "Name",
                    Width = 200,
                    Editor =
                    {
                       new TextField()
                    }
                });
                this.BottomBar.Add(new PagingToolbar { PageSize = 3 });
                this.Plugins.Add(new RowExpander
                {
                    Component =
                {
                    new TextField{ }
                }
                });
    
                this.Store[0].RefreshData += Store_RefreshData;
            }
    
            protected void Store_RefreshData(object sender, StoreRefreshDataEventArgs e)
            {
                CompositeType type = new CompositeType
                {
                    ClassName = BusinessClasses.ScenarioTables,
                    MethodName = "LoadScenarioTables"
                };
    
                RasadServiceClient client = new RasadServiceClient();
                BoxRasadWCFReturn box = client.GetDataUsingDataContract(type);
    
                this.Store[0].SetDataFromJson(box.msg);
                this.Store[0].DataBind();
            } 
        }
    }
    Above control and ui code


    	<bindings>
    	 <basicHttpBinding>
    		<binding name="BasicHttpBinding_IRasadService" closeTimeout="00:01:00"
       openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
       allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
       maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
       messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
       useDefaultWebProxy="true">
    		 <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
       maxBytesPerRead="4096" maxNameTableCharCount="16384" />
    		 <security mode="None">
    			<transport clientCredentialType="None" proxyCredentialType="None"
        realm="" />
    			<message clientCredentialType="UserName" algorithmSuite="Default" />
    		 </security>
    		</binding>
    	 </basicHttpBinding>
    	</bindings>
    This is wcf properties in web.config.
  10. #10
    Thanks.

    Please clarify how does you create that GridPanel and place on a page?
Page 1 of 2 12 LastLast

Similar Threads

  1. [CLOSED] Problem with RowExpander Level3
    By osef in forum 2.x Legacy Premium Help
    Replies: 5
    Last Post: Aug 15, 2012, 11:23 PM
  2. [CLOSED] Problem with RowExpander
    By osef in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Aug 14, 2012, 4:46 PM
  3. [CLOSED] [1.0] RowExpander Component
    By state in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Apr 07, 2010, 9:01 AM
  4. [CLOSED] RowExpander Component with ChecboxSelectionModel
    By amitpareek in forum 1.x Legacy Premium Help
    Replies: 20
    Last Post: Mar 25, 2010, 1:38 PM
  5. [CLOSED] Rowexpander Component Items update from Code-Behind
    By amitpareek in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Feb 20, 2010, 3:09 AM

Posting Permissions