Hello Experts,
I am trying to changes the color of few rows into red.
Tried following code for that. but it doesn't work.
private Recordset rst = null;
private Connection dbs = null;
int NewSqlCount=0;
{
rst = dbs.openRecordset( "SELECT * FROM CRVMReq " +
"where [Priority] like '" +Highest Priority + "%' " +
"AND ReqStatus like 'OPEN' " +
"and ReqStatusPool NOT like 'FOCUS' " +
“and ReadyTD like'YES'”+
"", AdoConst.adOpenDynamic, 0 );
if( rst.getRecordCount()>0 )
{
NewSqlCount=rst.getRecordCount();
For(int i=0;i<NewSqlCount ; i++)
{
ListCRVM.setForeground( Color.red ); //The problem is at this point.I don't know at this point how i will force to change the color of that rowset only.I hope there must be some propertry of recordset}
}
Else
{
NewSqlCount=0;
ListCRVM.setForeground( Color.black );
}
}
{
rst = dbs.openRecordset(select * from CRVMReq where priority!='Highest Priority' and ReqStatus like 'OPEN' and ReqStatusPool not like 'FOCUS'and ReadyTD='YES'+"", AdoConst.adOpenDynamic, 0 );
if( rst.getRecordCount()>0 )
{
NewSqlCount=rst.getRecordCount();
For(int i=0;i<NewSqlCount ; i++)
{
ListCRVM.setForeground( Color.black );
}
}
Else
{
NewSqlCount=0;
ListCRVM.setForeground( Color.black );
}
}