|
Hello dear friend,
It's clear that you are new in CP. So read the first post of page1, titled "How to get an answer to your question" by "Chris Maunder", it will guide you how to post your questions. Take a look here[^] and here[^] for more info.
Have a nice journey here in CP
While (true) { Human.isLearnable = true; }
|
|
|
|
|
|
|
Thank You Very Much
|
|
|
|
|
Let's see... not too familiar with sarcasm, aren't we?
|
|
|
|
|
|
Hi Craig,
if you need urgent help d´ont post call 911 instead!!!
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
Okay...
Personally I would create some sort of a class which contains the data I want to access.
public class MyDataTag
{
public MyDataTag(DataRowView dataRow)
{
itemID = dataRow["NodeId"];
text = dataRow["EnNode"].ToString();
otherInfo = dataRow["OtherInfo"].ToString();
}
public object itemID;
public string text;
public string otherInfo;
}
Then I would replace the tree node creation code with:
TreeNode node = new TreeNode();
MyDataTag dataTag = new MyDataTag(dv[i]);
node.Text = dataTag.text;
node.Tag = dataTag;
And your AfterSelect event handler:
MyDataNode itemData = e.Node.Tag as MyDataNode;
if (itemData != null)
{
string test = string.Format("ID: {0} Other Info: {1}", itemData.itemID.ToString(), itemData.otherInfo);
ListViewItem newItem = listView1.Items.Add(test);
newItem.Tag = itemData;
}
Lea Hayes
|
|
|
|
|
|
I have a Windows Form MDI which 3 treeviews that are separated by a Split Container.
I am trying to make them populate from the same Database but with diffrent tables for each treeview.
So far i have managed to only populate one out the three and could some help me please?
Thank you in advance
|
|
|
|
|
Just treat them as 3 treeviews, the fact they are in split containers should not be relevant. Just bind each one to the appropriate data source.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Im Sorry Im New to Programming so i dont know how to do it.
Could you please help me ?
|
|
|
|
|
After flooding the forum with no less then 4 near-identical posts, I dont think anyone is going to be in the mood to help you.
|
|
|
|
|
I second that.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
im very sorry for that.
I just wanted a little help
but thank you
|
|
|
|
|
craigMUTOKOKAI wrote:
I just wanted a little help
That's cool. Folks around here can be helpful, just be patient. Since you said you were new, I suggest you look through articles of interest on this site, and become familiar with researching on google
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
I have tried to search around but no luck
so my friend told me about this website that people can help you rather you searching on google and finding nothing.
Thank You
|
|
|
|
|
craigMUTOKOKAI wrote: my friend told me about this website
What a good friend you have. Welcome aboard
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Thank You.
I have been trying to this for 3 days now but still no luck.
Do you were i can find a good Example for 3 treeviews that connect to a Sql Server. Using either diffrent Database or the same database using tables inside the same database.
If that Makes any sense
If not then Thank You.
You Guys are Great
I like this Forum
|
|
|
|
|
craigMUTOKOKAI wrote: Do you were i can find a good Example for 3 treeviews that connect to a Sql Server.
You're going about this the wrong way. You're trying to find an example of using 3 treeview with SQL server. What you really have is a single treeview, which you said you already got working, and repeating the same process 3 times.
|
|
|
|
|
Oh okay thank You.
What i was trying to do is to create a class to connect to the Server.
And then use that class in the 3 treevies that i have so that they can connect to the database an populate thier own table.
Like
Treeview 1 = Golf
database table= golf
Treeview 2= tennis
database table=tennis
Treeview 3=Basketball
Database Table = Basketball
An the Database instace will be called Sports.
So i want to connect these Tables to the same Database but to use thier own tables in the database to populate the treeview.
I hope im making sense.
Can you help me create this class and call the class whithin the Treeviews.
i hope im no stressing you out.
If i am very Sorry
|
|
|
|
|
Just as I said in the first place, and Dave has repeated, just treat them as 3 individual treeviews. You have said you have 1 working, so repeat the process for each of the others. The connection to the database is the same, you are just selecting from different tables. Try reading up on datareader and dataset as these are the things you are really using.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
J4amieC wrote: After flooding the forum with no less then 4 near-identical posts, I dont think anyone is going to be in the mood to help you.
He posted it four times just to show how urgent the problem is
|
|
|
|
|
he needs lots of help
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
What im trying to do is to link the Treeview to the List view.
I have the Treeview linked to the database already and i want it so that when i click on a node it will display in the List View.
Does any one know how to do this?
If so please Answer my Question
|
|
|
|