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.
Unfortunately, activation email could not send to your email. Please try again.

Is there a Visual Basic example of the excellent Grid sorting demo I find in the samples?

Thread ID:

Created:

Updated:

Platform:

Replies:

124810 Jun 30,2016 06:56 PM Jul 1,2016 06:17 AM Windows Forms 5
loading
Tags: GridControl
Konrad Jaschke
Asked On June 30, 2016 06:56 PM

Thanks!

Konrad Jaschke
Replied On June 30, 2016 09:18 PM

I'm getting close to figuring it out, but I've got a question.

In my Compare Function I inspect the x object by doing a simple MsgBox(x.ToString())

CellValue = '14'

it would think I should be getting 14 (the actual value in the cell.

I've been following your VB code from this page and adapting it to my Listview Sort Comparer I wrote that works just fine.

https://www.syncfusion.com/kb/454/how-do-i-implement-my-own-custom-icomparer-to-sort-a-column-in-the-gridcontrol

When I look in the C++ Sorting example the comparer function has the following, which I'm lost at how to convert to VB.

//the idea is to get at the FormulaTag object in the GridStyleInfoStore passed in
//and use the FormulaTag.Text property to compare two cells.
GridStyleInfo xStyle = new GridStyleInfo((GridStyleInfoStore) x);
GridStyleInfo yStyle = new GridStyleInfo((GridStyleInfoStore) y);
string xs = (xStyle.FormulaTag != null) ? xStyle.FormulaTag.Text : "";
string ys = (yStyle.FormulaTag != null) ? yStyle.FormulaTag.Text : "";
double xd = 0;
double yd = 0;
double.TryParse(xs, System.Globalization.NumberStyles.Any, null, out xd);
double.TryParse(ys, System.Globalization.NumberStyles.Any, null, out yd);
c = xd.CompareTo(yd);

All I need is the actual cellvalue so I can check if its numeric, Date, or just string and do the appropriate type of search.

Konrad Jaschke
Replied On July 1, 2016 03:26 AM

I got it all figured out.  Thanks!

Amal Raj Umapathy Selvam [Syncfusion]
Replied On July 1, 2016 04:34 AM

Hi Konrad, 

Thanks for using Syncfusion products. 

We are glad to hear that the issue has been resolved. Please let us know, If you need any further assistance. 

Regards, 
Amal Raj U. 


Konrad Jaschke
Replied On July 1, 2016 04:48 AM

You don't have any of the sample projects is VB?

Amal Raj Umapathy Selvam [Syncfusion]
Replied On July 1, 2016 06:17 AM

Hi Konrad, 

Sorry for the inconvenience. 

The VB sample for the mentioned KB is attached below. 


Regards, 
Amal Raj U. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;