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
425
Finding DropDownList Control in UltraGrid
posted

When i click the save button, i need to find the information in the myddl dropdownlist...here is the html

<ultragrid...etc

 

<igtbl:TemplatedColumn BaseColumnName="ConsentOrgan" IsBound="True" Key="ConsentOrgan">
                    <CellTemplate>
                       <asp:DropDownList ID="myddl" runat="server" DataSourceID="odsConsent" DataTextField="Name" DataValueField="ID"
                       AppendDataBoundItems="true"  Style="z-index: 100; width:100%;  position: absolute; top: 0px ">
                    
                       </asp:DropDownList>
                    </CellTemplate>
               
            </igtbl:TemplatedColumn>

 

so my code SHOULD look something like this...

 

protected void txtSave_Click(object sender, DataGridCommandEventArgs e)
        {
            DropDownList TempList;
            String TempValue;
            TempList = (DropDownList)e.Item.FindControl("myddl");
            TempValue = TempList.SelectedItem.Value;


        }

 

but i need help on how to find the control, after that i'm pretty sure i can get the selected item.

 

any ideas?  Thank you

 

Parents
No Data
Reply Children
No Data