|
In your example XML is this something you have created or been provided? Normally you wouldn't be declaring the xmlns on every node in the document.This only needs to be done once at the head of the file
<pre><xmlns xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0" type="standard" />
<name>
<firstname>Tom</firstname>
<lastname>Smith</lastname>
</name>
<name>
<firstname>Dale</firstname>
<lastname>Smith</lastname>
</name></pre>
Now what you are trying to achieve when reading this file in? Just a list of name nodes and what they contain or are you trying to create objects from each node ie of Type Person as an example and then set the objects firstname/lastname properties or set said properties to instances of an object?
When reading the file it would best to use the XMLReader class.
<div class="ForumMod">modified on Monday, January 26, 2009 8:55 AM</div>
|
|
|
|
|
It was provided that way ...
I am just truing to read out the data in each name node.
Right now I just use XMLdocument as seen in my code and by NodeSelect. As answered in the other forum I need to use namespace in my select to.
Thanks for help ..
//M
|
|
|
|
|
how to insert a c#.net gridview in a column of another c#.net girdview?i.e. nested gridview
|
|
|
|
|
Good question! I'm working on that. I'll upload the new control on my website when resolve the problem.
P.S.
Maybe my current solution will help you. See www.madartsoft.com
modified on Monday, January 26, 2009 7:27 AM
|
|
|
|
|
thanks but can u tell me the exact path in site from where i can take help.
|
|
|
|
|
i want to produce full exe with c#
|
|
|
|
|
Hi,
what do you mean by "full exe"? If you are using Visual Studio, it will build an exe from your console and forms/wpf application automatically.
Regards
Sebastian
|
|
|
|
|
Good for you
only two letters away from being an asset
|
|
|
|
|
Hi girl,
add new project> and choice setUp. And you may follow all
Wizard and add you desire database. The easy one try it.
About C#.net with window applications and ASP.net for webapplication
|
|
|
|
|
Zin Hsu Naing wrote: i want to produce full exe with c#
so, you have been creating a half-exe till now!
i'd like to learn that
regards
|
|
|
|
|
Is there any other thing we should know?
|
|
|
|
|
Create a Setup Project see this
http://support.microsoft.com/kb/307353[^]
http://www.codeproject.com/KB/dotnet/Win_App_Setup_Project.aspx[^]
Stop giving names that you dont know, people will laugh at you. What is "Full exe" was there a Half before ? lol!!!!!!!!!!!!!!!!
Hope it helps
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswam@its.co.za
|
|
|
|
|
Buy a book on C#. Read it. Try learning to use google.
Oh, and press F5.
If what you meant is an exe that doesn't need .NET installed, then repeat all steps. You can't do that.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Christian Graus wrote: If what you meant is an exe that doesn't need .NET installed, then repeat all steps. You can't do that.
Actually he can, it's just that xenocode[^] is almost as expensive as visual studio itself.
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots.
-- Robert Royall
|
|
|
|
|
i want to perform following functionailty from c#.net datagrid
--------------------------
name address
fist last
--------------------------
abc df pk
abc df pk
--------------------------
i.e. splitting column name into two columns 'first' and 'last'.
we can't span column in c#.net datagrid. can any body tell,how to add a table in a column of c#.net datagrid.
|
|
|
|
|
Override the ItemDataBound event and insert whatever controls you want.
only two letters away from being an asset
|
|
|
|
|
i m using c#.net not c#asp.net.can u plz tell me then what to do?
|
|
|
|
|
You are confused. C# is a langauge that implements .NET Framework. ASP.NET is a platform for developing and delivering web applications. DataGrid is a control used in Web Forms and GridView is a control used in Win Forms.
If you would explain clearly, with correct terminology, your chances of recieving an answer would be enhanced.
only two letters away from being an asset
|
|
|
|
|
sorry.i was making mistake.i want to implement this using dataGridView.now can u plz tell me?
i want to add table in a column just like this bold statement.but this is for datagrid can u tel me for gridview.
public void DataGrid1_ItemCreated(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Header)
{
e.Item.Cells.RemoveAt(2);
e.Item.Cells[1].ColumnSpan = 2;
e.Item.Cells[1].Text = "<table style='FONT-WEIGHT: bold;WIDTH: 100%; COLOR: Black; TEXT-ALIGN: center'><tr align=center><td colspan = 2 style='BORDER-BOTTOM:cccccc 1pt solid'>Name</td></tr><tr align =center ><td style ='BORDER-RIGHT: cccccc 1pt solid'>FName</td>< td>LName</td></tr></table>";
}
}
modified on Monday, January 26, 2009 4:23 AM
|
|
|
|
|
G'day all,
I'm writing an application that requires me to output the values stored within a DataGridView to an cls/csv file (or basically anything that M$ Excel can read). This is as far as i have gotten:
string strValue = " ";
for (int i = 0; i < stocksDataGridView.Rows.Count - 1; i++)
{
for (int j = 0; j < stocksDataGridView.Rows[i].Cells.Count; j++)
{
if (!string.IsNullOrEmpty(stocksDataGridView[j, i].Value.ToString()))
{
if (j > 0)
strValue += "," + stocksDataGridView[j, i].Value.ToString();
else
{
if (!String.IsNullOrEmpty(strValue))
strValue = stocksDataGridView[j, i].Value.ToString();
else
strValue = strValue + Environment.NewLine + stocksDataGridView[j, i].Value.ToString();
}
}
}
strValue = strValue + Environment.NewLine;
}
string fileName = @saveFileDialog1.FileName;
if (File.Exists(fileName) && !String.IsNullOrEmpty(strValue))
{
File.WriteAllText(fileName, strValue);
}
I'm sure its not very pretty and i have no idea how/where/why i have it in there, but all i can say is that it doesn't actually output anything.
Any and all help will be greatly appreciated.
Thanks in Advance,
Tom
|
|
|
|
|
Hi Tom,
are you sure that the command "File.WriteAllText" is executed? You only enter the if-block if your file exists! Maybe you have forgotten a "!" before "File.Exists"?
Regards
Sebastian
|
|
|
|
|
Thankyou so very much. I can't believe I would screw up something like that! Man I must be getting old...
Thankyou again,
Tom
|
|
|
|
|
Hello, Please help how to save Listview data to MSSQL database?
|
|
|
|
|
Tuntgerhuu wrote: how to save Listview data to MSSQL database
By iterating the listview rows. For connecting MySQL use the connector[^] provided by MySQL.
|
|
|
|
|
he want to use MSSQL, not MySQL,
Glad to discuss with you and best wishes.
|
|
|
|