Click here to Skip to main content
15,905,587 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to sort a big volume of data? Pin
Thomas Krojer19-Sep-07 0:31
Thomas Krojer19-Sep-07 0:31 
Questiondynamically creating forms from db Pin
algoaddict29-Aug-07 4:53
algoaddict29-Aug-07 4:53 
Questionword document to xml document Pin
sk840529-Aug-07 4:43
sk840529-Aug-07 4:43 
AnswerRe: word document to xml document Pin
led mike29-Aug-07 5:10
led mike29-Aug-07 5:10 
JokeRe: word document to xml document Pin
Spacix One29-Aug-07 8:28
Spacix One29-Aug-07 8:28 
AnswerRe: word document to xml document Pin
ekynox29-Aug-07 21:43
ekynox29-Aug-07 21:43 
QuestionHow to treat with treeview check box Pin
huss Aldin29-Aug-07 3:29
huss Aldin29-Aug-07 3:29 
AnswerRe: How to treat with treeview check box Pin
I Believe In GOD29-Aug-07 11:00
I Believe In GOD29-Aug-07 11:00 
I can help you by making parent node and child node in one table

and the code will be

public void LoadItems2Tree (TreeNode parentnode , int ParentID)<br />
		{<br />
			DataCommand = new SqlCommand();<br />
			DataCommand.CommandText = "SELECT * FROM Items WHERE ParentID = @ParentID ORDER BY ItemID " ;<br />
			DataCommand.Connection = Connection.SqlCon;<br />
			<br />
			DataParam = DataCommand.Parameters.Add ("@ParentID",SqlDbType.Int);<br />
			DataParam.Value = ParentID;	<br />
<br />
			foreach (DataRow Dr in QueryResult(DataCommand).Tables[0].Rows)<br />
			{<br />
				TreeNode MyNode = new TreeNode(Dr["ItemName"].ToString());<br />
				MyNode.Tag = (int)Dr["ItemID"];<br />
				parentnode.Nodes.Add (MyNode);<br />
				LoadItems2Tree (MyNode , (int)Dr["ItemID"] );<br />
			}<br />
		}<br />
<br />
<br />
public DataSet QueryResult (SqlCommand SqlQuery)<br />
		{<br />
			DataSet DaSet = new DataSet();<br />
			DataAdapter = new SqlDataAdapter(SqlQuery);<br />
			DaSet = new DataSet();<br />
			DataAdapter.Fill(DaSet , "DataTable");<br />
			return DaSet;<br />
		}<br />
<br />


remmber one table only , and for the check boxes , may be you can find it in treeview properties

Kind Regards



I know nothing , I know nothing

QuestionPrint to POS Printer on serial port Pin
Tavbi29-Aug-07 3:00
Tavbi29-Aug-07 3:00 
AnswerRe: Print to POS Printer on serial port Pin
originSH29-Aug-07 3:28
originSH29-Aug-07 3:28 
GeneralRe: Print to POS Printer on serial port Pin
Tavbi29-Aug-07 19:57
Tavbi29-Aug-07 19:57 
AnswerRe: Print to POS Printer on serial port Pin
martin_hughes29-Aug-07 6:58
martin_hughes29-Aug-07 6:58 
GeneralRe: Print to POS Printer on serial port Pin
Tavbi29-Aug-07 20:27
Tavbi29-Aug-07 20:27 
QuestionTab Page Tab_handfold Size Pin
greekius29-Aug-07 2:08
greekius29-Aug-07 2:08 
AnswerRe: Tab Page Tab_handfold Size Pin
goldoche29-Aug-07 2:25
goldoche29-Aug-07 2:25 
Questionmultiple loops Pin
suck12329-Aug-07 1:42
suck12329-Aug-07 1:42 
AnswerRe: multiple loops Pin
Justin Perez29-Aug-07 2:02
Justin Perez29-Aug-07 2:02 
AnswerRe: multiple loops Pin
Seishin#29-Aug-07 3:10
Seishin#29-Aug-07 3:10 
GeneralRe: multiple loops Pin
Spacix One29-Aug-07 7:18
Spacix One29-Aug-07 7:18 
AnswerRe: multiple loops Pin
Luc Pattyn29-Aug-07 4:44
sitebuilderLuc Pattyn29-Aug-07 4:44 
QuestionMissing namespaces... Pin
Tarun.Suneja29-Aug-07 1:36
Tarun.Suneja29-Aug-07 1:36 
AnswerRe: Missing namespaces... [modified] Pin
Vasudevan Deepak Kumar29-Aug-07 2:02
Vasudevan Deepak Kumar29-Aug-07 2:02 
GeneralRe: Missing namespaces... Pin
Tarun.Suneja29-Aug-07 2:19
Tarun.Suneja29-Aug-07 2:19 
GeneralRe: Missing namespaces... Pin
Vasudevan Deepak Kumar29-Aug-07 3:19
Vasudevan Deepak Kumar29-Aug-07 3:19 
QuestionGet list of files from ftp Pin
toink toink29-Aug-07 1:30
toink toink29-Aug-07 1:30 

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.