[CLOSED] GridPanel disappear code-behind

Threaded View

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

    [CLOSED] GridPanel disappear code-behind

    When I refresh gridpanel it will disappear

    case 1: directclick refresh and wait around 1 second -> gridpanel is work fine
    case 2: directclick refresh and wait less then 1 second -> gridpanel is disappear and never show again until refresh browser

    I am using List Of <T> to fill in the Store and call gridpanel.Render

    Public Sub FillLstOfDataToGridPanel(Of t)(ByVal objLstOf As List(Of t), Optional ByVal strShowHideColNameList As String = Nothing, Optional ByVal strIDProperty As String = Nothing, Optional blnTIsShowFIsHide As Boolean = False, Optional strColumnAlias As String = Nothing )
            Dim objLstOfProp As List(Of clsNameAndProperty)
            Dim objModel As New Ext.Net.Model
            Dim objExtCol As Ext.Net.Column
            Dim objExtDateCol As Ext.Net.DateColumn
    
            Dim i As Integer
            Dim blnShowIt As Boolean
            Dim strSplit() As String
    
            Dim strText As String
            Dim strAlias() As String
    
    
            If objLstOf.Count < 1 Then
                mExtNetStore.Reader.Clear()
                objModel.Fields.Clear()
                mExtNetGridPanel.RemoveAllColumns()
                Exit Sub
            End If
    
    
            objLstOfProp = getListOfProperty(objLstOf(0))
            mExtNetStore.DataSource = objLstOf
            mExtNetGridPanel.RemoveAllColumns()
            objModel = FillLstOfObjectToModel(objLstOfProp, strIDProperty)
    
            If mExtNetGridPanel.StoreID Is Nothing OrElse mExtNetGridPanel.StoreID.Trim = "" Then
                mExtNetGridPanel.StoreID = mExtNetStore.ID
            End If
            strAlias = Split(strColumnAlias, ",")
            strSplit = Split(strShowHideColNameList, ",")
            For i = 0 To objLstOfProp.Count - 1
                blnShowIt = False
                If strShowHideColNameList Is Nothing OrElse strShowHideColNameList.Trim = "" Then
                    blnShowIt = True
                Else
                    Dim query = From obj As String In strSplit Where obj = objLstOfProp(i).Name.Trim
    
                    If query.Count > 0 Then
                        If blnTIsShowFIsHide = True Then
                            blnShowIt = True
                        Else
                            blnShowIt = False
                        End If
                    End If
                End If
                Dim strPropertyName As String
                strPropertyName = objLstOfProp(i).Name
                strText = ""
                If strColumnAlias Is Nothing OrElse strColumnAlias.Trim = "" Then
                    strText = strPropertyName
                Else
                    strText = strPropertyName
                    Dim CheckEqu As Char() = New Char() {"="}
                    Dim AliasQuery = From objAlias As String In strAlias Where objAlias.Split("=")(0).Trim = strPropertyName.Trim
    
                    If AliasQuery.Count > 0 Then
                        For Each objResult In AliasQuery
                            strText = objResult.ToString.Split("=")(1)
                        Next
                    End If
                End If
    
                If blnShowIt = True Then
                    If objLstOfProp(i).ExtNetModelType = Ext.Net.ModelFieldType.Date Then
                        objExtDateCol = New Ext.Net.DateColumn
                        objExtDateCol.Text = strText        ''objLstOfProp(i).Name
                        objExtDateCol.DataIndex = objLstOfProp(i).Name
                        objExtDateCol.Format = "yyyy/MM/dd"
                        mExtNetGridPanel.AddColumn(objExtDateCol)
                    Else
                        objExtCol = New Ext.Net.Column
                        objExtCol.Text = strText        ''objLstOfProp(i).Name
                        objExtCol.DataIndex = objLstOfProp(i).Name
                        mExtNetGridPanel.AddColumn(objExtCol)
                    End If
                End If
            Next
            mExtNetStore.Model.Clear()
            mExtNetStore.Model.Add(objModel)
            mExtNetStore.RebuildMeta()
            mExtNetStore.DataBind()
            mExtNetGridPanel.DataBind()
            mExtNetGridPanel.Render()
        End Sub
    Last edited by Daniil; Jan 22, 2013 at 9:25 AM. Reason: [CLOSED]

Similar Threads

  1. Drag and Drop Girdpanel to Gridpanel
    By Kev in forum 1.x Help
    Replies: 1
    Last Post: Jun 18, 2012, 12:28 PM
  2. [CLOSED] GirdPanel
    By Zarzand in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jun 23, 2010, 8:52 PM
  3. [CLOSED] [1.0] TabPanel disappear
    By tansu in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Dec 12, 2009, 3:35 PM
  4. Hover effect does not disappear
    By dbassett74 in forum Bugs
    Replies: 2
    Last Post: May 12, 2009, 5:32 PM
  5. GirdPanel
    By Zarzand in forum Bugs
    Replies: 0
    Last Post: Nov 25, 2008, 2:24 PM

Tags for this Thread

Posting Permissions