|
And I need a hand in this
tree_Level.Nodes.Clear();
for (int x = 0; x < dataSet1.COMMS.Rows.Count; x++)
{
tree_Level.Nodes.Add(dataSet1.COMMS.Rows[x]["COMM_NAME"].ToString() + "_" + dataSet1.COMMS.Rows[x]["COMM_ID"].ToString(), dataSet1.COMMS.Rows[x]["COMM_NAME"].ToString(), 0, 0);
for (int y = 0; y < dataSet1.UZL.Rows.Count; y++)
{
if (dataSet1.UZL.Rows[y]["UZ_COMM_ID"].ToString() == dataSet1.COMMS.Rows[x]["COMM_ID"].ToString())
{
tree_Level.Nodes[x].Nodes.Add(dataSet1.UZL.Rows[y]["UZ_NAME"].ToString() + "_" + dataSet1.UZL.Rows[y]["UZ_ID"].ToString(), dataSet1.UZL.Rows[y]["UZ_NAME"].ToString(), 1, 1);
for (int z = 0; z < dataSet1.VILS.Rows.Count; z++)
{
if (dataSet1.VILS.Rows[z]["VIL_UZ_ID"].ToString() == dataSet1.UZL.Rows[y]["UZ_ID"].ToString())
tree_Level.Nodes[x].Nodes[0].Nodes.Add(dataSet1.VILS.Rows[z]["VIL_NAME"].ToString() + "_" + dataSet1.VILS.Rows[z]["VIL_ID"].ToString(), dataSet1.VILS.Rows[z]["VIL_NAME"].ToString(), 2, 2);
}
}
}
}
The last level in the loop is not doing fine (it puts all the second level subordinates under one node that is the first node in level two
ps. I know it's a mess but please just focus on the two inner nested loops.
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
It's failing because you are assigning your new node at Nodes[x].Nodes[0] which will always be the same node under [x]. To get round this, change it to Nodes[x].Node[y], or better still maintain this via explicit TreeNodes.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Thanks a bunch pete
Pete O`Hanlon wrote: explicit TreeNodes.
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Muammar© wrote: Pete O`Hanlon wrote:
explicit TreeNodes.
TreeNode outerNode = new TreeNode("MyValue");
tree_list.Nodes.Add(outerNode);
TreeNode innerNode = new TreeNode("Inner item");
outerNode.Nodes.Add(innerNode);
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi my name is Zahid. Is it possible to use gSOAP with C#? If yes then please tell me how.
|
|
|
|
|
Hi,
I want to add facility to Cab and UnCAB files from my application being developed in c# 2005. how can i archive this. ?? please help..
thnks
|
|
|
|
|
|
|
Is Crystal Report tools is not come with .Net Framework at the time of installation?
Please help me.
Arun Kr
|
|
|
|
|
Try that again without the use of double-negatives.
Does Crystal Reports come with the .NET Framework?
or
Is this right? Crystal Reports does not come with the .NET framework?
You see - 1 negative per question.
|
|
|
|
|
He seems to be pessimistically optimistic.
(-1) * (-1) = (1) right?
|
|
|
|
|
Hey,
This XML stuff drives me crazy (almost)
I have a string with the following XML
<object class="user" name="admin2@test.dk" xmlns="">
<property name="cn">
<value>admin2@test.dk</value>
</property>
<property name="sn">
<value>efternavn</value>
</property>
<property name="description">
<value>some desc</value>
</property>
<property name="telephoneNumber">
<value>789</value>
</property>
<property name="givenName">
<value>fornavn</value>
</property>
</object>
How do I parse that string and get the value for an element like "telephoneNumber"?
Thanks in advance
- Anders
My new photo website[^]
|
|
|
|
|
You can do that First Convert that String into Stream then put that Stream as parameter to XmlTextReader constructor and read that
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
First thing first, load it into a XMLDocument
XmlDocument xmlDoc = new XmlDocument();<br />
xmlDoc.LoadXml(yourStringOfXmlData);
Then, use XPath to find the right node
XmlNode node = xmlDoc.DocumentElement.SelectSingleNode("property[@name='telephoneNumber']/value");<br />
if(node != null)<br />
Console.WriteLine(node.Value);<br />
code typed without testing.
|
|
|
|
|
Thanks, got it to work perfectly
|
|
|
|
|
hello.....
I had crated one array dynamically from database.....
nwo i want to know the dimesion of each column....
i.e.
Here I am Providing already created 2-dim array
string[,] colArray = new string[,] { { "StatusID", "System.Int32", "ABC" }, { "StatusMsg", "System.String", "ABC" }, { "Size", "System.Double", "ABC" } };
colArray[i,j]
what i want to know value of i and j........
|
|
|
|
|
Well, colArray.Length gets you the length of the 1st dimension, and colArray[0].Length gets the 2nd dimension. This (of course) assumes that you haven't created jagged arrays.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hey guys,
Any idea how to auto number a specific column when a new row is created in datagrid contol???
Thanks
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
If it is bound to a DataSet then set the AutoIncrement property of this DataSet to true.
Otherwise you have to do it on your own (in your source of data).
-^-^-^-^-^-
no risk no funk ................... please vote ------>
|
|
|
|
|
Thanks
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
is anybody having cafe serverproject in asp.net 2.0 using C#?
do reply.......
|
|
|
|
|
sonalisp8 wrote: cafe serverproject in
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
I think he means, is anybody here a waiter?
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hello
I try to get the value of the tables inside the datatable
"str4 = ds.Tables["CreditCard"].Rows[1][2];"
but it give an error:
"Cannot implicitly convert type 'object' to 'string'. An explicit conversion exists (are you missing a cast?)
any help?
Thanks in advance
Assaf
|
|
|
|
|
Str4 is of type string and
Assaf82 wrote: ds.Tables["CreditCard"].Rows[1][2];"
returns object you need to convert to string so simple dude
try this
ds.Tables[0].Rows[row][col].ToString();
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|