Need help with splitbuttonelement in ribbonbar

10 posts, 0 answers
  1. میثم
    میثم avatar
    6 posts
    Member since:
    Jan 2017

    Posted 12 Jan 2017 Link to this post

    Hi

    In the ribbonbar i have placed splitbuttonelement and it has several menuitems. I have problem with the value (or index) of menu item that selected by user.i need a code to learn how can i do this and what events need to use.

     Thanks.

  2. Dimitar
    Admin
    Dimitar avatar
    2983 posts

    Posted 13 Jan 2017 Link to this post

    Hello,

    You need to use the Click event of each item in this case. An example for this is available here: Getting Started.

    I hope this information is useful. Let me know if you need further assistance.

    Regards,
    Dimitar
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. میثم
    میثم avatar
    6 posts
    Member since:
    Jan 2017

    Posted 13 Jan 2017 Link to this post

    Thanks. But in the related link there wasn't any usefull code for selecting menuitems of splitbutton in click event. 
  4. Dimitar
    Admin
    Dimitar avatar
    2983 posts

    Posted 13 Jan 2017 Link to this post

    Hi,

    I am not sure what exactly you want to achieve in this case. Could you please elaborate?

    Thank you in advance for your patience and cooperation.  

    Regards,
    Dimitar
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  5. میثم
    میثم avatar
    6 posts
    Member since:
    Jan 2017

    Posted 13 Jan 2017 Link to this post

    There is not selecteditem and selected index property for splitbutton.
  6. Dimitar
    Admin
    Dimitar avatar
    2983 posts

    Posted 13 Jan 2017 Link to this post

    Hi,

    Yes, it does not, this is not a DropDownList and it does not have selected item. You can only set a DefaultItem which will be executed when clicking the button if there is no DefaultItem, the drop down will be opened.  

    If you need a control which allows selecting items use RadDropDownList.  

    I hope this will be useful. 

    Regards,
    Dimitar
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  7. میثم
    میثم avatar
    6 posts
    Member since:
    Jan 2017

    Posted 13 Jan 2017 Link to this post

    Thanks for your guidance. I tried to write a code with this property. And i seached in many sites  . But no success. I would be very grateful if you write a sample code .
  8. میثم
    میثم avatar
    6 posts
    Member since:
    Jan 2017

    Posted 14 Jan 2017 Link to this post

    Is this true form:

    If(radsplitbuttonelement.defaultitem == menuintem1) 

    .....

     

  9. میثم
    میثم avatar
    6 posts
    Member since:
    Jan 2017

    Posted 15 Jan 2017 Link to this post

    I am waiting for your answer.
  10. Dimitar
    Admin
    Dimitar avatar
    2983 posts

    Posted 16 Jan 2017 Link to this post

    Hi,

    You just need to set the default item:
    radSplitButtonElement1.DefaultItem = radSplitButtonElement1.Items[3];

    I have attached a small sample project that shows how you can use the split button as well.

    I hope this will be useful. Let me know if you have additional questions.

    Regards,
    Dimitar
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top