Check documentation for the
latest version of dhtmlxSuite
setRowColor DHTMLX Docs
Samples
Forum
Support
Documentation
/
Suite 5.X
addRow
addRowAfter
addRowBefore
addRowFromClipboard
adjustColumnSize
attachEvent
attachFooter
attachHeader
attachToObject
cellById
cellByIndex
cellToClipboard
cells
cells2
changePage
changePageRelative
changeRowId
checkAll
clearAll
clearAndLoad
clearChangedState
clearConfigCookie
clearSelection
closeItem
collapseAll
collapseAllGroups
collapseColumns
collapseGroup
collectTreeValues
collectValues
copyBlockToClipboard
copyRowContent
deleteChildItems
deleteColumn
deleteRow
deleteSelectedRows
destructor
detachEvent
detachFooter
detachHeader
disableCell
disableUndoRedo
doRedo
doUndo
doesRowExist
editCell
editStop
enableAccessKeyMap
enableAlterCss
enableAutoHeight
enableAutoHiddenColumnsSaving
enableAutoSaving
enableAutoSizeSaving
enableAutoWidth
enableBlockSelection
enableCSVAutoID
enableCSVHeader
enableCellIds
enableColSpan
enableColumnAutoSize
enableColumnMove
enableContextMenu
enableDistributedParsing
enableDragAndDrop
enableDragOrder
enableEditEvents
enableEditTabOnly
enableExcelKeyMap
enableHeaderImages
enableHeaderMenu
enableKeyboardSupport
enableLightMouseNavigation
enableMarkedCells
enableMathEditing
enableMathSerialization
enableMercyDrag
enableMultiline
enableMultiselect
enableOrderSaving
enablePaging
enablePreRendering
enableResizing
enableRowsHover
enableRowspan
enableSmartRendering
enableSmartXMLParsing
enableSortingSaving
enableStableSorting
enableTooltips
enableTreeCellEdit
enableTreeGridLines
enableUndoRedo
enableValidation
expandAll
expandAllGroups
expandColumns
expandGroup
filterBy
filterByAll
filterTreeBy
findCell
forEachCell
forEachRow
forEachRowInGroup
forceFullLoading
forceLabelSelection
getAllRowIds
getAllSubItems
getCellExcellType
getChangedRows
getCheckedRows
getChildItemIdByIndex
getColIndexById
getColLabel
getColType
getColTypeById
getColWidth
getColumnCombo
getColumnId
getColumnLabel
getColumnsNum
getCombo
getCustomCombo
getFilterElement
getFilterElementById
getFooterLabel
getHeaderMenu
getItemIcon
getItemImage
getItemText
getLevel
getMarked
getOpenState
getParentId
getRedo
getRowAttribute
getRowData
getRowId
getRowIndex
getRowsNum
getSelectedBlock
getSelectedCellIndex
getSelectedRowId
getSortingState
getStateOfView
getSubItems
getUndo
getUserData
gridFromClipboard
gridToClipboard
gridToGrid
gridToTreeElement
groupBy
groupStat
hasChildren
init
insertColumn
isColumnHidden
load
loadHiddenColumnsFromCookie
loadOpenStates
loadOrderFromCookie
loadSizeFromCookie
loadSortingFromCookie
lockRow
makeFilter
makeSearch
mark
moveColumn
moveRow
moveRowDown
moveRowTo
moveRowUp
openItem
parse
pasteBlockFromClipboard
post
preventIECaching
printView
refreshComboColumn
refreshFilters
refreshMath
registerCList
resetColumnsOrder
rowToClipboard
rowToDragElement
saveHiddenColumnsToCookie
saveOpenStates
saveOrderToCookie
saveSizeToCookie
saveSortingToCookie
selectAll
selectBlock
selectCell
selectRow
selectRowById
serialize
serializeToCSV
setActive
setAwaitedRowHeight
setCSVDelimiter
setCellExcellType
setCellTextStyle
setCheckedRows
setColAlign
setColLabel
setColSorting
setColTypes
setColVAlign
setColValidators
setColWidth
setColspan
setColumnColor
setColumnExcellType
setColumnHidden
setColumnId
setColumnIds
setColumnLabel
setColumnMinWidth
setColumnsVisibility
setCustomSorting
setDateFormat
setDelimiter
setDragBehavior
setEditable
setExternalTabOrder
setFieldName
setFiltrationLevel
setFooterLabel
setHeader
setIconsPath
setIconset
setImageSize
setImagesPath
setInitWidths
setInitWidthsP
setItemCloseable
setItemIcon
setItemImage
setItemText
setMathRound
setNoHeader
setNumberFormat
setOnOpenEndHandler
setOnOpenStartHandler
setPagingSkin
setPagingTemplates
setPagingWTMode
setRowAttribute
setRowColor
setRowData
setRowExcellType
setRowHidden
setRowId
setRowTextBold
setRowTextNormal
setRowTextStyle
setRowspan
setSerializableColumns
setSerializationLevel
setSizes
setSkin
setSortImgState
setStyle
setSubGrid
setSubTree
setTabOrder
setUserData
showRow
sortRows
sortTreeRows
splitAt
startFastOperations
stopFastOperations
submitAddedRows
submitColumns
submitOnlyChanged
submitOnlyRowID
submitOnlySelected
submitSerialization
toExcel
toPDF
treeToGridElement
uid
unGroup
uncheckAll
unmarkAll
unselectRowById
updateCellFromClipboard
updateFromXML
updateGroups
updateRowFromClipboard
validateCell
Start
TreeGrid
dhtmlXTreeGrid API
Methods
setRowColor
sets the background color of a row (via the bgcolor attribute)
void
setRowColor
(
string|number
row_id
,
string
color
);
row_id
string|number
the id of a row
color
string
a color value
Example
mygrid.
setRowColor
(
"row1"
,
"red"
)
;
Back to top