From b8e6a7bb37d04f1e974e231a5caffc1854cf7f41 Mon Sep 17 00:00:00 2001 From: xj qian <qianxj15@sina.com> Date: 星期四, 27 六月 2024 09:37:26 +0800 Subject: [PATCH] this update tree data item --- jrj/xframe/xcontrol/xdwgrid.hpp | 86 +++++++++++++----------------------------- 1 files changed, 27 insertions(+), 59 deletions(-) diff --git a/jrj/xframe/xcontrol/xdwgrid.hpp b/jrj/xframe/xcontrol/xdwgrid.hpp index 8b423d2..11f7f9c 100644 --- a/jrj/xframe/xcontrol/xdwgrid.hpp +++ b/jrj/xframe/xcontrol/xdwgrid.hpp @@ -270,9 +270,9 @@ return getKReport()->GetTitleName(col); } public: - int SetRowSort(LPTSTR colName, bool colOrder = true) + int SetRowSort(LPCTSTR colName, bool colOrder = true) { - return getKReport()->SetRowSort(colName, colOrder); + return getKReport()->SetRowSort((LPTSTR)colName, colOrder); } int SetClickEditFlag(bool f) { @@ -302,9 +302,9 @@ { return getKReport()->RetrieveDiff(xml); } - int Filter(LPTSTR pColumn, LPTSTR pStr) + int Filter(LPCTSTR pColumn, LPCTSTR pStr) { - return getKReport()->Filter(pColumn, pStr); + return getKReport()->Filter((LPTSTR)pColumn, (LPTSTR)pStr); } public: int SetHeaderText(int row, int col, LPTSTR name) @@ -334,14 +334,16 @@ return getKReport()->AddRepeats(colName); } public: - LPTSTR GetColumnProp(int nCol, LPCTSTR pItem) + LPCTSTR GetColumnProp(int nCol, LPCTSTR pItem) { - return getKReport()->GetColumnProp(nCol, pItem); + return L""; + //return getKReport()->GetColumnProp(nCol, pItem); } - LPTSTR GetColumnProp(LPCTSTR pColName, LPCTSTR pItem) + LPCTSTR GetColumnProp(LPCTSTR pColName, LPCTSTR pItem) { - return getKReport()->GetColumnProp(pColName, pItem); + return L""; + //return getKReport()->GetColumnProp(pColName, pItem); } int GetItemInt(int row, int col) @@ -350,9 +352,9 @@ return str.toInt(); } - int GetItemInt(int row, string col) + int GetItemInt(int row, xstring col) { - xstring str = GetItemString(row, col); + xstring str = GetItemString(row, col.c_str()); return str.toInt(); } @@ -373,9 +375,9 @@ return SetItemString(row, col, xstring(str)); } - bool SetItemInt(int row, string col, int str) + bool SetItemInt(int row, xstring col, int str) { - return SetItemString(row, col, xstring(str)); + return SetItemString(row, col.c_str(), xstring(str)); } bool SetItemDouble(int row, int col, double str) @@ -383,9 +385,9 @@ return SetItemString(row, col, xstring(str)); } - bool SetItemDouble(int row, string col, double str) + bool SetItemDouble(int row, xstring col, double str) { - return SetItemString(row, col, xstring(str)); + return SetItemString(row, col.c_str(), xstring(str)); } public: @@ -458,52 +460,18 @@ return L""; } + int SetGuid(int row,xstring val) + { + KXMLDOMElement e = GetRowElement(row); + if (e) + { + e.setAttribute(L"guid",val.c_str()); + return 1; + } + return 0; + } + public: -#if 0 - int GetItemInt(int row, int col) - { - xstring str = GetItemString(row, col); - return str.toInt(); - } - - double GetItemDouble(int row, int col) - { - xstring str = GetItemString(row, col); - return str.toDouble(); - } - - int GetItemInt(int row, string col) - { - xstring str = GetItemString(row, col); - return str.toInt(); - } - - double GetItemDouble(int row, string col) - { - xstring str = GetItemString(row, col); - return str.toDouble(); - } - - bool SetItemInt(int row, int col, int str) - { - return SetItemString(row, col, xstring(str)); - } - - bool SetItemDouble(int row, int col, double str) - { - return SetItemString(row, col, xstring(str)); - } - - bool SetItemInt(int row, string col, int str) - { - return SetItemString(row, col, xstring(str)); - } - - bool SetItemDouble(int row, string col, double str) - { - return SetItemString(row, col, xstring(str)); - } -#endif int DwRetrieve(string ServerUrl, string src, string argstr) { -- Gitblit v1.9.3