|
How are you building the list? I think it would be easier to sort the list out as you find data rather than sorting it later. I'm working on a similar problem myself at the moment, I'll let you know what I come up with when I solve it.
|
|
|
|
|
It's simple. When you build your tree you should remember the last rootnode (R) added. If the text of the new node (N) is like the text of R then you have to add N to R instead of adding it to the tree. If the text isn't the same then you have to add N to the tree and remember it as R.
Greetings,
Ingo
------------------------------
A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!
|
|
|
|
|
Well, thanks for the effort, but it doesn't work.
and the reason is due to the a problem i think related to when or how i am calling my 'new TreeNode', as i am only replacing the text of the previous node with the 'next' nodes text.
so in other words when i get to the point of adding new subnodes i only end up with one node.
if you care to see my original code look here:[^]
This is how i modified my orginal code to receive these results:
if (rootNode == DeptNode.Text)
{
if (modelTag == rootTag)
{
if (modelNode == ModNode.Text)
{
if (ModNode.Nodes.Contains(TelNode))
|
|
|
|
|
Is there a simpler way of creating a floating toolbar in C# (Like the one in adobe photoshop) rather than the complex sample codes I have seen?
Thanks a lot!
-- modified at 20:47 Wednesday 8th February, 2006
|
|
|
|
|
|
You could buy a complete component...
|
|
|
|
|
|
hi
how can i change datagrid1.forecolor in form1 form form2 -> i was tested a lot of ways ( public modifires and ...)and don't got result please help me ...
|
|
|
|
|
You really should not be doing that. Form1's controls should only be modified by code on Form1. Since you're trying to get code on Form2 to modify Form1, Form2 can now never exist without an instance of Form1 being present and known to Form2. This is just plain bad practice.
You can expose a Public Event on Form2 to trigger a subscriber to do something. The event would be fired by Form2 based on some condition. It doesn't case about what type the subscribers are, nor care if there are any subscribers. Using this model, it's up to Form1 to decide if it wants to subscribe to this event and do anything when it fires.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Take a reference of Form1 in Form2?
Dilly
|
|
|
|
|
Anyone got a good/fast 128-bit signed integer implementation in C#?
Many thanks!
Gywox
|
|
|
|
|
Gywox wrote: 128-bit signed integer implementation
Counting grains of sand on a beach?
You can Google for a few different libraries, or even study the source to come up with your own. Results...[^]
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I need this RegEx statement to allow spaces:
">Account Status <mmatch>[a-z]+)"
Thanks for the help.
|
|
|
|
|
Why don't you continue in the same thread?
---
b { font-weight: normal; }
|
|
|
|
|
Add a space into the character group:
<br />
">Account Status:</td><td>(?[a-z ]+)</td>"<br />
|
|
|
|
|
@ Guffa - If I do use the same thread, will it bumb up to the top of the list?
@ Everyone, thanks for the help.
|
|
|
|
|
No, nor should it.
But re-posting the same question can get you bumped to the bottom of ours.
If you keep posting the next step in your problem as a new thread, there is no trail for other people to follow to know what was covered and tried already.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I understand, sorry for the inconvinience.
|
|
|
|
|
In a C# application I have created a rich text box (let's say richTextBox1) whose contents are saved to an XML file. Later I retrieve the text from XML file and display it in another rich text (let's say richTextBox2). If the text that I paste in richTextBox1 contains hyperlink associated to it then the url is displayed next to the word that initially contained hyperlink. Because of this when I retrieve the text in richTextBox2 it displays an url next to the word. It's too messy. Is there any way I can save and retrieve the hyperlink as in richTextBox1 and richTextBox2.
e.g. If I copy the below statement to paste in richTextBox1
"Click here for Hotmail" <-- note: Hotmail is the hyperlink.
If I paste the above text to richTextBox1 it gets pasted as below
"Click here for Hotmail <http://www.hotmail.com/NewFrameset?WelcomeForm> "
In richTextBox2 it retrives as
"Click here for Hotmail <http://www.hotmail.com/NewFrameset?WelcomeForm> "
I want it to display as
"Click here for Hotmail" <-- note: with Hotmail as the hyperlink.
Is there a way to do it?
thanks
----------
Venus Patel
http://patelsinc.blogspot.com/
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
Have a look at this article.
|
|
|
|
|
How can I take the user input from a text box and convert it so that i can place it inside some XML? I.e. remove all the < > and replace them with < and >???
/\ |_ E X E GG
|
|
|
|
|
AFAIK you can either turn them into HTML < and >, or use CDATA[^] to tell parser to ignore the text in between.
There are also functions people have written to convert special characters to their ascii code to allow storing as XML.
Edbert
Sydney, Australia
"A day without sunshine is like, you know, night."
-- modified at 17:28 Wednesday 8th February, 2006
|
|
|
|
|
I'm trying to do an insert into another table while I'm doing an Update with the SqlDataSource control. Since the SqlDataSource control has no way of identifying the dataSet, How would I do the Insert then? PS I will be putting the code into the ASPxGrid1_UpdateCommand method since this will be called when I press the Update Button on the button bar. Again, I am not doing an insertion into the ASPxGrid, that would be easy.
Al Gorney
|
|
|
|
|
Hi all,
I am passing string from C++ to C# but not sure which way is more correct. Here it is:
First approach:
CDAnetCSharpHooks::PassString( )
{
char str[] = "String to pass";
DotNetObject *obj = new DotNetObject();
obj->UseStringInDotNet( str );
}
Second approach:
CDAnetCSharpHooks::PassString( )
{
char str[] = "String to pass";
CString temp(str);
System::String * dotNetStr = new System::String( temp);
DotNetObject *obj = new DotNetObject();
obj->UseStringInDotNet( dotNetStr );
}
C# method
public void UseStringInDotNet( String str )
{
// create new thread and use string in it
}
UseStringInDotNet() is creating new thread and that is why PassString() will finish its work before UseStringInDotNet() finishes its own.
Basically first approach is working, but sometimes on the .NET side I have some unpredictable behaviour in memory. I am wondering if that memory for str buffer is cleared before C# get its work done. In this respect will be the second approach more safe ?
Thank you very much in advance for any suggestions
Roman
|
|
|
|
|
Roman Muntyanu wrote: I am wondering if that memory for str buffer is cleared before C# get its work done. In this respect will be the second approach more safe ?
If you look at the IL code, you will see that it is in fact the same, the compiler auto converts char* -> String*. I assume a copy of the buffer will be created, not sure though.
|
|
|
|