Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by RJ on Mar 17, 2008 17:51
open dhtmlx forum
Blank value for dhxCalendarA xcell

What is the proper way to add a grid row without a default date value. This grid is being loaded into a tabbar.....

<table width="1000">
<tr><td><a href="javascript:void(mygrid1.addRow(new Date().valueOf(),'New,1,,,,New',0))">addRow</a></td><td><a href="javascript:void(mygrid1.deleteSelectedRows())">deleteRow</a></td></tr>
<td COLSPAN='2' width="100%" valign="top">
<div id="gridbox1" width="100%" height="800px" style="background-color:white;"></div>
</td>
</tr>
</table>
<script>
mygrid1 = new dhtmlXGridObject('gridbox1');
mygrid1.setImagePath("codebase/imgs/");
mygrid1.setHeader("Task,Assigned To,Target Date,Start Date, End Date,Status");
mygrid1.setInitWidths ("250,130,120,80,80,80");
mygrid1.setColAlign ("left,left,left,left,left,left");
mygrid1.setColTypes("ed,ed,dhxCalendarA,dhxCalendarA,dhxCalendarA,ed");
mygrid1.setSkin("modern");
mygrid1.init();
</script>
Answer posted by Support on Mar 18, 2008 05:05
The code which you provided is correct. If it causes problem for you - please try to use attached js file instead of original one.
In latest version - if no data was specified ( or it is empty ) then value set as empty cell, but while edit - current date will be preselected.
Attachments (1)
Answer posted by RJ on Mar 18, 2008 09:40
Did not correct problem. Also, If i change the xcell to 'ed' I can not edit blank/null entries in grid?
Answer posted by Support on Mar 18, 2008 10:30
Please check attached sample - it uses code from your snippet and all newly added values correctly editable.
Attachments (1)