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