We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

When I right click on menu bar, items are not sorted.

Hi,

When I right click on my top menubar, the toolbar list comes up. But they are not sorted in any order. The samething happens in my View->Toolbars menu item (ToolbarListBarItem).

Could these toolbar names be sorted ascending order?

Thanks,
- Kishan


11 Replies

AD Administrator Syncfusion Team July 28, 2008 11:41 AM UTC

Hi Kishan,

Sorry for the delay response.

You can use the ParentBarItem.Items.Sort method to sort the baritems in a ParentBarItem using the specified comparer. Here is a code snippet that shows you "How to sort the barItems depend on its Text property in a ParentBarItem?".

[C#]

this.parentBarItem1.Items.Sort(new SortByBarItemClass());

public class SortByBarItemClass : IComparer
{
public int Compare(object x, object y)
{
BarItem _barX = x as BarItem;
BarItem _barY = y as BarItem;
return _barX.Text.CompareTo(_barY.Text);
}
}

I have attached the sample for your reference. You can download the sample from the following page.
http://websamples.syncfusion.com/samples/Tools.Windows/F75457/main.htm

Please refer to the sample and let me know if you have any questions.

Thank you for interest in Syncfusion Products.

Regards,
Hema



AD Administrator Syncfusion Team July 29, 2008 08:49 AM UTC

Hi Hema,
Thanks for reply.

I have some items like 'CCC', 'BBB', 'AAA' in Toolbars tab of mainFrameBarManager as mentioned in the attached file.
Now, when I right click on menu bar those items('CCC', 'BBB', 'AAA') are comming up, but not sorted.

I want to sort those items.

Thanks
-Kishan




Tools_WF_XPMenus_Sort_9a590253.zip


AD Administrator Syncfusion Team July 31, 2008 06:00 AM UTC

Hello Hema,

Please give me reply, it is very urgent.

Thanks
-Kishan



AD Administrator Syncfusion Team July 31, 2008 10:27 AM UTC

Hi Kishan,

I regret for the delay in getting back to you on this requirement.

We are working on this issue and we will update you before 7-Aug-2008.

Thank you for your patience.

Regards,
Hema



AD Administrator Syncfusion Team August 7, 2008 08:53 AM UTC

Hi Kishan,

Thank you for your patience.

MenuItemMergeOrder property is used to set the order of Toolbar in Context menu. Herewith I have attached the modified sample for your reference. Please go through the sample and let me know if you have any other issues.

Sample Link: http://websamples.syncfusion.com/samples/Tools.Windows/F75457_1/main.htm

Thank you for choosing Syncfusion products.

Regards,
Hema



AD Administrator Syncfusion Team August 7, 2008 09:31 AM UTC

Hi Hema,

It works. Thanks for your help.

Thanks
-Kishan



AD Administrator Syncfusion Team August 7, 2008 10:14 AM UTC

Hi Kishan,

Thank you for the update.

Regards,
Hema




AD Administrator Syncfusion Team August 8, 2008 05:38 AM UTC

Hi Hema,

Sorry, I have come again.
Please run attached .cs file.

On 'Customize' popup window add new bar item 'FFF' using 'New' button.
I want to sort such criteria also.

Let me know whether you understand or not.

Thanks
-Kishan.



Tools_WF_XPMenus_Sort_82de09a6.zip


AD Administrator Syncfusion Team August 8, 2008 12:54 PM UTC

Hi Kishan,

Thank you for your patience.

Please refer the modified sample as per your requirement and let me know if you have any queries.
Sample Link: http://websamples.syncfusion.com/samples/Tools.Windows/F75457_2/main.htm

Thank you for your interest in Syncfusion Products.

Regards,
Hema



AD Administrator Syncfusion Team August 9, 2008 06:18 AM UTC

Hi Hema,

Thanks for quick reply.
It is working.

Regards
-Kishan




AD Administrator Syncfusion Team August 11, 2008 04:24 AM UTC

Hi Kishan,

Thank you for the update.

Regards,
Hema


Loader.
Live Chat Icon For mobile
Up arrow icon