Click here to Skip to main content
15,913,289 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to add new column in datagridview after databinding Pin
Xmen Real 2-Mar-08 21:46
professional Xmen Real 2-Mar-08 21:46 
GeneralDialing a modem from c# Pin
Prajin2-Mar-08 19:19
Prajin2-Mar-08 19:19 
GeneralRe: Dialing a modem from c# Pin
Laubi2-Mar-08 20:10
Laubi2-Mar-08 20:10 
Generaltree view in windows application using c# Pin
monuSaini2-Mar-08 19:00
monuSaini2-Mar-08 19:00 
GeneralRe: tree view in windows application using c# Pin
Xmen Real 2-Mar-08 21:56
professional Xmen Real 2-Mar-08 21:56 
GeneralRe: tree view in windows application using c# Pin
monuSaini2-Mar-08 22:01
monuSaini2-Mar-08 22:01 
GeneralRe: tree view in windows application using c# Pin
Xmen Real 2-Mar-08 22:19
professional Xmen Real 2-Mar-08 22:19 
GeneralRe: tree view in windows application using c# Pin
monuSaini2-Mar-08 22:40
monuSaini2-Mar-08 22:40 
Thanks for this.

The error does't come again.

But not sure whether it finds the search node in treeNode.

Actually I m using the following code for populating the tree.

But not able to do as all the nodes are comming on same level.
If any node has child then its chils will be added under that.Not successed in doing this.

private void createTreeView2(string id)
{
TreeNode myNode = new TreeNode();
TreeNode findNode = new TreeNode();
string connStr = connString;
SqlConnection myConn = new SqlConnection(connStr);
string sqlQuery = "SELECT * from article where parentId='" + id + "'";
myConn.Open();
SqlCommand myCommand = new SqlCommand(sqlQuery, myConn);
SqlDataReader objReader = myCommand.ExecuteReader();

while (objReader.Read())
{

myNode = new TreeNode();

myNode = myNode.Nodes.Add(objReader["articleId"].ToString(), objReader["articleName"].ToString());
TreeNode[] findNode = myNode.Nodes.Find(objReader["articleId"].ToString(), true);

tvArticle.Nodes.Add(myNode);
if (isChild(objReader["articleId"].ToString()))
{

createTreeView2(objReader["articleId"].ToString());
}

}

}


This is my requirement.

rahul saini

GeneralRe: tree view in windows application using c# Pin
Xmen Real 3-Mar-08 4:40
professional Xmen Real 3-Mar-08 4:40 
GeneralRe: tree view in windows application using c# Pin
monuSaini3-Mar-08 17:37
monuSaini3-Mar-08 17:37 
GeneralRe: tree view in windows application using c# Pin
Xmen Real 3-Mar-08 19:38
professional Xmen Real 3-Mar-08 19:38 
GeneralUser Name Pin
rozhanin2-Mar-08 18:52
rozhanin2-Mar-08 18:52 
AnswerRe: User Name Pin
dipak.dipak2-Mar-08 19:49
dipak.dipak2-Mar-08 19:49 
GeneralRe: User Name Pin
rozhanin2-Mar-08 20:05
rozhanin2-Mar-08 20:05 
QuestionHow to retrieve Exchange Server Address Book using C# Pin
puneet.priyadarshi2-Mar-08 18:41
puneet.priyadarshi2-Mar-08 18:41 
GeneralData type conflict from C++ to C# Pin
CodingLover2-Mar-08 18:20
CodingLover2-Mar-08 18:20 
GeneralRe: Data type conflict from C++ to C# Pin
Christian Graus2-Mar-08 18:44
protectorChristian Graus2-Mar-08 18:44 
GeneralRe: Data type conflict from C++ to C# Pin
CodingLover2-Mar-08 19:21
CodingLover2-Mar-08 19:21 
GeneralRe: Data type conflict from C++ to C# Pin
Rich Insley2-Mar-08 19:29
Rich Insley2-Mar-08 19:29 
GeneralRe: Data type conflict from C++ to C# Pin
CodingLover2-Mar-08 21:42
CodingLover2-Mar-08 21:42 
QuestionPrinting panel control along with other control in image format? Pin
D i x y2-Mar-08 18:09
D i x y2-Mar-08 18:09 
AnswerRe: Printing panel control along with other control in image format? Pin
Ajay.k_Singh2-Mar-08 19:32
Ajay.k_Singh2-Mar-08 19:32 
GeneralUSB Port Communication using C# Pin
Prajin2-Mar-08 17:53
Prajin2-Mar-08 17:53 
GeneralRe: USB Port Communication using C# Pin
Laubi2-Mar-08 20:12
Laubi2-Mar-08 20:12 
GeneralRe: USB Port Communication using C# Pin
Giorgi Dalakishvili2-Mar-08 20:37
mentorGiorgi Dalakishvili2-Mar-08 20:37 

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.