|
Try storing your data in XML and avoid heavily loaded datasets
I only read newbie introductory dummy books.
|
|
|
|
|
Are you sure you're answering the question that was asked, and the poster who asked it?
|
|
|
|
|
Assuming that the slow speed is caused by data load.
I only read newbie introductory dummy books.
|
|
|
|
|
The OP is opening web forms in a browser window - what does this have to do with datasets or XML?
|
|
|
|
|
I think I'll try the second approach, it seems easiest and I can accept a slower start-up of the program. Thanks for the suggestion!
|
|
|
|
|
you're welcome.
|
|
|
|
|
I'm a long term C++ programmer transitioning to C# and, for my first real application, I'm using datagridview to hold a class. However, I don't want to display all the data fields on the front page. What I've done is to put some button columns on the main page and then grouped related fields in a dialog when the user presses a button. However, this creates a dilema. I want to make sure that the user enters proper data (ints, doubles, strings, etc.) in the dialog fields and I can't figure out how to do it. When I bind to the main data source the program crashes; understandable since the binding is probably broken when I go from the grid to the dialog. What I planned on doing was validating the fields in the dialog and then putting them in the data object when the user closes the dialog. In C++ you could associate text boxes with data types but I can't seem to figure out how to do this in C#. Any help would be appreciated. Thanks.
|
|
|
|
|
Look into using NumericUpDowns and DateTimePickers rather than TextBoxes for numeric and date values.
|
|
|
|
|
Since you are new to c# I would suggest that you use conversion from string to other types.
Use error catch exception to alert user to input data in good format.
I only read newbie introductory dummy books.
|
|
|
|
|
Thanks for the advice. Isn't there some equivalent to the C++ Dialog Wizard that let you declare variables associated with text boxes? That approach seems much more straightforward.
|
|
|
|
|
hi guys,
I have to create application that deny read access on USB storage Like USB Flash , portable H.D.D & ...
but allow write access on USB Devices!!!
is there any tools that deny read access but allow write access on USB Storage devices?
tanx
|
|
|
|
|
sir image to word convert times new romens convert software send my mail reetesh_786786@rediffmail.com
reetesh
|
|
|
|
|
Please read this[^] before posting questions.
|
|
|
|
|
i want make program whit C# that when press F7 On keybard lock mouse cursor on screen and L-click here (l_click wait 25 milesecond L-click and.....) until press F8 key on keyboard .
please help me how control mouse in screen.
|
|
|
|
|
MAHDI_GORDAN wrote: please help me how control mouse in screen. Restricting the mouse cursor to a specific location should be possible by setting Cursor.Position to that location in a timer tick event handler.
/ravi
|
|
|
|
|
hi guy i have pretty simple requirement
i have three rows in my table
year ----amount
2011-----100
2012-----200
2013------400
now what i want is to show these rows in columns lets say as i have three distinct years
so i want to create three columns ar run time and these columns should be
2011--------2012----------2013
100--------200------------400
any ideae how to achieve this?
is this a pivot view ?
regard.
Tauseef A Khan
MCP Dotnet framework 2.0.
|
|
|
|
|
|
I tried following code
private void mainTextBox_KeyDown(object sender, KeyEventArgs e)
{
Key key = e.Key;
logTextBox.Text += "Key = " + key.GetHashCode().ToString() + "\r\n";
e.Handled = true;
}
But this can not distinguish between capital letters and small letters. How can I permit only small letters?
|
|
|
|
|
rajeevkuth wrote: But this can not distinguish between capital letters and small letters. How can I permit only small letters?
Have a look at the other members of KeyEventArgs, maybe Shift, KeyCode, or SuppressKeyPress().
And what about edit operations, such as paste (CTRL/V)?
Or use a MaskedTextBox . For more elaborate schemes, there are a number of CP articles on the subject.
Luc Pattyn [My Articles] Nil Volentibus Arduum
modified on Saturday, September 17, 2011 12:31 PM
|
|
|
|
|
I was trying to make a transliteration editor for some Indian language. If user types "Ra" I will replace these characters with 'ര'. If the user types 'ra' I has to replace it with 'റ'.
The problem here is I am not able to distinguish between 'r' and "R".
I do not need to handle copy paste operations.
This is the link for MSDN Link for the class. Is there anything which I can use? Or do I need to derive from TextBox?
|
|
|
|
|
if you need to manipulate printable character input, you're better of in the KeyPress event, where you have a KeyPressEventArgs.KeyChar property. KeyDown and KeyUp events are most useful when you need to deal with non-printable keys such as the arrow keys.
From your reply it seems your initial question did not reflect your actual problem. If you needs happen to change again, I suggest you read up on all Keyboard related events and locate the events and properties that best match your needs.
|
|
|
|
|
I find your question, and the response to Luc, taken together, hard to understand: on the one hand (your original message) you seem to be asking how to restrict keyboard entry to only lowercase letters, but in your response to Luc you say:
"I was trying to make a transliteration editor for some Indian language. If user types "Ra" I will replace these characters with 'ര'. If the user types 'ra' I has to replace it with 'റ'."
Which, to me, implies you do allow the user to type in upper-case, and you do need to take different actions based on case alone.
Please try to clarify what you are trying to do here a little more.
best, Bill
"Beauty is in the eye of the beholder, and it may be necessary from time to time to give a stupid or misinformed beholder a black eye." Miss Piggy"
|
|
|
|
|
What I really need is, I should be able to know if user enters 'c' or 'C'.
From Luc's answer I found that this is difficult to do by handling KeyUp and KeyDown events. The sad part is, TextBox does not expose such an event from which I can get KeyPressEventArgs.
|
|
|
|
|
rajeevkuth wrote: The sad part is, TextBox does not expose such an event from which I can get KeyPressEventArgs.
Where do you get such nonsense? In WinForms every Control has the same three keyboard events.
|
|
|
|
|
Where do you get such nonsense? In WinForms every Control has the same three keyboard events.
Thanks for this info. I was keeping the textbox in a WPF window. When I kept the TextBox in Form Window, the event is available. I never expected that the same control will expose different sets of events based on its container.
|
|
|
|