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
720
Accessing Webdropdown Value and Text ServerSide
posted

I am using a WebDropDown with a WebDataGrid template.  I have 3 columns in the grid ("Recnum", "Name" and "Details")

When an item in the WebDataGrid is selected, the WebDropDown displays the "Name", and I 'think' I am setting the Value to "Recnum" using the following Code:

 

 

 

 

 

 

 

 

 

 

 

function rowSelChange(sender, args) {

 

 

 

   var dd = $find('<%= webDropDown1.ClientID %>');

 

 

 

   var rowid = args.getSelectedRows().getItem(0).get_cell(0).get_text();

 

 

 

   var rowName = args.getSelectedRows().getItem(0).get_cell(1).get_text();

   dd.set_currentValue(rowid,

 

true);

   dd._elements[

 

"Input"].value = rowName;

   dd._elements[

 

"Input"].focus();

   dd.closeDropDown();

}

 

 

 

function cancelDDSel(sender, args) {

   args.set_cancel(

 

true);

}

However, when I try to access the values in my code behind, the SelectedItem properties, SelectedValue, etc., are all empty or nothing:

Dim

 

 

 myRecnum As Guid = New Guid(webDropDown1.SelectedValue())

While I want the user to see the "Name", I need to use the "Recnum" value.  How do I access this?