-1

its first time form to use ext.net calendar. i have dates in sql database. i try to bind calendarpanel with eventstore as dynamicly. but come blank calendar.

***Public Sub Calendar_Fill() Sql = "select distinct [SrvSchDate],[SrvWave],[SrvMvGrp]from Migrate_info where [SrvSchDate] > CURRENT_TIMESTAMP group by [SrvSchDate],[SrvWave],[SrvMvGrp]" getdata(Sql) Dim oEvents = New Ext.Net.EventCollection Dim oEvtStore = New Ext.Net.EventStore Dim oEvt As Ext.Net.Event

    Dim j As Integer = 0

    For Each row As DataRow In ds.Tables(0).Rows
        oEvt = New Ext.Net.Event
        oEvt.CalendarId = j
        oEvt.EventId = j
        oEvt.EndDate = ds.Tables(0).Rows(j).Item(0)
        oEvt.StartDate = ds.Tables(0).Rows(j).Item(0)
        oEvt.Title = ds.Tables(0).Rows(j).Item(1) + " " + ds.Tables(0).Rows(j).Item(2)
        j = j + 1
        oEvents.Add(oEvt)
    Next


    oEvtStore.Events.AddRange(oEvents)


    myCalendar.EventStore = oEvtStore

End Sub`

1 Answers1

0

*** client side

                            </Groups>
                        </GroupStore>
                        <MonthView ID="MonthView1" 
                            runat="server" 
                            ShowHeader="true" 
                            ShowWeekLinks="true" 
                            ShowWeekNumbers="true" 
                            /> 
                    </ext:CalendarPanel>

** server side** Public Sub Calendar_Fill() Sql = "select distinct [SrvSchDate],[SrvWave],[SrvMvGrp]from Migrate_info where [SrvSchDate] > CURRENT_TIMESTAMP group by [SrvSchDate],[SrvWave],[SrvMvGrp]" getdata(Sql) Dim oEvents = New Ext.Net.EventCollection Dim oEvtStore = New Ext.Net.EventStore Dim oEvt As Ext.Net.Event

    Dim j As Integer = 0

    For Each row As DataRow In ds.Tables(0).Rows
        oEvt = New Ext.Net.Event
        oEvt.CalendarId = j
        oEvt.EventId = j
        oEvt.EndDate = CDate(ds.Tables(0).Rows(j).Item(0))
        oEvt.StartDate = CDate(ds.Tables(0).Rows(j).Item(0))
        oEvt.Title = ds.Tables(0).Rows(j).Item(1) + " " + ds.Tables(0).Rows(j).Item(2)
        j = j + 1
        oEvents.Add(oEvt)
    Next


    oEvtStore.Events.AddRange(oEvents)


    myCalendar.EventStore = oEvtStore

End Sub