EventEditWindow of CalendarPanel

Page 1 of 2 12 LastLast
  1. #1

    EventEditWindow of CalendarPanel

    Dear Sir,

    How design EditEventWindow of CalendarPanel control with my fields?

    In which file of Ext.Net.dll we need to do changes?

    Thanks
    Rupesh
  2. #2
    Quote Originally Posted by Rupesh View Post

    How design EditEventWindow of CalendarPanel control with my fields?

    In which file of Ext.Net.dll we need to do changes?
    Dear Sir,

    Is anybody have positive response?
    I want to solve this problem immediately.

    Thanks
    Rupesh
  3. #3
  4. #4
    Quote Originally Posted by Daniil View Post
    Hi Daniil,

    Thanks, It is worked for me partially.

    I can see new fields in EventEditWindow.
    But After saving, I am not getting values for new fields in following javascript event.
    I try by adding new fields property in calendar-all.js, calendar-all-debug.js, Eventrecord.js file.
    but when I try to alert values it display undefined.

    record: {
                    add: function (win, rec) {
                        win.hide();
                        rec.data.IsNew = false;
                        CompanyX.getStore().add(rec);
                        alert(rec.data.MyLink);
                        CompanyX.AddEvent('Event ' + rec.data.Title + ' was added ' + rec.data.MyLink, rec.data.EventId, rec.data.StartDate, rec.data.Title);
                    },

    please guide me that in which files should I change so that I will get new field values in above javascript event.


    Thanks
    Rupesh
    Last edited by Daniil; Mar 20, 2012 at 9:56 AM. Reason: Please use [CODE] tags
  5. #5
    Quote Originally Posted by Rupesh View Post

    I can see new fields in EventEditWindow.
    But After saving, I am not getting values for new fields in following javascript event.
    I try by adding new fields property in calendar-all.js, calendar-all-debug.js, Eventrecord.js file.
    but when I try to alert values it display undefined.

    please guide me that in which files should I change so that I will get new field values in above javascript event.
    Any Update???

    Thanks
    Rupesh
  6. #6
    Please provide a simplified sample to reproduce the problem.
  7. #7
    Quote Originally Posted by Daniil View Post
    Please provide a simplified sample to reproduce the problem.
    This is aspx file code
    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="MyNewCalendar.aspx.cs" Inherits="ExtNetCalendar_MyNewCalendar" %>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.Net Example</title>
      
        <script type="text/javascript">
            var CompanyX = {
                getCalendar: function () {
                    return CompanyX.CalendarPanel1;
                },
    
                getStore: function () {
                    return CompanyX.EventStore1;
                },
    
                getWindow: function () {
                    return CompanyX.EventEditWindow1;
                },
    
                dayClick: function (cal, dt, allDay, el) {
                    this.record.show.call(this, cal, {
                        StartDate: dt,
                        IsAllDay: allDay
                    }, el);
                },
    
                record: {
                    add: function (win, rec) {
                        win.hide();
                        rec.data.IsNew = false;
                        CompanyX.getStore().add(rec);
                        alert(rec.data.MyLink);
                        CompanyX.AddEvent('Event ' + rec.data.Title + ' was added ' + rec.data.MyLink, rec.data.EventId, rec.data.StartDate, rec.data.Title);
                    },
    
                    update: function (win, rec) {
                        win.hide();
                        rec.commit();
    
                    },
    
                    remove: function (win, rec) {
                        this.getStore().remove(rec);
                        win.hide();
                    },
    
                    edit: function (win, rec) {
                        win.hide();
                        CompanyX.getCalendar().showEditForm(rec);
                    },
    
                    show: function (cal, rec, el) {
                        CompanyX.getWindow().show(rec, el);
                    },
    
                    saveAll: function () {
                        CompanyX.getStore().submitData();
                    }
                }
            };        
        </script>
    </head>
    <body>
        <form id="Form1" runat="server">
            <ext:ResourceManager ID="ResourceManager1" runat="server" Namespace="CompanyX" />
            <ext:Viewport ID="Viewport1" runat="server" Layout="FitLayout">
                <Items>
                    <ext:CalendarPanel ID="CalendarPanel1" runat="server">
                        <EventStore ID="EventStore1" runat="server" />
                        <GroupStore ID="GroupStore1" runat="server">
                            <Groups>
                                <ext:Group CalendarId="1" Title="Home" />
                                <ext:Group CalendarId="2" Title="Work" />
                                <ext:Group CalendarId="3" Title="School" />
                                <ext:Group CalendarId="4" Title="Other" />
                            </Groups>
                        </GroupStore>
                        <Listeners>
                            <EventClick Fn="CompanyX.record.show" Scope="CompanyX" />
                            <DayClick Fn="CompanyX.dayClick" Scope="CompanyX" />
                            <BeforeRender Handler="var form = this.get(this.id + '-edit');
                                                   form.get('left-col').add({id: 'TextFieldLink1', fieldLabel: 'Link', xtype:'textfield', dataIndex: 'MyLink'},{id: 'TextFieldLink3', fieldLabel: 'MyName', xtype:'textfield', dataIndex: 'MyName'});" />
                            
                        </Listeners>
                    </ext:CalendarPanel>
                </Items>
            </ext:Viewport>
            <ext:EventEditWindow
                ID="EventEditWindow1"
                runat="server"
                Hidden="true"
                GroupStoreID="GroupStore1">
                <Listeners>
                    <EventAdd Fn="CompanyX.record.add" Scope="CompanyX" />
                    <EventUpdate Fn="CompanyX.record.update" Scope="CompanyX" />
                    <EditDetails Fn="CompanyX.record.edit" Scope="CompanyX" />
                    <EventDelete Fn="CompanyX.record.remove" Scope="CompanyX" />
                    <BeforeRender Handler="this.items.get(0).add({id: 'TextFieldLink2', fieldLabel: 'Link', xtype:'textfield', dataIndex: 'MyLink'},{id: 'TextFieldLink4', fieldLabel: 'MyName', xtype:'textfield', dataIndex: 'MyName'});" />
                 
                </Listeners>
            </ext:EventEditWindow>
        </form>
    </body>
    </html>
    This is aspx.cs file code
    protected void Page_Load(object sender, EventArgs e)
        {
            this.CalendarPanel1.EventStore.AddStandardFields();
            this.CalendarPanel1.EventStore.Reader[0].Fields.Add(new RecordField("MyLink"));
            this.CalendarPanel1.EventStore.Reader[0].Fields.Add(new RecordField("MyName"));
      
      
            if (!X.IsAjaxRequest)
            {
                Store store = this.CalendarPanel1.EventStore;
                store.DataSource = new List<object> 
                { 
                    new MyEvent()
                    { 
                        Title = "My New event",
                        CalendarId = 1,
                        StartDate =  DateTime.Now,
                        EndDate =  DateTime.Now.AddDays(1),
                        EventId = 1,
                        MyLink = "Some link",
                        MyName = "Rupesh"
                    }
                };
                store.DataBind();
            }
        }
         class MyEvent : Event
        {
            public string MyLink { get; set; }
            public string MyName { get; set; }
        }
    
         [DirectMethod(Namespace = "CompanyX")]
         public void AddEvent(string msg, string myid, string sDate, string sEvent)
         {
            
             //X.Msg.Notify("Message", msg + " Rupesh " + myid + " MyDate " + sDate).Show();
             X.Msg.Notify("Message", msg).Show();
         }
    Please help me as soon as possible.

    Thanks
    Rupesh
  8. #8
    Any Update??


    Thanks
    Rupesh
  9. #9
    Any Updates??


    Thanks
    Rupesh
  10. #10
    Dear Sir,

    I am waiting for updates from last 5-6 days. But I am not getting any response from u.

    Is this because I don't have premium license?

    If I purchased premium license. Will my issue regarding calendar control will solve?

    please give me proper guidence. Client want to complete the project with calendar issue.

    Thanks
    Rupesh
Page 1 of 2 12 LastLast

Similar Threads

  1. Help For EventEditWindow
    By Rupesh in forum 1.x Help
    Replies: 3
    Last Post: Mar 12, 2012, 8:44 AM
  2. EventEditWindow is not defined
    By threewonders in forum 1.x Help
    Replies: 2
    Last Post: Mar 05, 2012, 9:16 AM
  3. EventEditWindow
    By mkkalkan in forum 1.x Help
    Replies: 1
    Last Post: Oct 13, 2011, 8:38 PM
  4. Calendarpanel: EventEditWindow DirectEvents
    By dotnet in forum 1.x Help
    Replies: 9
    Last Post: May 27, 2011, 10:18 AM
  5. Replies: 4
    Last Post: Apr 25, 2011, 8:35 AM

Tags for this Thread

Posting Permissions