Jul 15, 2011, 4:28 PM
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
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