Context menu in Gridview row

  1. #1

    [CLOSED] Context menu in Gridview row

    Can we use Context menu in Grid view row?? please help me with code sample
    this is my code i want to show this menu on only datagrid datarow

    <ext:Menu ID="StatusChangeContext" runat="server">
            <Items>
                <ext:MenuItem ID="mnApprove" runat="server" Text="Accept" Icon="Accept" />
                <ext:MenuItem ID="mnReject" runat="server" Text="Decline" Icon="Decline" />
                <ext:MenuItem ID="mnCallForMeeting" runat="server" Text="Call For Meeting" HideOnClick="false">
                    <Menu>
                        <ext:Menu ID="subEmailSMSCall" runat="server">
                            <Items>
                                <ext:MenuItem ID="subEmail" runat="server" Text="Send E-Mail" Icon="Email" />
                                <ext:MenuItem ID="subSms" runat="server" Text="Send SMS" Icon="Mail" />
                            </Items>
                        </ext:Menu>
                    </Menu>
                </ext:MenuItem>
            </Items>
        </ext:Menu>
    this is my grid view

    <ext:GridPanel ID="GridPanelLeave" runat="server" Frame="true" AutoHeight="true" ContextMenuID="StatusChangeContext"
            StripeRows="true" Title="Leave On Requested" Layout="Fit">
            <Store>
                <ext:Store ID="strLeave" runat="server" DataSourceID="LeaveLinqDataSource">
                    <Reader>
                        <ext:JsonReader IDProperty="ReqId">
                            <Fields>
                                <ext:RecordField Name="RefNo" />
                                <ext:RecordField Name="FirstName" ServerMapping="Employee.FirstName" />
                                <ext:RecordField Name="LastName" ServerMapping="Employee.LastName" />
                                <ext:RecordField Name="Department" ServerMapping="Employee.Department.DepName" />
                                <ext:RecordField Name="LeaveType" ServerMapping="LeaveType.Name" />
                                <ext:RecordField Name="FromDate" Type="Date" />
                                <ext:RecordField Name="ToDate" Type="Date" />
                                <ext:RecordField Name="ReasonForLeave" />
                                <ext:RecordField Name="IsApproved" />
                            </Fields>
                        </ext:JsonReader>
                    </Reader>
                </ext:Store>
            </Store>
            <ColumnModel runat="server" ID="ctl10">
                <Columns>
                    <ext:RowNumbererColumn />
                    <ext:Column ColumnID="clFullName" Header="Employee Name" Width="200">
                        <Renderer Fn="fullName" />
                    </ext:Column>
                    <ext:Column DataIndex="Department" Header="Department" />
                    <ext:Column DataIndex="LeaveType" Header="Leave Type" />
                    <ext:DateColumn DataIndex="FromDate" Header="From Date" Format="yyyy-MM-dd" />
                    <ext:DateColumn DataIndex="ToDate" Header="To Date" Format="yyyy-MM-dd" />
                    <ext:Column DataIndex="IsApproved" Header="Status">
                        <Renderer Fn="getStatus" />
                    </ext:Column>
                </Columns>
            </ColumnModel>
            <View>
                <ext:GridView runat="server" EnableRowBody="true" ID="ctl09">
                    <GetRowClass Handler="rowParams.body = '<p>' + record.data.ReasonForLeave + '<br/>ref : <b>'+record.data.RefNo+'</b></p>'; return 'x-grid3-row-expanded';" />
                    <Templates>
                        <Header runat="server" Visible="False" ID="ctl08" />
                    </Templates>
                </ext:GridView>
            </View>
            <SelectionModel>
                <ext:RowSelectionModel runat="server" ID="ctl07" />
            </SelectionModel>
        </ext:GridPanel>
    Last edited by gayancc; Nov 20, 2010 at 2:56 AM. Reason: problem solved
  2. #2
    hope this image will help to understand what's my problem
    Last edited by gayancc; Nov 19, 2010 at 11:39 AM.
  3. #3
    Hi,

    In the following sample we use context menu for the grid
    https://examples1.ext.net/#/Combinat.../Simple_Tasks/

    Also please see
    http://forums.ext.net/showthread.php...l-Context-Menu
  4. #4
    hi Vladimir,

    wonderful .. really appreciate your help second link solved my problem totally. thanks again for your attention.. :)

Similar Threads

  1. Replies: 0
    Last Post: Mar 29, 2012, 12:50 PM
  2. [CLOSED] Tab Context menu help
    By SymSure in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 31, 2011, 5:08 PM
  3. Context Menu in desktop
    By dotnet in forum 1.x Help
    Replies: 7
    Last Post: Sep 16, 2010, 4:30 PM
  4. [CLOSED] context menu
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Apr 07, 2009, 6:06 AM
  5. Prb: How to use sub menus in a context menu?
    By plykkegaard in forum 1.x Help
    Replies: 0
    Last Post: Mar 22, 2009, 9:33 AM

Posting Permissions