ViewState.
Thank for your help first. However, the problem is not very simple as you
think. Right now I clarify my
requirement.
Given the table as "Customer",
In table "Customer", there have one column name
"CustomerName"
The table customer show as follow :
CustomerName
_______________
Able
Adware
Catherine
Cathy
Don
Donny
In vb6, I do the follow code which can allow me to create quick list
function
Dim rCustomer as recordset
rCustomer = new recordset
rCustomer.open ("select CustomerName from Customer" , sqlCnn)
set datagrid1.datasource = rCustomer
private sub SrhText_OnChange()
rCustomer.find "CustomerName >= '" & SrhText.Text & "'"
end sub
as a result , I type "Ca" , the cursor will go to 3rd row.
when I type "D", the cursor will go to 5th row.
In this case. vb.net find or findrow must fufill my requirement (or solve my
problem) since. Ca cannot find in the table. (i.e. "D" also cannot find) It
must return integer -1. (Mean no find).
In your second propose. You ask me use select method. However. Cor. select
method is a filter method or a find method. if you tell me use this method.
It is equal covert it into vb6 as follow :
Dim rCustomer as recordset
rCustomer = new recordset
rCustomer.open ("select CustomerName from Customer" , sqlCnn)
set datagrid1.datasource = rCustomer
private sub SrhText_OnChange()
rCustomer.filter = "CustomerName >= '" & SrhText.Text & "'"
end sub
Then when I type "Ca", the data
Able
Adware
will disappear unless I clear all word.
Finally, I just ado.net have method which return integer and move cursor
when I partical input. I know when to select, when to use find / findrow
metod.
find / findrow is move cursor, while select is use for filtering.
But if you tell me use combo box (for autocomplete) I don't think this
solution can solve. As combo box list item is only use for-loop statement.
This is low proformance.
Beside. Combo box only support single column. If my table have multi-column.
The problem is sill exist and final the work around solution is not a well
solutions.
In this case, I have try to fix and think how to do it four months.
Some developer advice me give up this solution or they recommend use vb6 as
development tools or change into java technique in future. As they think
microsoft may reduce some useful function.
Requirement obey to technology change. I don't agree about that.
Right ?
By the way this is a point of my view. But I hope that vb.net can really
help developer can use .net technology to develop their ideal application.
Hope all people can consider this problem
Thanks