How to code Store GridPanel and Store OnRefreshData from Code Behind

  1. #1

    How to code Store GridPanel and Store OnRefreshData from Code Behind

    Dear Team,

    I am using Desktop Control in application. My scenario is that in my application there will be

    1. Several shortcuts on desktop which will populate from code behind using Database
    2. Every Shortcut will call window control which is also code behind using Database
    3. Window will have gridpanel which will populate using store from code behind when shortcut will click and window open with gridpanel

    I achieve to set all from code behind and set store like store1.datasource=dt

    But when I want to set OnRefreshData from code behind so that when a window open only then gridpanel will populate and error shows on loading desktop Control "Store1" not found

    my sample code is given below

    Dim Read() As String
            Dim i As New Integer
            Dim jasonReader As New Coolite.Ext.Web.JsonReader
            Dim recordField As Coolite.Ext.Web.RecordField
           
            Read = row("STRCOL").ToString.Split(":")
            For i = 0 To Read.Length - 1
                recordField = New RecordField(Read(i))
                jasonReader.Fields.Add(recordField)
            Next
           
            store1 = New Coolite.Ext.Web.Store
            store1.ID = row("GRDSTR")
            store1.Reader.Add(jasonReader)
                
           
            store1.AutoLoad = True
            store1.RemoteSort = True
    
    
            AddHandler store1.RefreshData, AddressOf MyData_Refresh
            Me.form1.Controls.AddAt(0, store1)
            store1.DataBind()
            store1.Proxy.Add(New DataSourceProxy())
    Please help me to complete this task
    Last edited by Daniil; Jul 23, 2011 at 11:58 PM. Reason: Please use [CODE] tags
  2. #2
    Can any one guide me through. I will thankful to you as any one respond on urgent basis
  3. #3
    Vladmir,

    Please reply to my problem I am facing issues while designing Desktop control
  4. #4
    Any dynamic control must be recreated for each request

Similar Threads

  1. Replies: 2
    Last Post: Apr 12, 2012, 5:44 AM
  2. GridPanel with Store in Code Behind
    By smb777 in forum 1.x Help
    Replies: 3
    Last Post: Sep 26, 2011, 11:22 AM
  3. Replies: 3
    Last Post: May 26, 2011, 5:18 AM
  4. [CLOSED] Setting Store OnRefreshData in code behind
    By deejayns in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Dec 02, 2010, 3:30 PM
  5. Replies: 1
    Last Post: Jul 30, 2009, 10:32 AM

Tags for this Thread

Posting Permissions