Click here to Skip to main content
15,921,028 members
Home / Discussions / C#
   

C#

 
GeneralRe: Mix C++ and C# Pin
Drusemark17-May-05 5:32
Drusemark17-May-05 5:32 
QuestionHow to modify the ..... Pin
Shankar Balaji10-May-05 3:01
Shankar Balaji10-May-05 3:01 
AnswerRe: How to modify the ..... Pin
MoustafaS10-May-05 5:30
MoustafaS10-May-05 5:30 
QuestionHow to Rotate Controls Pin
RajeshGuptha10-May-05 2:53
RajeshGuptha10-May-05 2:53 
GeneralSearching a particular node in XML Pin
Shankar Balaji10-May-05 1:45
Shankar Balaji10-May-05 1:45 
GeneralRe: Searching a particular node in XML Pin
Polis Pilavas10-May-05 2:42
Polis Pilavas10-May-05 2:42 
GeneralRe: Searching a particular node in XML Pin
Shankar Balaji10-May-05 2:58
Shankar Balaji10-May-05 2:58 
GeneralRe: Searching a particular node in XML Pin
Polis Pilavas10-May-05 3:12
Polis Pilavas10-May-05 3:12 
Load data from the XML document into a dataSet:
<code>ds</code>= new DataSet();
ds.ReadXml(fileName);

Create a new row based on the table of the dataSet
DataRow <code>drs</code>= ds.Tables["Table1"].NewRow();
//Construct field values for the new row
drs["Message"] = "Hello World!"
//Add the new row into the dataTable
ds.Tables[table].Rows.Add(drs);

Delete an existing row from the table
if (ds.Tables["Table1"].Rows.Count > 0)
{
	//Remove the selected row from the dataSet (assuming we use a dataGrid)
	ds.Tables[table].Rows.RemoveAt(this.dataGrid1.CurrentCell.RowNumber);
}

Search for a value
if (ds.Tables["Table1"].Rows.Count == 1)
        if (ds.Tables["Table1"].Rows[0][ds.Tables["Table1"].Columns[0]].ToString() == "Hello World!")
                MessageBox.Show("Found");

Save the changes to the XML file
ds.WriteXml(fileName);

Hope this will help you get the picture.

Regards,
Polis

Can you practice what you teach?
GeneralRe: Searching a particular node in XML Pin
Shankar Balaji10-May-05 3:22
Shankar Balaji10-May-05 3:22 
GeneralRe: Searching a particular node in XML Pin
Polis Pilavas10-May-05 3:24
Polis Pilavas10-May-05 3:24 
GeneralRe: Searching a particular node in XML Pin
Shankar Balaji10-May-05 3:34
Shankar Balaji10-May-05 3:34 
GeneralRe: Searching a particular node in XML Pin
Polis Pilavas10-May-05 3:44
Polis Pilavas10-May-05 3:44 
GeneralRe: Searching a particular node in XML Pin
Marc Clifton10-May-05 3:48
mvaMarc Clifton10-May-05 3:48 
Generalcrystal reports parameters Pin
boruu10-May-05 1:04
boruu10-May-05 1:04 
GeneralTAPI with C# Pin
ksanju100010-May-05 1:01
ksanju100010-May-05 1:01 
GeneralRe: TAPI with C# Pin
asif m@hmood10-May-05 2:07
asif m@hmood10-May-05 2:07 
GeneralRe: TAPI with C# Pin
ksanju100010-May-05 3:02
ksanju100010-May-05 3:02 
GeneralConvert Xml File to CSV File Format Pin
ksanju100010-May-05 0:56
ksanju100010-May-05 0:56 
GeneralRe: Convert Xml File to CSV File Format Pin
Polis Pilavas10-May-05 2:49
Polis Pilavas10-May-05 2:49 
GeneralExporting data of XML into Excel file Pin
ksanju100010-May-05 0:52
ksanju100010-May-05 0:52 
GeneralRe: Exporting data of XML into Excel file Pin
Polis Pilavas10-May-05 2:53
Polis Pilavas10-May-05 2:53 
QuestionHow to save word document ? Pin
Member 18788069-May-05 23:57
Member 18788069-May-05 23:57 
AnswerRe: How to save word document ? Pin
Polis Pilavas10-May-05 2:55
Polis Pilavas10-May-05 2:55 
Generalaccessing network folders/files Pin
Xiao_M9-May-05 23:37
Xiao_M9-May-05 23:37 
GeneralRe: accessing network folders/files Pin
Polis Pilavas10-May-05 2:57
Polis Pilavas10-May-05 2:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.