Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Jun 19, 2008 00:37
open dhtmlx forum
Problem with deleting a column

Hi,
I'm having a problem while deleting the column from the grid. When i delete the column from the grid the column gets deleted but the shifted column gets the values of the header and the footer but the rows of the cells remains blank,
I'm using v 1.6 build 80512
Refer the below shown format,
The below shown is the format of the grid

| a | b | c | --> Header
| 1 | 2 | 3 |
| 4 | 5 | 6 |
| 7 | 8 | 9 |
| A | B | C | --> Footer

After deleting the column 'b' of the grid the grid looks with the contents of column 'c' as blank

| a | c | --> Header
| 1 | |
| 4 | |
| 7 | |
| A | C | --> Footer

Below is the snippet of code that i'm making use of to display the grid. The column will be displayed within the loop which contains the number of columns to be displayed. Similarly with rows.


Response.Write "<script type=""text/javascript"">"
Response.Write "var sXML='<?xml version=\""1.0\"" encoding=\""UTF-8\""?><rows><head>"
sTotal="Footer1"
sReportStyle="font-weight:bold;background-color:white;font-style:normal;text-align:left"
For i=1 to Count
Response.Write "<column width=""100"" type=""" & sFieldType & """ align=""left"" color=""white"" sort=""na"">" & _
"<![CDATA[<a href=""javascript:Sort(\'" & sSortString & "\'\\,\'" & SORT& "\');""><b>" & sFieldName & "</b></a>"
Response.write "]]></column>"

sTemp = Replace(sData, ",", "\\,")
sTemp = sAData & sTemp
sTotal = sTotal & ", " & sTemp
next
Response.Write "<settings>"
Response.Write "<colwidth>px</colwidth>"
Response.Write "</settings>"
Response.Write "<beforeInit>"
Response.Write "<call command=""setSkin""><param>gray</param></call>"
Response.Write "</beforeInit>"
Response.Write "<afterInit>"
Response.Write "<param><![CDATA[" & sTotal & "]]></param><param>" & sReportStyle &"</param>"
Response.Write "</call>"
End If
Response.Write "</afterInit>"
Response.Write "</head>"
for i=1 to count
Response.write "<row><cell><![CDATA["
sData = "<a title=""" & sTitle & _
""" href='javascript: Function2(""NULL"");'>NULL</a></td>" & vbCrLf
sTmp=sData
sTmp = Replace(sTmp, "&", "&")
sTmp = Replace(sTmp, "<", "<")
sTmp = Replace(sTmp, ">", ">")
sTmp = Replace(sTmp, "'", "'")
sMsg =Replace(sMsg," "," ")
sTitle =Replace(sTitle," "," ")

Response.Write "<a title=""" & sTitle & """ href=""javascript: drill(\'" & sTmp & "\', \'table\');"">" & sTmp & " </a>"
Response.Write "]]></cell>"
Response.Write "<cell style=""text-align:right""><![CDATA["
Response.Write " "& sTmp & "]]></cell>"
Response.Write "</row>"
Response.Write "</rows>';"
Response.Write "</script>" & vbCrLf


Please suggest the solution for the problem. I'm unable to find the solution.
Answer posted by Support on Jun 23, 2008 09:57
Please contact us directly at support@dhtmlx.com and provide your ref. number - we will send you a latest version of related extension, which must resolve your problem.
Answer posted on Jun 23, 2008 23:55

Hi,

Thanks for the help.

Can you tell us which file gets affected and in which build the modified file will be added?

Currently i'm using v 1.6 build 80512.

Answer posted by Support on Jun 24, 2008 02:53
The related updates affected dhtmlxgrid_mcol.js ( this file store all logic related to dynamical column adding | deleting )
Answer posted on Jun 24, 2008 22:07

Hi,

Can i know whether this change will be a part of the next build?

If yes, when can we expect the next version or build ?

Answer posted by Support on Jun 25, 2008 02:17
The changes will be included in next update, which planned to be released in next few weeks