Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by vaidyasr on Mar 01, 2009 23:27
open dhtmlx forum
dhtmlxgrid Style

Hi,
I would like to display the grid in the following way, can you please let me know how to achive?.
1. Select only the 1st cell of the grid instead of selecting the whole row.
2. hide the grid lines
3. merge the 1st & 2nd header of the grid. Right now it is possible to merge the 1st & 2nd if the header value is #cspan in the 2nd column. Is there is any way that I can specify #cspan in the 1st column?.
4. show tooltips on the cells.
Answer posted by dhxSupport on Mar 02, 2009 02:12

1) To set styles to the selected row or cell use following styles:

div.gridbox_style table.obj tr.rowselected td.cellselected  - specify style of the selected cell

div.gridbox_style table.obj tr.rowselected td - specify style of the selected row

_style - name of the grid's style (for ex. _light)

So to deny row selecting use: 

div.gridbox table.obj tr.rowselected td {

background-color: #fff;

}

After that only selected cell will be highlighted

2) You can do it via css:

div.gridbox_style table.obj tr{
  background-color: #fff;
 }

More information abotu grid's styles you can find here http://dhtmlx.com/docs/products/dhtmlxGrid/doc/articles/Creating_custom_skin.html#grid_cust_skin

3) Theres is no way to specify #cspan in the 1st column. #cspan command merges header's column in which it was defined with the left column.

4) Use enableTooltips(list) where list - list of true/false values, tooltips enabled for all columns by default. You can find example here http://dhtmlx.com/docs/products/dhtmlxGrid/samples/rows_columns_manipulations/grid_tooltip.html