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

3 posts, 0 answers
  1. Ilia
    Ilia avatar
    2 posts
    Member since:
    May 2015

    Posted 17 May 2015 Link to this post

    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. Stefan
    Admin
    Stefan avatar
    2890 posts

    Posted 18 May 2015 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
  4. Ilia
    Ilia avatar
    2 posts
    Member since:
    May 2015

    Posted 20 May 2015 Link to this post

    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

Back to Top