Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
210
Cell style Based on Data in other Cell
posted

I have solved it so:

CellValuePresenter cvp1;

foreach (DataRecord record in _myView.MyTable.RecordManager.Unsorted)
{for (int iWeek = 1; iWeek <= 53; ++iWeek) 

{         coolumnValue = string.Format("Cell{0}", iWeek);

   if (record.Cells[coolumnValue].Value == null)   {  continue;}

                    columnType = string.Format("CellType{0}", iWeek);

                    cvp1 = CellValuePresenter.FromCell(record.Cells[coolumnValue]);
                
                    if ((int)record.Cells[columnType].Value == 8)
                    {
                        if (cvp1 != null)
                            cvp1.Background = Brushes.LightSalmon;
                    }

......

I have solved it so. Are there other options? With style?
I have 52-53 columns of data and for each there is a column with Type... total there are only 27 Records.
  My problem - it is too slow and is done only for visible rows,
  RecordContainerGenerationMode= "Preload" and RecordLoadMode= "PreloadRecords"
Parents Reply
  • 210
    posted in reply to Stefan

    That's what I was looking for...

    KeepCellStyleOutOfVisibleAreaSample.zip http://ko.infragistics.com/community/forums/t/14111.aspx

    <Setter Property="Background">
                    <Setter.Value>
                        <MultiBinding Converter="{StaticResource ValueToBackgroundConverter}">
                            <Binding RelativeSource="{RelativeSource Self}" Path="Field"/>
                            <Binding RelativeSource="{RelativeSource Self}" Path="Record" />
                        </MultiBinding>
                    </Setter.Value>
                </Setter>

Children