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

Dynamic Values from textbox and Dropdownlist

2 Answers 216 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Md
Top achievements
Rank 1
Md asked on 14 Mar 2017, 02:22 PM

Hi, I have a radgrid, which has some columns created dynamically from code-behind, and rest of the columns are auto generated coming from the DataSource. The dynamic columns are : 1) CheckBox Column created through GridClientSelectColumn from backend(VB) 2)the remaining are a DropDown an TextBox created inside a GridTemplateColumn from backend(VB). I have also created hidden input field, to hold the values  fromt he dropdown and the textbox respectively. 

I followed some of the solution provided in the forum, Unfortunately, no success. Can anybody please help me to export this data. As of now, if i try to export in excel or pdf, I am getting a blank column in place of the textbox and "select" in the column representing the DropdownList and "False" in the column representing the CheckBox Column. Please advice or point to me in the right direction

I tried iterating the entire grid, and copy the selected value from the dropdownlist, but it is throwing a NullException, the values from TextBox is Empty

Thanks, in advance

2 Answers, 1 is accepted

Sort by
0
Austin
Top achievements
Rank 1
answered on 03 Oct 2018, 12:30 PM

I have a drop down which is quite dynamic and huge set of data(50-60+) data.

My manual scenario is I reach out to that page,click on drop-down icon,type expected value, and dropdown will bring that typed keys in selection, hitting enter will bring it in selection mode  in drop-down.

I tried to acheive it with following code

//Identifying drop down icon.

Element change_system =Find.ByXPath("//select[@id='ddlSystemClientId']");

//clicking on drop down icon, which expand drop down

ActiveBrowser.Actions.Click(change_system);

//Typing or sending keys to select specific value which is 50th position in drop down

ActiveBrowser.Actions.SetText(change_system,"core speaker");  

I got an error 

Target '[Element: 'select:0' (id=ddlSystemClientId)]' is not a supported element to set text to.

(PFA Screenshot)

What can be possible code for this in coded staep

 

0
Elena
Telerik team
answered on 04 Oct 2018, 03:16 PM
Hi Austin,

Thank you for contacting us. 

The forum post you have found is related to a Telerik product different from Test Studio. Therefore I have submitted a support ticket with the shared information, on your behalf. Its id is 1097815 and you could expect further information in it shortly. Thank you for your understanding! 

Regards,
Elena Tsvetkova
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
Md
Top achievements
Rank 1
Answers by
Austin
Top achievements
Rank 1
Elena
Telerik team
Share this question
or