[CLOSED] GridPanel disappear code-behind

  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]
  2. #2
    Hi @mis@adphk.com,

    Well, this is actual for any post.
    http://forums.ext.net/showthread.php...l=1#post100564

    Please wrap.
  3. #3

    with screen capture

    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
    Attached Files
  4. #4
    Thank you for wrapping.

    Quote Originally Posted by mis@adphk.com View Post
    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 don't understand well what you mean under "wait around 1 second" and "wait less than 1 second".

    Wait after a click on the refresh button? Ok, this seems clear. But wait before what? Maybe, before another click on the refresh button?

    Please clarify.

    Also a code sample is, unfortunately, incomplete to test with.
  5. #5
    seems firefox version issue, i run same code in IE 9 and firefox 18.0.1 is fine!
    Thanks
  6. #6
    Quote Originally Posted by mis@adphk.com View Post
    seems firefox version issue, i run same code in IE 9 and firefox 18.0.1 is fine!
    This phrase is confusing. First you are saying it is a FireFox issue, then saying that it is fine with FireFox 18.0.1.

    So, what FireFox issue is the issue reproducible with?

    Please clarify.
  7. #7
    my firefox previous version not 18.0.1 , but i not sure which version is
  8. #8
    Recently, we have added a fix for FireFox 18. Maybe it affects this issue.

    Or, maybe, FireFox fixed it itself.

    Anyway it appears to be not a problem anymore, doesn't?
  9. #9
    ok now! thanks, but i face the other problem on 2.0 upgrade to 2.1.1 gridpanel.Render error, and I already create a new post http://forums.ext.net/showthread.php...r-on-Ext-2-1-1

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