Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Yves on May 14, 2009 04:57
open dhtmlx forum
Strange grid behaviour

Hello,

I'm seeking for a way to avoid that rows (grid object) keep the 'selected' scheme when selecting another row.

Please look at these 2 screenshots to have a clearer insight into this problem. You can see a window called 'ApprovalSheet' with a grid attached to it. When I loop through the rows, the grey bar gets stuck on some of the rows.

http://users.telenet.be/yvestheys/images/window1.jpg

http://users.telenet.be/yvestheys/images/window2.jpg

Is it some CSS setting of the grid ?

Also, I was wondering if there was a solution for the fact that the window itself isn't entirely painted over the PDF which is opened in a layout (bottom-right), altough the grid (inside the window) seems to be on top of the PDF layoutpanel.

Kind regards
Yves
Answer posted by dhxSupport on May 14, 2009 06:50

>>I'm seeking for a way to avoid that rows (grid object) keep the 'selected' scheme when selecting another row.

You can use 3rd paramenter of selectRow(r, fl, preserve, show) method:
# r - row index or row object
# fl - if true, then call function on select
# preserve - preserve previously selected rows true/false (false by default)
# show - true/false - scroll row to view, true by defaul
mygrid.selectRow(r,fl,false,true)
>>Also, I was wondering if there was a solution for the fact that the window itself isn't entirely painted over the PDF which is opened in a layout (bottom-right), altough the grid (inside the window) seems to be on top of the PDF layoutpanel.
Try to use dhxWins.window(id).bringToTop();


Answer posted by Yves on May 14, 2009 07:33

I'm sorry, but at this moment, no code is used to browse trough the rows, it's the user who clicks on certain rows (cells).  Doing so, some rows keep having that grey bar , some are not.

Is there an overall setting in css to remove the entire grey bar from a selected row ?

 

Please advise

Thanks

Yves

 

Answer posted by dhxSupport on May 14, 2009 07:38

To remove background-color for the selected row you can change following css:

div.gridbox table.obj tr.rowselected td.cellselected, div.gridbox table.obj td.cellselected { -  element in a selected cell

div.gridbox table.obj tr.rowselected td{ -  elements in a selected row
Please see more information here http://dhtmlx.com/docs/products/dhtmlxGrid/doc/articles/Creating_custom_skin.html#grid_cust_skin