Welcome to the Xceed Community | Help
Community Search  
More Search Options

Changing Cell Style based on another cell's data

Sort Posts: Previous Next
  •  08-02-2009, 2:57 AM Post no. 23109

    Changing Cell Style based on another cell's data

    Problem: I have a system that compares two datasets and displayes the differences in a DataGridControl. my customer wanted to see the data as below:

    DataSet 1 

    1 Adian Test 20000
    2 Adian Dev 20000
    3 Adian PPM 2000
    4 Adian SPM 3000

    DataSet 2

    1 Adian Test 20000
    2 Adian Dev 20002
    3 Adian PPM 2000
    4 Adian GPM 3000

    The result format my customer is requsting for is as below.

    2 Adian Dev 20000
    2 Adian Dev 20002
    4 Adian SPM 3000
    4 Adian GPM 3000

    Please someone help me to achieve this or feacibility of this requirement. 

    I would be delighted to get a quick response from you guys.

    Thanks in advance, Mohideen


    Cheers,
    Mohideen
  •  08-02-2009, 10:25 PM Post no. 23111 in reply to 23109

    Re: Changing Cell Style based on another cell's data

    XCeed Members,

    Please let me know if this can be achived anyways.


    Cheers,
    Mohideen
  •  08-03-2009, 8:26 AM Post no. 23118 in reply to 23111

    Re: Changing Cell Style based on another cell's data

    In order to achieve the results you are looking for, you will need to combine both DataTables and display the combined result. It is currently not possible to display 2 separate data sources in the grid.
    Senior Technical Writer
    - Xceed Software

    In three words I can sum up everything I've learned about life: it goes on.
  •  08-03-2009, 1:30 PM Post no. 23125 in reply to 23118

    Re: Changing Cell Style based on another cell's data

    Thanks for your response, 

    Let me make my question very clear. I am not lokking for showing data from two data sources here. I have Data set 1 and data set 2. I am comparing the rows and creating my Result Data Set.

    The problem here is to display the result as mentioned above. I don't know whether we can compare different cell content and change the Forground of cells to red.

     


    Cheers,
    Mohideen
  •  08-04-2009, 9:19 AM Post no. 23146 in reply to 23125

    Re: Changing Cell Style based on another cell's data

    Yes. You can create an implicit style that targets DataCell and that has triggers that will set the Foreground property whenever they are "hit".
    Senior Technical Writer
    - Xceed Software

    In three words I can sum up everything I've learned about life: it goes on.
  •  08-04-2009, 2:15 PM Post no. 23150 in reply to 23146

    Re: Changing Cell Style based on another cell's data

    Can you give me some examples for creating this conditional trigger. Here is what I am trying to do in psedo code:

    Input: Result Dataset which is outcome of dataset comparision. 

    1. Take first two rows
    2. Compare the vertically and update the cells' Foreground color or set some style.
    3. Do the step 1 and 2 untill end of the input dataset.


    Cheers,
    Mohideen
  •  08-17-2009, 8:10 AM Post no. 23364 in reply to 23109

    Re: Changing Cell Style based on another cell's data

    Well quite an interesting requirement.

     

    You can get this done by comparing the two datasets and also by comparing their respective Datatables "DataRow[ColumnName]" and if they are not equal then you can add the whole row in the other DataSet.

    You can bind the DataSet to the DataGrid.

    Thanks,

    Paras Sanghani

     


    Nothing Is Impossible
  •  08-17-2009, 8:12 AM Post no. 23365 in reply to 23109

    Re: Changing Cell Style based on another cell's data

    Well quite an interesting requirement.

     

    You can get this done by comparing the two datasets and also by comparing their respective Datatables "DataRow[ColumnName]" and if they are not equal then you can add the whole row in the other DataSet.

    You can bind the DataSet to the DataGrid.

    Thanks,

    Paras Sanghani
    Nothing Is Impossible
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.