|
|
Hello to all. I'm having a little problem with one of the features that I want to have in my program. I want my program to search the names of the guest for every key press. For example, if I press H on the keyboard, all of the last names that starts with H should appear. I tried to use both KeyDown and KeyPress Events but either of them doesn't seem to work. Can anyone help me?
|
|
|
|
|
Post some code here and someone might be able to help you.
|
|
|
|
|
Why not use the textchanged event to filter the dataview.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Doesn't the OnTextChanged event fire after the textbox looses focus? That would be too late for this purpose, I believe the OP wants type-ahead lookup functionality
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Mark Nischalke wrote: Doesn't the OnTextChanged event fire after the textbox looses focus
I'll need to go check this, I was under the impression it would fire at each change of content.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Had to check also. Winforms it raises the event while typing, in Web its raised after loosing focus
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Being a winforms developer I did not even consider the webform activity. Talk about a narrow view on life.
I would not have considered this a viable solution on a webform, you would have to resort to (spit) javascript or ajax to get any sort of reasonable response.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Have you considered using autocomplete or whatever it is?
|
|
|
|
|
Where are the customers list stored ?
I know nothing , I know nothing ...
|
|
|
|
|
Why does it matter?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
If they're stored on a piece of paper its going to be real difficult to write the ODBC driver
|
|
|
|
|
Hello all,
I am a bit perplexed and maybe one of you can point me in the right direction.
I have a windows form containing a DataGridView that has data imported into it from Excel and a combobox representing a job number. A user will make changes to the data in the DataGridView and then I want to post this entire DataGridView plus the job number to a MySQL table.
I havne't found any information about how to post the unbound DataGridView to the MySQL table with one extra column of data (job number).
What I would like to know is the proper steps to accomplish this task.
I am using VS2008 and the MySQL Connector/NET v6.2.3
Thanks
Jeff
|
|
|
|
|
Assuming I have the data in a DataTable, I cobble up a (parameterized) INSERT statement based on the table name and column names then iterate through the Rows setting the parameter Values and calling ExecuteNonQuery.
I have a routine that does it in one of my data access classes.
|
|
|
|
|
Thanks for the response.
That sounds simple enough, except that I don't know how to access each of the data rows when none are selected. All of the literature that I am looking at assumes that data in the datagridview was taken out of a database table and then updating is a snap. but... it seems strange to me that using a datagridview for data entry should be so hard. (I think I am overlooking something, but I don't know what it could be.)
Unfortunately, I am very confused and don't really know where to proceed from here.
Jeff
|
|
|
|
|
As Piebald said:
foreach(DataGridViewRow row in myDGV) {
.. stuff column values in an INSERT statement
.. execute it
}
|
|
|
|
|
Thank You!
After some trial and error with syntax and the imported column names from excel it worked as advertised.
You saved me a ton of time.
Jeff
|
|
|
|
|
you're welcome
|
|
|
|
|
delete
modified 2-Apr-21 5:20am.
|
|
|
|
|
I don't understand your question. Do you want your program to navigate the browser to a specific url?
/ravi
|
|
|
|
|
Message Closed
modified 2-Apr-21 5:20am.
|
|
|
|
|
You could browse IE's url history or write a browser helper object that could send the url to your Windows Forms app. See these articles for ideas:/ravi
|
|
|
|
|
textbox1.Text = webBrowser1.Url;
I know nothing , I know nothing ...
|
|
|
|
|
Hi,
you could read the content of the address bar of some browsers. In C# that would take some P/Invoke code to call FindWindow and GetWindowText; as the window belongs to another process, you would also need to allocate and access memory in that other process. You can find some of the basic techniques in my TrayIconBuster article (LP_Process class).
Doing it this way would have several limitations:
1. the solution is slightly different for each specific web browser, as the logical location of the address bar will vary.
2. the address bar does not always represent the current page; e.g. when frames are involved, the bar will show the URL of the frames page, not the contained page(s).
The alternative is to create your own browser and have the required functionality built-in. A good starting point would be the WebBrowser Control. Of course, people could still use another browser, but so they can in the former approach (you can't prevent them from downloading and installing FireFox, Safari, Chrome, etc).
|
|
|
|
|
Isn't this sort of info somewhere in the browser log, history or something, maybe you can use that instead of scraping the browser window.
Never underestimate the power of human stupidity
RAH
|
|
|
|