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

Chose an item from a listbox that will perform a parse rule on a text and output the parsed item to textbox

2 Answers 45 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ilia
Top achievements
Rank 1
Ilia asked on 17 May 2015, 12:57 PM

Hello Everbody, 

I have the following question.

I have this Windows Form Application in C#.

What it does is you input a string in a textBox then you click on a button and it performs some edits on the string you have entered and it outputs it to another textbox. Till here everything is fine but I would like to have a listBox where I can have a rule like extract first name and it will parse the string look for the first name based on some internal rules and extract it then it will output only the first name, because only that rule was selected from the listBox and no other output. If I select first name rule from the listbox and also select last name rule from the list box it will execute both rules on the inputted text and output it in the output textbox.What can you suggest I can do for it?Any help will be appreciated.

Regards,

Ilia

2 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 18 May 2015, 06:56 AM
Hi Ilia,

Thank you for writing.

Perhaps you are looking into the RadListControl which will serve as a list box in your case. It supports multi select as well. 

What I would suggest is to store the desired rules in the Tag of each data item in RadListControl. Then, when the parsing starts, you iterate the SelectedItems and get the respective item rule from its Tag.

I hope that you find this information useful. Should you have any other questions, do not hesitate to contact us.

Regards,
Stefan
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Ilia
Top achievements
Rank 1
answered on 20 May 2015, 10:57 PM

Thank you Stefan,

i did it exactly as you said. I have created the rules and when I iterate through the list i applyed them in the order they were added to the list! Thank for the help!

 Regards,

Ilia

Tags
General Discussions
Asked by
Ilia
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Ilia
Top achievements
Rank 1
Share this question
or