|
ADY007 wrote: because if I am searching for a film called "Platoon", I want to write all the of word Platoon not "P" and then "L" and the listbox indicates the word platoon.
So, what is your problem ? You want to be able to enter an entire word before the filtering starts ?
ADY007 wrote: Web Designer, Web Programmer
IS this an ASP.NET app ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
no no .. i want the filter to begin when i enter a letter. When i enter "P" .. the listbox goas and highlits the Word "Platoon" if "Platoon" is the only word that begins with letter "P" for example. If theres another word then nevermind i will enter the second letter and the filter will search for a word that begins with "Pl".
You know what i mean?? thanks very mcuh
Adrian De Battista - Web Designer, Web Programmer, Software Programmer From Malta. My Website .. www.MaltaTrade.org
|
|
|
|
|
OK, so handle the keypress event, and iterate over your listbox Items collection, looking for one that starts with what has been typed, and set it's selected flag to true.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi Everyone I Have Got a problem here....I have four comboboxes and about seven textboxes that are all data bound. every thing works great except when i add a new record. then the comboboxes do not reconize the updated database untill after the form is regenerated. I have tried to re load the formload event but that doesnt work. I am using vb.net 2005 and a data tier any comments are welcome
|
|
|
|
|
You have to reload your dataset that the combo is bound to. Depending on what you're doing, you may also have to call ResetBindings on your BindingSource to get the controls bound to it to reread their values.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi Everyone I Have Got a problem here....I have four comboboxes and about seven textboxes that are all data bound. every thing works great except when i add a new record. then the comboboxes do not reconize the updated database untill after the form is regenerated. I have tried to re load the formload event but that doesnt work. I am using vb.net 2005 and a data tier any comments are welcome
|
|
|
|
|
I would like to know if it is posible to show some text next to check box.
Thanks.
Victor Omar Nilo Valenzuela
Santiago, CHILE
|
|
|
|
|
Just set the CheckBox's Text property to whtever you need.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thanks, but how can access the datagridviewcheckbox when we are working with the rows.cells collection (the ColumnType was defined as DataGridViewCheckBoxColumn), example:
Row.cells(Index).value = true
row.cells(index).text ??????????
Thanks.
Victor Omar Nilo Valenzuela
Santiago, Chile
|
|
|
|
|
OK. The question went from a CheckBox to a CheckBoxColumn in a DataGridView. It might have helped if you specified this in your original post. CheckBoxColumns don't have text with the CheckBox.
What are you doing with this. It sounds like you have a design problem with your presentation.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
OK, my question was about DATAGRIDVIEWCHECKBOXCOLUMN, how to show a text aside the check box, well, the answer is that it is not possible.
Thanks
Victor Omar Nilo Valenzuela
Santiago, Chile
|
|
|
|
|
vnilo wrote: how to show a text aside the check box, well, the answer is that it is not possible.
Cool it. I just asked you a question about why you're doing this. There may be an alternative solution to the problem.
It's not impossible, just not doable using the standard controls. You'll have to create your own DataGridViewCheckBoxColumn class to add Text support to it. You'll need to replace the painting code with your own implementation, and possibly add some new properties to control how you want the cells painted, like checkbox on the left of the text, or on the right, among others...
You can check out this[^] example for a start. You'll notice that doing something like this can be very tedious and difficult to get every detail in the drawing code correct.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I'm currently trying to create my own web browser, for fun only. And i have three problems, i don't know how to:
1. Display URL, i'm currently pointing with mouse, in status bar.
2. Display URL (of the link i clicked) in the combobox/textbox.
3. Refresh the page.
Any help?
Thanks in advance.
BTW, i'm just a beginner in VB.
|
|
|
|
|
Here some advice ans sample statments:
1. WebBrowser1.Navigate(StatusStrip1.Text)
I assumed you don't have any other items in statusstrip
2. WebBrowser1.Navigate(ComboBox1.SelectedItem)
3. WebBrowser1.Refresh()
I hope that helps!
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
In the .net report designer I'm trying keep some text boxes and label from spilling over to the next page. They are located on the bottom of the page but there is a table control above them and if this table control has many rows to display it pushes everthing below it onto the next page. Can I somehow force the textboxes and labels to keep their position?
|
|
|
|
|
I am trying to insert some date columns into a MySQL database using vb.net. When trying, I get the error "Incorrect date value: '02/07/2006' for column 'Orderdate' at row 1. MySQL has a date format like YYYY-MM-DD and will not let me insert those dates because of the format. I am inserting text files and the date columns are formatted like MM/DD/YYYY. When I change the data type in the database to varchar, the dates will insert just fine but when I change the data type to date they won't insert in which the date data type is preferred. I have tried so many different things trying to format this including parameterized queries. Any ideas on how to fix this problem?
Here is some code were I tried using the CDate function and got the error "Conversion from string "" to type 'Date' is not valid."
Dim MyCommand As New Odbc.OdbcCommand("INSERT INTO ls_orderitems (OrderDate, OrderCustomer, OrderAcctNum, OrderType, OrderSoNum, OrderItemPartNum, OrderItemPartDesc, OrderItemQty, OrderItemQtyRec, OrderItemQtyDtRec, OrderItemBO, OrderItemBODt,OrderItemCanceled, OrderItemCanceledDt, OrderItemNotes, OrderItemPONum, OrderItemRetailPrice, OrderItemSalePrice, Status, InsertDate) VALUES('" & CDate(OrderDate).ToString("yyyy-MM-dd") & "','" & OrderCustomer & "','" & OrderAcctNum & "','" & OrderType & "','" & OrderSoNum & "','" & OrderItemPartNum & "','" & OrderItemPartDesc & "','" & OrderItemQty & "','" & OrderItemQtyRec & "','" & CDate(OrderItemQtyDtRec).ToString("yyyy-MM-dd") & "','" & OrderItemBO & "','" & CDate(OrderItemBODt).ToString("yyyy-MM-dd") & "','" & OrderItemCanceled & "','" & CDate(OrderItemCanceledDt).ToString("yyyy-MM-dd") & "','" & OrderItemNotes & "','" & OrderItemPONum & "','" & OrderItemRetailPrice & "','" & OrderItemSalePrice & "','" & Status & "','" & InsertDate & "')")
jds1207
|
|
|
|
|
jds1207 wrote: CDate(OrderItemQtyDtRec).ToString("yyyy-MM-dd")
That should be CDate(OrderItemQtyDtRec) . I thought this was already answered.
CleAkO
|
|
|
|
|
|
Dont convert it to date then convert it back to string, just leave it as a date object when you insert it into the DateTime column. The database knows what to do with a Date object as well as a correctly formatted Date String object.
CleAkO
|
|
|
|
|
It also helps if the variable isnt blank when you try to convert it. If it is blank you should probably pass DBNull.Value, which you may or may not be able to set to a string before hand.
CleAkO
|
|
|
|
|
|
Did you even write this code???
CleAkO
|
|
|
|
|
|
 jds1207 wrote: Dim MyCommand As New Odbc.OdbcCommand("INSERT INTO ls_orderitems (OrderDate, OrderCustomer, OrderAcctNum, OrderType, OrderSoNum, OrderItemPartNum, OrderItemPartDesc, OrderItemQty, OrderItemQtyRec, OrderItemQtyDtRec, OrderItemBO, OrderItemBODt,OrderItemCanceled, OrderItemCanceledDt, OrderItemNotes, OrderItemPONum, OrderItemRetailPrice, OrderItemSalePrice, Status, InsertDate) VALUES('" & CDate(OrderDate).ToString("yyyy-MM-dd") & "','" & OrderCustomer & "','" & OrderAcctNum & "','" & OrderType & "','" & OrderSoNum & "','" & OrderItemPartNum & "','" & OrderItemPartDesc & "','" & OrderItemQty & "','" & OrderItemQtyRec & "','" & CDate(OrderItemQtyDtRec).ToString("yyyy-MM-dd") & "','" & OrderItemBO & "','" & CDate(OrderItemBODt).ToString("yyyy-MM-dd") & "','" & OrderItemCanceled & "','" & CDate(OrderItemCanceledDt).ToString("yyyy-MM-dd") & "','" & OrderItemNotes & "','" & OrderItemPONum & "','" & OrderItemRetailPrice & "','" & OrderItemSalePrice & "','" & Status & "','" & InsertDate & "')")
The stuff in bold, just leave it as CDate(VariableName) . Before you run this command do something like If OrderDate.Trim = "" Then OrderDate = DBNull.Value to insert a NULL value instead of trying to convert a blank value to a date.
CleAkO
|
|
|
|
|
I am still getting the same error. I am beginning to believe this can't be done with vb.net and MySQL.
|
|
|
|
|