0

グリッド セルの背景を変更する必要があります。コードでテキストの色を変更します。

getRowClass: function(record, rowIndex, rowParams, store){
var grupo = record.get("tipo");
   if (grupo == 'G'){
   console.log('Grupo');
   return 'redUnderlinedText';
}

.redUnderlinedText {
    background-color: blue;// <= this code doesn't work
    color: red;
    text-decoration: underline;
    cursor: pointer;
}

私のコードを含む画像

以下に示すように、セルの背景を変更したいと思います。

私はこれを必要とする

これは可能ですか?

ありがとう、クラウディオ。

4

1 に答える 1

0

奇妙なことに、グリッドに表示される背景は、各セル スタイルの結果です。

したがって、この:

.x-grid-cell {
    background-color: red;
}

選択されていないすべてのセルで機能するはずです。

あなたの場合、私は試してみます:

.redUnderlinedText . x-grid-cell {
    background-color: blue !important;
    color: red;
    text-decoration: underline;
    cursor: pointer;
}
于 2012-09-26T22:07:37.947 に答える