Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
420
Default values in Insert Row dropdowns
posted

Hi!

I have a grid with Row Adding enabled. I have defined DropDownProviders to some columns. What I haven't been able to implement is a way to get values from other dropdowns on the page as default values of the Insertion Row dropdowns. Here's the detailed explanation of the situation:

- I have dropdown on my page which binds to a datasource (say _ddProject)

- I have databound grid with Project as one column

- I have DropDownProvider in the Insertion Row which uses the same datasource than _ddProject

How can I use the _ddProject.SelectedValue as the selected value of Insertion Row dropdown?

Parents
  • 420
    posted

    Dropdowns have CurrentValue, but I haven't been able to set it by using code like this:

    <ig:DropDownProvider ID="BranchProvider">

    <EditorControl EnableDropDownAsChild="False" DataSourceID="SqlDataSource" TextField="name" ValueField="name" CurrentValue='<%= _dropdown.SelectedValue %>'>

    <DropDownItemBinding TextField="name" ValueField="name"/>

    </EditorControl>

    </ig:DropDownProvider>

     

     

    Is it possible to set the CurrentValue to match a value of a control somewhere on your page or do I have to do this on client side on TemplateOpened event?

Reply Children