Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Lina on Feb 10, 2009 09:11
open dhtmlx forum
DhtmlxGrid CheckBox, DhtmlDataProcessor

Hi All:
i have a Grid with diffrenet data type(checkboxes, dropdowns, text fields..)
i have 2 questions:
for some reason the check box is always checked ,when i looked at the xml file i figured out that the check box has this False value with Capital F, when i changed to false it works fine,
but the problem is that the values are coming from the database as (0,1) value and it chaned right away to True,False,
do we have any other solution for this issue except hard coded it? thank you.


the second issue that i have DataProcessor to save data it works fine except after saving data it gives me error (null or not an object) even it did save the data correctly. wheni use dataproccessor_Debug , everything works fine
so what do you think?

thank you very much for you help .
Answer posted by Support on Feb 10, 2009 09:51
>>value with Capital F, when i changed to false it works fine
The recommended values for checkbox states are 0 and 1 

>>do we have any other solution for this issue except hard coded it? 
There is no way to customize default values, the only solution ( except of code modification ) would be creation of custom excell on base of "ch", which will use similar logic but different default values. 

>>the second issue that i have DataProcessor to save data it works fine except after saving data it gives me error
Do you have any warning messages in debug output?
The issue can be caused by next issues

a) incorrect value of sid attribute ( not existing ID ) 
b) incorrect content type of response ( must be text/xml, with different content type IE may have problems with response parsing ) 
c) custom calls of dataprocessor's API with incorrect parameters

If issue still occurs - please try to include attached js file and send back the debug output generated by it. 
Attachments (1)
Answer posted by Lina on Feb 10, 2009 15:08

after i download the dataprocessor_debug.js that you sent me ,

it gave me this message: (i will remind you again with the js error that it shows after the update is done is 'null' is null or not an object)


Current state
 ID:5 Status: updated
--------------------------------------------------------------------------------
Current mode: cell Log:
 row 5 marked as updated
 Initiating data sending for 5
 Server url: actionCarrier.asp?

gr_id=5
c0=%3CIMG%20style%3D%22CURSOR%3A%20hand%22%20onclick%3D%22parent.location%3D'carrier.cfm%3Fcarrierid%3D5%26amp%3Bsiteid%3D1'%22%20src%3D%22http%3A%2F%2Fnsweb3.sbc.com%2Ffttcs%2Fimages%2Fview.gif%22%3E
c1=1
c2=Sprint%20Nextel%20(Sprint)
c3=h888888
c4=2
c5=
c6=10174%20hellmen%20-MK
c7=02%2F02%2F2009
c8=lg3983
c9=0
c10=
c11=01%2F07%2F2009
c12=0
c13=01%2F07%2F2009
c14=01%2F07%2F2009
c15=01%2F07%2F2009
c16=01%2F07%2F2009
c17=01%2F07%2F2009
c18=01%2F07%2F2009
c19=01%2F07%2F2009
c20=01%2F07%2F2009
c21=01%2F27%2F2009
c22=reason1
c23=
c24=Lina
c25=
c26=tn1
c27=cust%20notes1
c28=220V
c29=1
c30=
c31=Backboard
c32=struct1
c33=01%2F07%2F2009
c34=no
c35=Space
c36=yes
c37=DOT
c38=rtclli1
c39=
c40=
c41=Fujitsu%20%204100ES%20OSP%20Cabinet
c42=77
c43=56
c44=5
c45=1
c46=01%2F07%2F2009
c47=Financial
c48=Timeframes
c49=0
c50=1
c51=0
c52=0
c53=comm1
cell_updated=4

server response received <status value="Update tblFTTCSCarrier Set RelatedJob1=2,LastUpdate='2/10/2009',updatedlastby='lg3983' Where CarrierID=5"/>
fallback to low level parsing

 

the file that does the update is an asp file: and it has in the begining of the page these 2 lines:

<%

Response.AddHeader "Pragma", "no-cache"

Response.AddHeader "cache-control", "no-store"

%>

and at the end after the update is done

<%

Response.ContentType = "text/xml"

%>

<status value="<%=mySQL %>"/>

Answer posted by Support on Feb 11, 2009 05:40
a) you need to have 
         Response.AddHeader "Content-type", "text/xml"
to allow correct processing on client side 

b) dataprocessor awaits response in specific format
http://dhtmlx.com/docs/products/dhtmlxGrid/doc/articles/Dataprocesor_usage.html#grid_art_dataprocessor
<data>
  <action type="some" sid="some" tid="some" />
</data>

Answer posted on Feb 11, 2009 07:34

thank you very much for you help.

it works fine now.