sfdatagrid lookup table

Hi,

I have 2 sfdatagrid in my forms.

Sfdatagrid1 ref below

Name          Salary

Mark           1000

John             1500

Joseph         2000


Another table Sfdatagrid2 ref below,

EmployeeId  EmployeeName    Salary

1                         John

2                         Mark

3                         Cris

4                         Joseph

I want to populate Sfdatagrid2 base from the information on Sfdatagrid1. Where item 3: Cris = NA since it is not reference to Sfdatagrid1.


Thank you


3 Replies

MA Mohanram Anbukkarasu Syncfusion Team September 20, 2021 01:43 PM UTC

Hi Mark, 

Thanks for contacting Syncfusion products.  

We are little unclear about your requirement “I want to populate Sfdatagrid2 base from the information on Sfdatagrid1.” We suspect that your requirement is to set value for the Salary column in SfDataGrid2 based on the Salary column value of the corresponding Name in SfDataGrid1. Please let us know if we have misunderstood your requirement. We will update with further details based on your confirmation.  

Regards, 
Mohanram A. 



MJ Mark Jayvee replied to Mohanram Anbukkarasu September 21, 2021 07:19 AM UTC

Hi Mohanram, sorry for bad explanation.

below are the tables I am working on. I call it Sfdatagrid1 and Sfdatagrid2.

as illustrated below, sfdatagrid1 have data for column name and salary. For sfdatagrid2, I have 3 columns which is EmployeeId, EmployeeName and Salary.


for column EmployeeName have the same name as in Sfdatagrid1 but sometimes there are scenario where name is not there, as shown in the example. What I want to do, everytime my form will show, I want the column Salary in sfdatagrid2 will be populated according to the data in the sfdatagrid1. How can I achieve that?

Sfdatagrid1 ref below

Name          Salary

Mark           1000

John             1500

Joseph         2000

I m expecting Sfdatagrid2 to be, ref below.

EmployeeId  EmployeeName    Salary

1                         John                 1500

2                         Mark                1000

3                         Cris                     NA

4                         Joseph               2000



BT Balamurugan Thirumalaikumar Syncfusion Team September 22, 2021 10:42 AM UTC

Hi Mark, 

Thank you for interesting in Syncfusion products. 

We have checked your query “I want to populate Sfdatagrid2 base from the information on Sfdatagrid1. Where item 3: Cris = NA since it is not reference to Sfdatagrid1” at our end. We have prepared the simple sample to achieve your requirement and it is available in the following link for your reference. 


Please have a look at this sample and let us know if we misunderstood your query or if you would require any other assistance. we will be always happy to assist you. 

Thanks & Regards, 
Balamurugan Thirumalaikumar  


Loader.
Up arrow icon