Hi, I have a grid (4 rows x 5 columns). I need to sort grid by last column. But I want to trace what changes were made to row order. I need this info to:
1. Change row header's text 'cause it doesn't change automatically during sort.
2. Change the columns order, i.e. I have rows 1,2,3,4. After sorting I have 2,3,1,4. And I want my columns moved in that way: 2,3,1,4 (with DisplayedIndex property for example)
Thanks for the reply. I understood. but what about the situation when I had special characters like < in my html so when < is encoded to < and stored in xml, it will be mixed up with the < chars and when it is decoded, both encoded < and original < will be decoded to < character, right ? So, what is the effcient solution about this scenario ?
An XML file is not line based, so reading it line by line doesn't make sense. An XML file is just as valid if it looks like this:
or like this:
Use an XmlDocument object to read the file.
The DocumentElement property gives you the root node, from there you can navigate the tree structure using the FirstChild or ChildNodes properties. When you reach the node containing the nodes that you want, the ChildNodes property gives you a collection of all the nodes.
Another alternative to get the nodes from the XmlDocument is to use an xpath expression with the SelectNodes method.
Despite everything, the person most likely to be fooling you next is yourself.
I am using the following way to determine if the email was sent successfully.
SmtpClient smtp = new SmtpClient("127.0.0.1"); // We Just use the Local host
smtp.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis; // This is to check the IIS
emailSentSuccess = true;
emailSentSuccess = false;
private void button1_Click(object sender, EventArgs e)
//Copy the contents of the rich textbox to the clipboard
//Open the clipboard
//int i = 0;
//bool done = false;
//int formats = new int ;
//while (! done)
// formats[i] = EnumClipboardFormats(i);
// if (formats[i] == 0) done = true;
Metafile MF = new Metafile(GetClipboardData(2), true);
When all that I copy into the richTextBox is an image (from the clipboard using alt-Print Screen), the commented out loop returns only one format = 2. The attempt to create the Metafile generates the following error: A generic error occurred in GDI+.
I want to make a Wizard in Windows Application in the same form. Now, I am realizing that, ASP.NET's MultiPage Control is missing for Windows Forms and I am not sure if there is any 3rd party control available which is similar to ASP.NET MultiPage control. In Flash, I could use so many frames to switch back and forth but Alas, In .NET Windows development, I cant do that. Would anyone please give me a suggestion about it ? '
Actually Tab Control serves the purpose in the HALF way as it gives the user to switch the pages using GUI. But I want that, the user will not see the Tab control's Tabs, rather only I will switch them programmatically. Is it possible somehow ?
I tried setting Empty String for Text property but it does not work. Still tabs are shown with no texts on it. If tab control had a boolean type property like "HideTabsFromGUI", then it could be the perfect solution. Is it possible to implement this by inheriting the tab control ?
Using so many panels in Windows Form and showing one at a time is never an easy task. Because, whatever panel I will intend to show, I will have to programmatically relocate it (Size and Position) in the Windows form and that is not charming at all.
So, I am just thinking only about creating a custom control inheriting from Tab Control. But can you help me to do this ? I mean, how I can hide the tabs ?
Using so many panels in Windows Form and showing one at a time is never an easy task.
Emran Hussain wrote:
programmatically relocate it (Size and Position)
I don't agree: rather than inheriting from something that does not do things the way you want
(basically is too complex), I suggest you build it from simpler things. So make a little class (say
MultiPanel) that inherits from Panel and that holds a List of Panels. All the Panels in the List are
added to the Controls collection of MultiPanel, all same size same location, but only one has
Now give it some properties:
- a Bounds property, that sets the Bounds of each of the Panels
- a SelectedIndex property, that sets all Panels invisible except the one with the matching index
and some methods, including:
FYI: An invisible Panel does not show its contents, and does not consume events. So the whole thing
behaves like the one Panel that is selected. No more, no less.
And if you want to design your panels with Visual Designer, just make them separate classes,
inheriting from Panel, and add them as per above, except you now need a method AddExistingPanel(Panel).