I'm programming in C# but I thought this would be a VB question
i'm not sure how to do this, but assume I've got a text box that has a properties.
The properties dynamically change throughout the program, upon request, is there a method through system way to get the text box (or any checkbox, radio button group, label etc.) to change back to its original state?
alternatively you can hide the original Control, then call an "init" method, which
clones the Control, adds it to its parents.Controls and makes it visible.
When you want the original back, remove the Clone, and call "init" again.
So it is always a clone that is shown, gets modified, and the original is never touched.
I made sure my bag of tricks is an ArrayList, so it accepts all kinds of objects,
and is only limited by total amount of memory available.
Come to think of it, it more resembles a Heap, difficult to enumerate...
You can use uint num = Convert.ToUInt16(textBox1.Text, 16);
If the textbox contains more than 4 letters and if you want to change each 4 letters in to their uint value, you should first write a text splitter which is very simple with string.substring() function.
I have an application that i have deployed using winforms. I have many users using this application and it works for every1 except one person!!!! I cannot isolate the problem. She gets the following error:
What you can do is set an application level thread exception handler. This is the top level event exception handler that is capable of catching exceptions. Then, you can simply extract the stack trace of the error that caused this.
Deja View - the feeling that you've seen this post before.
I have a gridview and a dataset. When I start my application I see the results in my gridview. When I clic on edit and chanche some value and click on update it wil give me this error:
ObjectDataSource 'ObjectDataSourcePersoon' could not find a non-generic method 'Update' that has parameters: naam, tussenvoegsel, achternaam, adres, woonplaats, telefoonnummer, original_id, Original_naam, Original_tussenvoegsel, Original_achternaam, Original_adres, Original_woonplaats, Original_telefoonnummer.
Your objectdatasource needs to have a update method that has the parameters that you see in the error. IN that method you should run a sql statement that updates the sql database. You perhaps have put an update method in your objectdatasource definition, but it probably doesn't match the one defined in the error. NOTE the columns are auto generated based off the columns in the gridview.
Hello all. I have a datagridview (genericGrid) and a bindingsource (genericBS). genericGrid's datasource is genericBS. I want to programmatically switch genericBS's DataSource and Datamember. Then, display those values on the genericGrid.
What I've tried:
Using a switch statement to change genericBS's DataSource and DataMember properties on the load. Then, called genericBS.ResetBinding(true). This is supposed to force genericGrid to refresh its rows. Amazingly, it doesn't work.
What actually works:
I've resorted to creating a bindingsource for each table. Then using a switch statement to change genericGrid.DataSource. This works.
But, there has to be a way to use just one bindingsource, right? Any suggestions?
Right. It casts the Enum as a number. It is kind of silly, but it the only way I know of to get the enums numerical value. I am sure someone else will post a different way of doing it, but that is the way I normally do it.