Well, none of your solutions work. most give errors. Maybe guffa's will, if he get's his code working ( <--- what's this supposed to be).
Bummer8
Posts
-
A situation where you have to use goto -
A situation where you have to use gotoforeach(DataRow dr in dataset.Tables["principal"].Rows) { if (dr["name"].ToString()==szPrincipal_name) { nPrincipal_Id = Convert.ToInt32(dr["principal_Id"].ToString()); bEncontrou = true; break; } nPrincipal_Id++; }
_labelRowDeleted: foreach (DataRow myRow in dataset.Tables["grant"].Rows) { if (myRow["principal_Id"].ToString() == nPrincipal_Id.ToString()) { myRow.Delete(); goto _labelRowDeleted; } }
Solutions are welcome. -
Get any specific value from this xml [modified]Found a solution
int nPrincipal_Id = 0; foreach (DataRow myRow in dataset.Tables["principal"].Rows) { if (myRow["name"].ToString()==textBox2.Text) { nPrincipal_Id = Convert.ToInt32(myRow["principal_Id"].ToString()); } } foreach (DataRow myRow in dataset.Tables["grant"].Rows) { if (myRow["principal_Id"].ToString() == nPrincipal_Id.ToString()) textBox1.Text += myRow["name"].ToString() + Environment.NewLine; }
-
Get any specific value from this xml [modified]I edited my post. I don't know how to make the xml visible in the code. there is a download link. Thanks for the reply.
-
Get any specific value from this xml [modified]EDIT: the XML isn't showing (download here: http://rapidshare.com/files/59995138/test.xml.html) I have this XML. I use the code below to open the XML and treat it as a DataSet and view it in a datagrid.
try { dataset = ReadXML(szPassword); dataGrid