[CLOSED] Is it possible to link between GridPanel with Grouping and ComboBox?

  1. #1

    [CLOSED] Is it possible to link between GridPanel with Grouping and ComboBox?

    Hi,

    I would like to implement the functionality like linked comboboxes, but I would like to implement this feature with GridPanel with Grouping (DropDownField) and ComboBox. Is it possible to do that. Can you provide small example please?
    Last edited by Daniil; Feb 27, 2012 at 10:25 AM. Reason: [CLOSED]
  2. #2
    Quote Originally Posted by rnachman View Post
    Hi,

    I would like to implement the functionality like linked comboboxes, but I would like to implement this feature with GridPanel with Grouping (DropDownField) and ComboBox. Is it possible to do that. Can you provide small example please?
    It's always best if you can start off the thread with a simplified sample demonstrating as much of the functionality as you can.
    Geoffrey McGill
    Founder
  3. #3
    Quote Originally Posted by geoffrey.mcgill View Post
    It's always best if you can start off the thread with a simplified sample demonstrating as much of the functionality as you can.
    Please see the attachment. I would like to link a Drop Down Field to a Combo Box, or another Drop Down Field. Is this possible. If it is possible please provide example code. Thanks!Click image for larger version. 

Name:	issue 2.png 
Views:	65 
Size:	51.9 KB 
ID:	3834
  4. #4
    Quote Originally Posted by rnachman View Post
    Please see the attachment. I would like to link a Drop Down Field to a Combo Box, or another Drop Down Field. Is this possible. If it is possible please provide example code. Thanks!Click image for larger version. 

Name:	issue 2.png 
Views:	65 
Size:	51.9 KB 
ID:	3834
    I'm not sure that I understand your requirements. You want to replace the "+" icon with two linked ComboBoxes?

    To the best of my knowledge, we do not have an existing code sample which demonstrates this scenario. If you mockup a simplified .aspx code sample demonstrating where all the parts should be (does not need to function), we should be able to take that sample and make functional.
    Geoffrey McGill
    Founder
  5. #5
    Quote Originally Posted by geoffrey.mcgill View Post
    I'm not sure that I understand your requirements. You want to replace the "+" icon with two linked ComboBoxes?

    To the best of my knowledge, we do not have an existing code sample which demonstrates this scenario. If you mockup a simplified .aspx code sample demonstrating where all the parts should be (does not need to function), we should be able to take that sample and make functional.
    Let me try again. I am trying to link 2 Drop Down Fields together...Just like your Linked Combo Box example. Please see attached Click image for larger version. 

Name:	example linked drop down.png 
Views:	50 
Size:	17.9 KB 
ID:	3840
  6. #6
    Quote Originally Posted by rnachman View Post
    Let me try again. I am trying to link 2 Drop Down Fields together...Just like your Linked Combo Box example. Please see attached Click image for larger version. 

Name:	example linked drop down.png 
Views:	50 
Size:	17.9 KB 
ID:	3840
    Well, we still do not 100% understand your requirements, but we're going to make a small sample to get this thread moving in the right direction.

    With any future forum threads you may start, please ensure you begin the thread by posting a simplified .aspx code sample demonstrating as much of the scenario as possible.
    Geoffrey McGill
    Founder
  7. #7
    Hi,

    Well, basing on your description we can provide you with the following example.

    Generally, the idea is: you should be able to populate the second DropDownField as you need within the GridPanel's Command listener.

    Example
    <%@ Page Language="C#" %>
     
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest)
            {
                Store store = this.GridPanel1.GetStore();
                store.DataSource = new object[] 
                { 
                    new object[] { "test1", "test2", "test3" },
                    new object[] { "test4", "test5", "test6" },
                    new object[] { "test7", "test8", "test9" },
                };
                store.DataBind();
            }
        }
    </script>
    
    <!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>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:DropDownField ID="DropDownField1" runat="server" Width="350">
                <Component>
                     <ext:GridPanel ID="GridPanel1" runat="server" AutoHeight="true">
                        <Store>
                            <ext:Store runat="server">
                                <Reader>
                                    <ext:ArrayReader>
                                        <Fields>
                                            <ext:RecordField Name="test1" />
                                            <ext:RecordField Name="test2" />
                                            <ext:RecordField Name="test3" />
                                        </Fields>
                                    </ext:ArrayReader>
                                </Reader>
                            </ext:Store>
                        </Store>
                        <ColumnModel runat="server">
                            <Columns>
                                <ext:Column Header="Test1" DataIndex="test1" />
                                <ext:Column Header="Test2" DataIndex="test2" />
                                <ext:Column Header="Test3" DataIndex="test3" />
                                <ext:ImageCommandColumn Width="25">
                                    <Commands>
                                        <ext:ImageCommand CommandName="accept" Icon="Accept" />
                                    </Commands>
                                </ext:ImageCommandColumn>
                            </Columns>
                        </ColumnModel>
                        <Listeners>
                            <Command Handler="if (command === 'accept') {
                                                  var data = Ext.encode(record.data);
                                                  this.dropDownField.setValue(data);
                                                  DropDownField2.setValue(data);
                                              }" />
                        </Listeners>
                    </ext:GridPanel>
                </Component>
            </ext:DropDownField>
            <ext:DropDownField ID="DropDownField2" runat="server" Width="350" />
        </form>
    </body>
    </html>

Similar Threads

  1. Replies: 2
    Last Post: May 23, 2011, 10:45 AM
  2. [CLOSED] [0.8.1] Link Renderer redirect to AjaxMethod Dynamic GridPanel
    By cobiscorp in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Sep 28, 2010, 11:19 PM
  3. GridPanel Grouping
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Nov 26, 2009, 8:40 AM
  4. [CLOSED] Remote grouping or grouping summary for GridPanel
    By jchau in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Nov 08, 2009, 10:23 PM
  5. Grouping in Combobox
    By kumarxlnt in forum 1.x Help
    Replies: 1
    Last Post: Oct 24, 2009, 4:23 AM

Tags for this Thread

Posting Permissions