|
I'm still not 100% sure what you are asking. But I think you are looking for the EndEdit[^] method. If the cell you are currently editing is not committed to the underlying data source, then you can use EndEdit to commit the change.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
if i want to insert a now node name an value , by entering it in the text box, and after cliking on button the node should be add to the tree view
--------------------------------------------------------------------
private void Form1_Load(object sender, System.EventArgs e)
{
button1.Text = "Populate the TreeView with XML";
button1.SetBounds(8, 20, 200, 20);
treeXml.Height = 600;
treeXml.Width = 400;
grpbox = new GroupBox();
grpbox.Height = 600;
grpbox.Width = 400;
grpbox.SetBounds(500, 2, 700, 600);
grpbox.Visible = true;
grpbox.Dock.Equals(Right);
grpbox.Show();
this.Controls.Add(grpbox);
}
private void ConvertXmlNodeToTreeNode(XmlNode xmlNode,
TreeNodeCollection treeNodes)
{
TreeNode newTreeNode = treeNodes.Add(xmlNode.Name);
switch (xmlNode.NodeType)
{
case XmlNodeType.ProcessingInstruction:
case XmlNodeType.XmlDeclaration:
newTreeNode.Text = "<?" + xmlNode.Name + " " +
xmlNode.Value + "?>";
break;
case XmlNodeType.Element:
if (xmlNode.Name.ToLower().Equals("node") == true)
{
newTreeNode.Text = "<" + xmlNode.Attributes["label"].Value.ToString() + ">";
}
else
newTreeNode.Text = "<" + xmlNode.Name + ">";
break;
case XmlNodeType.Attribute:
newTreeNode.Text = xmlNode.Name;
// newTreeNode.Text = "ATTRIBUTE: " + xmlNode.Name;
break;
case XmlNodeType.Text:
case XmlNodeType.CDATA:
newTreeNode.Text = xmlNode.Value;
break;
case XmlNodeType.Comment:
newTreeNode.Text = "<!--" + xmlNode.Value + "-->";
break;
}
if (xmlNode.Attributes != null)
{
foreach (XmlAttribute attribute in xmlNode.Attributes)
{
ConvertXmlNodeToTreeNode(attribute, newTreeNode.Nodes);
}
}
foreach (XmlNode childNode in xmlNode.ChildNodes)
{
ConvertXmlNodeToTreeNode(childNode, newTreeNode.Nodes);
}
}
--------------------------------------------------------------------------
|
|
|
|
|
<br />
9:53 5 Feb '08 how to add a now treenode in the following code? - samidhas <br />
11:04 4 Feb '08 i want to insert a new node regarding this code.but insert is not working.. - samidhas <br />
10:32 4 Feb '08 how to insert a new node in a tree view programatically? - samidhas <br />
I reckon it's time to put some effort into this and be a little bit more specific with your problem.
We violated nature and our children have to pay the penalty
Don't go near the water children... Johnny Cash - 1974
|
|
|
|
|
I would like to draw a line from one point on a circle to another point on the circle. I tried getting the points as follows, but the PathData gets only 13 points-not enough.
If possible, the circle should be divided into 360 degrees and I would like to draw a line from any degree to any degree. Thanks for any help or tips!!!
private void Form1_Paint(object sender, PaintEventArgs e)<br />
{<br />
Graphics g = this.CreateGraphics();<br />
GraphicsPath path = new GraphicsPath();<br />
path.AddEllipse(200, 200, 500, 100);<br />
g.DrawPath(new Pen(Brushes.AliceBlue), path);<br />
PathData pd = path.PathData;<br />
<br />
}
|
|
|
|
|
|
Just calculate the coordinates, then you have a resolution that is ever far better than one degree.
Ellipse[^]
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
You would not have an C# example? The wiki example is in JavaScript and I don't know what "points.push(new OpenLayers.Geometry.Point(X, Y));" does. Thanks for your help!
|
|
|
|
|
east85 wrote: I don't know what "points.push(new OpenLayers.Geometry.Point(X, Y));" does.
It adds an item to the array. As you only need one point on the circle you don't need to loop through the angles, thus you need no array.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
Hi,
After reading Chris Maunder’s message, I am a little bit afraid of writing my message….
Anyway, I will make an effort to ask my message courteously.
I used ‘FileSystemWatcher’ to read files from a directory path, what I had to do was to ReadAllBytes of the file had been created, to display the result in some way, and delete the file.
I had a problem that had been discussed in many forums – how to know if the file’s create is completed,
All brought to Microsoft forum: http://www.thescripts.com/forum/post1712613-10.html, I used the advice written there:
while(true)
{
Try to open the file for reading
Break if succeeded
Catch an exception and sleep(1000) – if the file is in use by another process.
}
That worked as well.
Now, my problem is when I send to the directory load of files at a short time – the FileStreamWatcher recognizes the first files – but stops there and doesn’t continue to read the all the others.
I have no way to debug it line by line, because when I put a breakpoint there, passes enough time to read the next file… and the point is that the time between the create and delete is too short.
Please pass the answer also to my direct email: sara.sekler@verint.com
I hope my question is clear and brief enough ….
Many thanks,
Sarah
|
|
|
|
|
According to MSDN: The Windows operating system notifies your component of file changes in a buffer created by the FileSystemWatcher. If there are many changes in a short time, the buffer can overflow. This causes the component to lose track of changes in the directory, and it will only provide blanket notification. Increasing the size of the buffer with the InternalBufferSize property is expensive, as it comes from non-paged memory that cannot be swapped out to disk, so keep the buffer as small yet large enough to not miss any file change events. To avoid a buffer overflow, use the NotifyFilter and IncludeSubdirectories properties so you can filter out unwanted change notifications.
To keep from missing events, follow these guidelines:
Increasing the buffer size with the InternalBufferSize property can prevent missing file system change events.
Avoid watching files with long file names. Consider renaming using shorter names.
Keep your event handling code as short as possible.
|
|
|
|
|
with hope I've got what you meant - this is my problem:
each file name is at least 25 characters, and the business I have to do inside is actually a bit of work... and it takes time..
Do you have any other idea?
Thanks!!
Sarah
|
|
|
|
|
If you have to do a lot of processing I suggest you use threads for that so that the event handler exits as soon as possible.
|
|
|
|
|
Perhaps it doesn't mean long file name, or hard business, but it worked!!!!!!
Which internal side are you recommend to init the buffer (I multiplied it - the value before was like 8912...)?
Thanks!!!!!!!
|
|
|
|
|
Hi,
I have a report that runs fine in crystal and windows but can't be displayed in web.
The error message as follows "One or more fields could not be found in the result set. Use Verify Database to update the report. Error in File C:\Temp\ProformaVariance {AA4C529B-2790-489C-88F9-00F51695F436}.rpt: The rowset column could not be found. "
I'm using Crystal report version 11.5.0.313
Can any one help me on this.
Thanx in advance.
Seenivasan
Long Live
|
|
|
|
|
Hi all,
I’m a C++ developer and a very beginner in both C# (.Net) and Word Programming. What my company wants next is something like this: from different texts to build a Word 2007 document and then open this in the real Word 2007 application to give the user the possibility to change the document as usual with all possibilities (Menüs, Panels, etc.). Well my problem is that the Word 2007 must be embedded in our C# - Application (WinForms).
Knows somebody a solution to do this: embed the Word 2007 application in WinForms or if better maybe in WPF? For any idea thank you in advance.
Best Regards,
Emil
|
|
|
|
|
I don't think you can embedd it. I do believe you can run/control it, using the Office Toolkit, or whatever they call it.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
The interop stuff is pretty straightforward. Look up Microsoft.Interop.Office.Word in google. Anything you can do in MS Word, you can do in C# using the interop libraries. One tip - if you're going down this route - do what you want first in MS Word, recording it as a macro. Then 'edit' the macro. You can almost cut'n'paste the macro code into your C# app.
We violated nature and our children have to pay the penalty
Don't go near the water children... Johnny Cash - 1974
|
|
|
|
|
hi all .
i wount to create (mdf) and (ldf) file name when I Create Backup File DateBase by C#.Net Code
who i can do it ?
thanks for any body hellp me
Thaer
|
|
|
|
|
Like I told you yesterday, C# does not know the file format used for database backups, therefore it cannot restore them unless you know the format well enough to write a decompression algorithm.
If you do, please write an article about it.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
I have a problem triying to save the mails retrieve from server in a format that outlook can open, i can save in a txt plane format, but i dont know how to save in an outlook format, somebody can help me or tell me any solution? thanks in advance
|
|
|
|
|
Out look stores all it's mail in one big monolithic file. Your best bet is probably to read the mail but leave it on the server, so outlook can still retrieve it.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Users should connect to a web page, which show the message their required, im thinking that is not possible do this goal without having outlook install in the server is this correct?
|
|
|
|
|
Hi there.
I am trying to create a step by step wizard, for a Windows Mobile 6.0 PDA.
I have used forms as the steps.
In my mainform I have a method that finds the next step from an array. There are three types of steps, and each steps can appear more than once in one session.
When the last step is finished, the first step will be shown again.
In an earlier program, I used panels as my steps, but it was a little difficult to manage each step in the same form window.
In my new version, I am trying to use forms instead, but every time i click next, I can see a short blink, of the programs running in the background.
When i click the next step button in the current step, the following code is used:
mainForm.ShowNextStep();
this.Close();
ShowNextStep finds the next step and use nextStep.ShowDialog();
Is there anything I can do, so i wont see those short blinks, without using panels?
|
|
|
|
|
You should use user controls, and place them all on the one form. I guess that's what you mean by panels ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I used panels as before, thats why i wanted to change it to forms..
I never thought of using usercontrols..
So i will try that..
I am not really expericed in using those.
Can u tell my how to place them and navigate through steps?
|
|
|
|