Categories | Question details Back To List | ||||||||||||||
Grig XML Configuration In order to use Grid like a form, I use your sample as in:http: //dhtmlx.com/docs/products/dhtmlxGrid/samples/cell_types/pro_col_excell.html?un=1233253751000 but I have questions: 1.When I execute this code, color #D4D0C8 does not apply to the whole column, only to the first row (header). 2.I set a cell to type of dhxCalendar, but when I click it, the calendar appers behind the window, where the grid is drawn. 3. What Event can I use to catch a Selection when the cell type is co or coro? Thanks, John Answer posted by Support on Feb 02, 2009 02:20 >>1.When I execute this code, color #D4D0C8 does not apply to the whole column column@color setting applied to whole column, but if you have some other background color defined by cell@style, row@style, cell@class - it will override global column setting. >>2.I set a cell to type of dhxCalendar, but when I click it, the calendar appers behind the window, where the grid is drawn. You can add the next css rule on the page <style> .dhtmlxcalendar{ z-index:9999; } </style> >>3. What Event can I use to catch a Selection onEditCell stage 2 called for any editor type when edit operation finished, it provides both old and new value as parameters of event. Answer posted by j.lagos on Feb 02, 2009 02:40 Thank you, the z-index change the calendar displaying level ! To this grid, no I don't set any style. I apply your sample as it is (within FIREFOX!). To this color becomes only the first row, which is in <head>. If I set an event onEditCell, I have a peculiar problem: the cell does not updated with the new selection, it keeps the old one.
Thanks, John
Answer posted by Support on Feb 02, 2009 03:37 >>To this grid, no I don't set any style. I apply your sample as it is Online sample works correctly while checking from our side, same for any sample created by the same approach - please check attached sample Setting of column@color is equal to the usage of setColumnColor ( the header actually is not affected, it has native color #D4D0C8 for default skin ) >>If I set an event onEditCell, I have a peculiar problem: the cell does not updated with the new selection, it keeps the old one. When attaching custom code to events, be sure to finish it with return true; if you need not change the default behavior Returning false or returning nothing from onEditCell event handler treated as "deny result of edit operation" command, which result in reverting to old value. Attachments (1)
Answer posted by j.lagos on Feb 02, 2009 04:24 This is the code which creates the Grid var dhxCnfgWins = dhxPlayWins.createWindow("wConfig", (window.innerWidth/2)- 300, 20, 600, 300); // dhxPlayWins.setSkin("aqua_sky"); mygrid_config.attachEvent("onEditCell",function(stage,id,ind){ ...and this is the XML: <?xml version="1.0" encoding="UTF-8"?> <rows><head> <column width="200" type="coro" align="left" color="#D4D0C8" sort="na">Parameter</column> <column width="*" type="coro" align="left" sort="na">Values<option value="017">017</option><option value="126" >126</option></column></head> <row id="1"><cell>Source (DB/File)</cell><cell type="ch">0</cell></row> <row id="2"><cell>Database</cell><cell type="ed">imarket</cell></row> <row id="3"><cell>File path</cell><cell type="ed">/Data</cell></row> <row id="4"><cell>Date</cell><cell type="dhxCalendar">2008-11-11</cell></row> <row id="6"><cell>Market</cell><cell>M</cell></row> <row id="7"><cell>Shop</cell><cell>M</cell></row> <row id="5"><cell>Indexes</cell><cell>017,126</cell></row> <row id="8"><cell>Product</cell><cell type="ed">304013006</cell></row> <row id="9"><cell>Show Orders?</cell><cell type="ch">1</cell></row> <row id="init"><cell>Init data?</cell><cell type="ch">1</cell></row> </rows> I edit it in order to be readable. In XML I copied from yr sample, I 've made minor modifications. While the configuration is the same, I don't understand why this difference. Also, if I use : mygrid_config.getCellCombo, I get the error: mygrid_config.getCellCombo is not a function Thanks, John Answer posted by Support on Feb 02, 2009 09:52 Issue still can't be reconstructed locally, the sample with similar code ( grid in window ) and same XML works correctly locally. Is it possible that you have some additional css file on the page , which defines background color for TD element in global? Answer posted by j.lagos on Feb 02, 2009 10:03 No, I don't load any separate CSS. I do have a form with a table style, but it is in a function and when I remove it I had the same result. JL Answer posted by Support on Feb 03, 2009 03:03 Please check attached sample. Attachments (1)
|