Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

add new row to databound devexpress aspxlookup list?

Options
  • 10-11-2012 3:55pm
    #1
    Registered Users Posts: 4,844 ✭✭✭


    Hi
    I've recently inherited a web app that uses these controls. The bind to something called an datacontroller, but for the life of me I can't find a way to add a new "Please Select" row to the resulting dropdown list.

    Any help would make my week!


Comments

  • Registered Users Posts: 85 ✭✭slyph


    Hi
    I've recently inherited a web app that uses these controls. The bind to something called an datacontroller, but for the life of me I can't find a way to add a new "Please Select" row to the resulting dropdown list.

    Any help would make my week!

    Go to the page markup and look for the id of the drop down list. Inside that tag, add the tag for a list item or w/e it is called - cant remember it right now. There is a property you can set to true so it is selected by default - again cant remember the name offhand but it should showup in the IDE.


  • Registered Users Posts: 4,844 ✭✭✭shootermacg


    Yeah, I would easily add one if it was an asp.net drop down list, problem is, you can't actually add items to this using the markup. I did find an unsatisfactory solution which is to add it using javascript in the init event.

    It's not really the way I want to do it but I really can't find a way using the designer or the exposed properties of this control.
    <dxwdc:ASPxLookup ID="ddlTest" runat="server" TabIndex="0">
                <EditorProperties>
                    <ClientSideEvents>
                        <SelectedIndexChanged>
    
                        </SelectedIndexChanged>
                        <Init>
                            function(source,e){ ddlTest.Add("", ""); }
                        </Init>
                    </ClientSideEvents>
                </EditorProperties>
            </dxwdc:ASPxLookup>
    


Advertisement