[CLOSED] Submitting MultiSelect data

  1. #1

    [CLOSED] Submitting MultiSelect data

    Hi,

    In a FormPanel, I have a MultiSelect:


                                        <ext:MultiSelect SubmitText="false" SubmitValue="false" ID="HorizCablesSelect" Legend="Horizontal Cables"
                                            runat="server" Width="300" Height="250" StoreID="HorizCablesStore" DisplayField="Label"
                                            ValueField="CableId">
                                            <Items>
                                            </Items>
                                        </ext:MultiSelect>
    When the form is submitted (saved), the data that is sent with the form response looks like:

    Click image for larger version. 

Name:	Capture.PNG 
Views:	80 
Size:	4.6 KB 
ID:	3795

    I just want the id's to be passed back - I've turned off SubmitText and SubmitValue, but this data still goes with the form. How can I just post a list of IDs?

    Thanks
    Last edited by Daniil; Feb 06, 2012 at 10:57 AM. Reason: [CLOSED]
  2. #2
    Hi,

    We have added the SubmitIndexes property for MultiSelect, revision #3824.

    To don't submit indexes, please set up false. Defaults to true. The same as the SubmitText property, but affects to submitting the indexes.

    After update from SVN the MultiSelect from the example below will submit only its values.

    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>
    </head>
    <body>
        <ext:ResourceManager runat="server" />
        <ext:FormPanel ID="FormPanel1" runat="server">
            <Items>
                <ext:MultiSelect 
                    ID="MultiSelect1" 
                    runat="server"
                    SubmitText="false"
                    SubmitValue="false"
                    SubmitIndexes="false">
                    <Items>
                        <ext:ListItem Text="Item 1" Value="Value1" />
                        <ext:ListItem Text="Item 2" Value="Value2" />
                    </Items>
                </ext:MultiSelect>
            </Items>
        </ext:FormPanel>
        <ext:Button runat="server" Text="Submit">
            <Listeners>
                <Click Handler="FormPanel1.getForm().submit();" />
            </Listeners>
        </ext:Button>
    </body>
    </html>
  3. #3
    Great work, thanks!

Similar Threads

  1. Replies: 4
    Last Post: May 09, 2012, 9:24 PM
  2. Replies: 3
    Last Post: Feb 21, 2011, 12:32 PM
  3. Submitting data from store in Grid
    By chezinho in forum 1.x Help
    Replies: 1
    Last Post: Dec 08, 2010, 3:36 PM
  4. Submitting form
    By okutbay in forum 1.x Help
    Replies: 1
    Last Post: Apr 22, 2010, 11:05 AM
  5. [CLOSED] [1.0] FormPanel submitting and EmptyText
    By tdracz in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Dec 16, 2009, 9:09 AM

Posting Permissions