Differential Data Color the Value -reg

Hi Team,

I have some doubt to Color the values if Different.

I have two datatable to compare the value using “ADt.AsEnumerable().Except( ADt_Old.AsEnumerable, System.Data.DataRowComparer.Default).CopyToDataTable”

i am getting a different row data. i want color the cell value this is difference from previous data table. Can you tell me how to do it.

Thanks
Shyam

@Shyam_Pragash

check the thread

Hi Team,

I have two Datatable, both the Datatable has the value in all the column, I want to compare first Datatable with the second Datatable column for the data match, if it fails I need to highlight the cell in some colour in Datatable. using LINQ Query.

Thanks
Shyam

@Shyam_Pragash

first of all highlighting of cells cannot be done through linq…you need to go with loop

loop on your first table use a if condition inside and then if your condition is satisfied then format cell to change color

cheers

Hi @Anil_G

Okey,

Is it possible to get unmatched values in that row ?

@Shyam_Pragash

Using linq yes we cna get unmatched row sinto separata datatable then also you need to loop and then find which row it is and then color it

Cheers

Hi @Anil_G

You this code i am getting the unmatched values row.

ADt.AsEnumerable().Except( ADt_Old.AsEnumerable,System.Data.DataRowComparer.Default).CopyToDataTable

i want to find value this value is not matched with previous datatable.

Can tell me to how list out value in linq ?

Thanks
Shyam

@Shyam_Pragash

You mean you need unmatvhed in old one?

If so flip the datatables in above expression

Cheers

Small example for easy to understand my query:

Dt1
image

Dt2

image

While using this linq query :
Dt1.AsEnumerable().Except( Dt2.AsEnumerable,System.Data.DataRowComparer.Default).CopyToDataTable

Output
image

Expected Output :
I want the above output data from the value

image

@Shyam_Pragash

then just filter datatable and remove columns

cheers