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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to compare the values of the columns

Thread ID:

Created:

Updated:

Platform:

Replies:

64151 Jul 16,2007 10:17 AM UTC Jul 20,2007 04:41 AM UTC ASP.NET Web Forms (Classic) 3
loading
Tags: Grouping
Yarius Yacinus
Asked On July 16, 2007 10:17 AM UTC

Hi,

I would like to know how to compare the values of two different columns in my grid GC ,and how to create conditionnnal expression based on the result of this comparaison

Regards ,

Yacinus

Valli [Syncfusion]
Replied On July 17, 2007 09:37 AM UTC

Hi Yacinus,

Attached is the sample link which uses Expression Fields and compare 2 column values.

http://websamples.syncfusion.com/samples/Grid.Web/5.1.0.51/Forum-64151/main.htm

The above sample display the value either '0' or '1' in the column '"ConditionalExpressionColumn1".

The value '1' is displayed when the condition is true ie the [ProductID]>15 And [Quantity] < 45.

The value '0' is displayed when the condition is false.

Please let us know if this helps you.

Regards,
Valli

Yarius Yacinus
Replied On July 19, 2007 09:22 AM UTC

Hello,

What if I want to change the background column according to the result of the comparaison .

Tnanks

Regards,
Yacinus

Valli [Syncfusion]
Replied On July 20, 2007 04:41 AM UTC

Hi Yacinus,

Attached is the sample which helps you to change the background color and value of the cells which hold the comparison result of the Expression fields.

http://websamples.syncfusion.com/samples/Grid.Web/5.1.0.51/Forum-64151-1/main.htm

'OnQueryCellStyleInfo' event is used to check the result of expression fields and change the column accordingly.

In the sample when the result of the expression field is false, the value '0' is checked and the celltext has been changed to 'False' and the background color to red.

If the result of the expression field is true, the value '1' is checked and the celltext has been changed to 'True' and the background color to green.

Please let us know if you have any other queries.

Regards,
Valli

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.

Warning Icon 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.Close Icon

;