[CLOSED] Change EventEditWindow: Remove save button and edit link

  1. #1

    [CLOSED] Change EventEditWindow: Remove save button and edit link

    Hi,
    I have a problem in the customization of EventEditWindow.
    I want to remove the save button and the edit link.

    <ext:EventEditWindow
        ID="EventEditWindow1"
        runat="server"
        Hidden="true"
        GroupStoreID="GroupStore1" >
        <Listeners>
            <AfterRender Handler="Ext.getCmp('delete-btn').disable();" />
        </Listeners>
    </ext:EventEditWindow>
    Thanks, appreciate your help!
    Last edited by Daniil; Feb 28, 2011 at 3:32 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Please use the following listener:
    <Render Handler="this.fbar.get(0).hidden = true;
                     this.fbar.get(2).hidden = true;" />
  3. #3
    Thanks. That's very helpful.
    One question, Is it possible to disable the change (title, when, calendar)
  4. #4
    Please use
    this.get(0).get(0).disabled = true;
    this.get(0).get(1).disabled = true;
    this.get(0).get(2).disabled = true;
    Here is a full sample.

    Example
    <%@ Page Language="C#" %>
     
    <%@ 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 = {
                getWindow : function() {
                    return CompanyX.EventEditWindow1;
                },
     
                dayClick : function(cal, dt, allDay, el) {
                    this.record.show.call(this, cal, {
                        StartDate: dt,
                        IsAllDay: allDay
                    }, el);
                },
     
                record : {
                    show: function(cal, rec, el) {
                        CompanyX.getWindow().show(rec, el);
                    }
                }
            };
        </script>
    </head>
    <body>
        <form runat="server">
        <ext:ResourceManager runat="server" Namespace="CompanyX" />
        <ext:Viewport runat="server" Layout="fit">
            <Items>
                <ext:CalendarPanel ID="CalendarPanel1" runat="server" Height="500">
                    <EventStore 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>
                        <DayClick Fn="CompanyX.dayClick" Scope="CompanyX" />
                    </Listeners>
                </ext:CalendarPanel>
            </Items>
        </ext:Viewport>
        <ext:EventEditWindow
            ID="EventEditWindow1"
            runat="server"
            Hidden="true"
            GroupStoreID="GroupStore1">
            <Listeners>
                <Render Handler="this.get(0).get(0).disabled = true;
                                 this.get(0).get(1).disabled = true;
                                 this.get(0).get(2).disabled = true;
                                 this.fbar.get(0).hidden = true;
                                 this.fbar.get(2).hidden = true;" />
            </Listeners>
        </ext:EventEditWindow>
        </form>
    </body>
    </html>
  5. #5
    Thanks. :o

Similar Threads

  1. Grid Edit + Combobox Change Event
    By bobs in forum 1.x Help
    Replies: 22
    Last Post: Dec 17, 2012, 12:33 PM
  2. How to add link button in gripanel cells
    By Binai in forum 1.x Help
    Replies: 2
    Last Post: May 30, 2012, 4:43 AM
  3. [CLOSED] [1.0] Button's target link
    By PoloTheMonk in forum 1.x Legacy Premium Help
    Replies: 8
    Last Post: Nov 29, 2010, 1:19 PM
  4. Save/Edit/Delete in Gridpanel
    By rajputamit in forum 1.x Help
    Replies: 1
    Last Post: Oct 25, 2010, 1:55 PM
  5. Replies: 3
    Last Post: Feb 02, 2010, 6:32 PM

Tags for this Thread

Posting Permissions