Wednesday, 18 November 2015

Changing the color of a row, using a condition in the grid:

  • I created a new form with custtable data source.
  • In the design node,added a grid with some fields(accountnum, custgroup, creditmax, cashdisc) .
  • Override the displayoptions method in the custtable datasource.

public void displayOption(CustTable _CustTable, FormRowDisplayOption _options)
{
    int myColor=WinApi::RGB2int(50,255,50);
;

//if(_CustTable.CreditMax <= 100100)
    if(_CustTable.CustGroup == "30")
_options.backColor(myColor);

super(_CustTable, _options);
    //CustTable_ds.research();
}

No comments:

Post a Comment