Dear all, I got an XML like this: Aluis tungdt@ssi.com.vn 123456789 0983934645 IT11 ... here is code that I load XML to DataGrid: private void loadData(string xmlsource) { try { // Initialize Component and other code here // Create an XmlDataDocument object and read an XML XmlDataDocument xmlDatadoc = new XmlDataDocument(); xmlDatadoc.DataSet.ReadXml(xmlsource); // Create a DataSet object and fill with the dataset // of XmlDataDocument this.colleagueList = new DataSet("Colleague List"); this.colleagueList = xmlDatadoc.DataSet; // Attach dataset view to the Data Grid control this.lstColleague.DataSource = this.colleagueList.DefaultViewManager; this.lstColleague.NavigateTo(0, "colleague"); } catch(Exception e) { throw e; } }
but all the attributes in node, and node were not showed. Please help me how to display all information in one view... Regards,
aluisdo
Posts
-
DataGrid: view XML data -
DataGrid: view XML dataDear all, I got an XML like this: Aluis tungdt@ssi.com.vn 123456789 0983934645 IT11 ... here is code that I load XML to DataGrid:
private void loadData(string xmlsource) { try { // Initialize Component and other code here // Create an XmlDataDocument object and read an XML XmlDataDocument xmlDatadoc = new XmlDataDocument(); xmlDatadoc.DataSet.ReadXml(xmlsource); // Create a DataSet object and fill with the dataset // of XmlDataDocument this.colleagueList = new DataSet("Colleague List"); this.colleagueList = xmlDatadoc.DataSet; // Attach dataset view to the Data Grid control this.lstColleague.DataSource = this.colleagueList.DefaultViewManager; this.lstColleague.NavigateTo(0, "colleague"); } catch(Exception e) { throw e; } }
but all the attributes in node, and node were not showed. Please help me how to display all information in one view... Regards, -
Get problem with FindWindow(). Pls help! [modified]Tks, It solved.
-
Get problem with FindWindow(). Pls help! [modified]Tks for your reply. I converted all char * to wchar_t const as same as definetion of function, but I still got that errors.
void pHandle::setHandle(wchar_t const *winClass, wchar_t const *winTitle)
{
HWND curWin = FindWindow(winClass,winTitle);
setHandle(curWin);
}Tks for your help
-
Get problem with FindWindow(). Pls help! [modified]How to check it? I did not change any thing. Tks for your help.
-
Get problem with FindWindow(). Pls help! [modified]How to import User32.lib? Tks for your help.
-
Get problem with FindWindow(). Pls help! [modified]Pls help me solve it... I got this error when I compile with VS 2005, pls help me.
------ Build started: Project: VLTKLib, Configuration: Debug Win32 ------
Compiling...
pHandle.cpp
Linking...
pHandle.obj : error LNK2028: unresolved token (0A000299) "extern "C" struct HWND__ * __stdcall FindWindowW(wchar_t const *,wchar_t const *)" (?FindWindowW@@$$J18YGPAUHWND__@@PB_W0@Z) referenced in function "public: void __thiscall VLTKLib::pHandle::setHandle(char *,char *)" (?setHandle@pHandle@VLTKLib@@$$FQAEXPAD0@Z)
pHandle.obj : error LNK2028: unresolved token (0A00029B) "extern "C" unsigned long __stdcall GetWindowThreadProcessId(struct HWND__ *,unsigned long *)" (?GetWindowThreadProcessId@@$$J18YGKPAUHWND__@@PAK@Z) referenced in function "public: void __thiscall VLTKLib::pHandle::setHandle(struct HWND__ *)" (?setHandle@pHandle@VLTKLib@@$$FQAEXPAUHWND__@@@Z)
pHandle.obj : error LNK2019: unresolved external symbol "extern "C" unsigned long __stdcall GetWindowThreadProcessId(struct HWND__ *,unsigned long *)" (?GetWindowThreadProcessId@@$$J18YGKPAUHWND__@@PAK@Z) referenced in function "public: void __thiscall VLTKLib::pHandle::setHandle(struct HWND__ *)" (?setHandle@pHandle@VLTKLib@@$$FQAEXPAUHWND__@@@Z)
pHandle.obj : error LNK2019: unresolved external symbol "extern "C" struct HWND__ * __stdcall FindWindowW(wchar_t const *,wchar_t const *)" (?FindWindowW@@$$J18YGPAUHWND__@@PB_W0@Z) referenced in function "public: void __thiscall VLTKLib::pHandle::setHandle(char *,char *)" (?setHandle@pHandle@VLTKLib@@$$FQAEXPAD0@Z)
d:\workspace\VLTK\Debug\VLTKLib.dll : fatal error LNK1120: 4 unresolved externals
Build log was saved at "file://d:\workspace\VLTK\VLTKLib\Debug\BuildLog.htm"
VLTKLib - 5 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========My class: pHandle.h
#pragma once
#include #include #include namespace VLTKLib
{
public class pHandle
{
private:
HANDLE hProcess;public: pHandle(void); pHandle(HWND curWin); pHandle(char \*winClass, char \*winTitle); ~pHandle(void); void setHandle(HWND curWin); void setHandle(char \*winClass, char \*winTitle); void closeHandle(); long ReadInt(LPBYTE lpAddress); //Read 4 bytes short ReadWord(LPBYTE lpAddress); //Read 2 bytes char ReadChar(LPBYTE lpAddress); //Read 1 byte char \*ReadString(LPBYTE lpAddress, int szChar); };
}