This is a migrated thread and some comments may be shown as answers.

[Solved] form template in MasterTableView - how to retrieve dropdownlist value

1 Answer 121 Views
Grid
This is a migrated thread and some comments may be shown as answers.
StringTheory
Top achievements
Rank 1
StringTheory asked on 30 May 2009, 03:13 PM
Hi,
I have three drop-down lists in the FormTemplate section of a MasterTableView. The lists are part of about 10 fields which are edited for the current record. Depending on the value of two of the drop-down lists, I need to change the sqldatasource query behind the third drop-down list. I've implemented code in the past where I'm intercepting thing in this EditForm after a user clicks a command button, but I can't figure out how a.) determine the row's index value for the row holding the FormTemplate, and b.)grab the selectedValue of a drop-down list in that FormTemplate. 

thanks in advance !

1 Answer, 1 is accepted

Sort by
0
StringTheory
Top achievements
Rank 1
answered on 30 May 2009, 07:26 PM
I figured this out from another post with a similar question so will leave the general method of solution:
In the selectedIndexChanged handler for one of the drop-down lists, 
       Dim DDL1 as DropDownList
    Dim DDL2 as DropDownList
    Dim theEditTableItem as Telerik.WebControls.GridEditableItem
        DDL1 = sender
        theEditTableItem= DDL1.NamingContainer
        DDL2 = theEditTableItem.FindControl("theIDforTheControlYouAreLookingFor")

'from this point I should be able to set the query for the third DDL either manually or via setting session parameters.
Tags
Grid
Asked by
StringTheory
Top achievements
Rank 1
Answers by
StringTheory
Top achievements
Rank 1
Share this question
or