Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I am using the following code to filter my datagrid's results. The batch number is entered in a text box and then on the keyup event, it fires off the following code:

 

Dim Hold_Search As Integer

Dim Hold_Field As String

 

Hold_Search = Me.txt_BatchNumber.Text

Hold_Field = "BatchNumber"

 

DvBatch.RowFilter = Hold_Field & " = " & Hold_Search

DvBatch.Sort = Hold_Field

 

It does what it is supposed to do, but the problem is I really don't want the data 'filtered'. What i want is for the datagrid to scroll to the valid row and then keep scrolling based on the client's input until the desired value is reached - but without the filtering or winnowing out of the data.

 

I hope this makes sense. Can anyone help me ?

 

laurie mc

Posted

I ddn't get a chance to test it, but maybe this will help

 

DvBatch is your data view correct?

DvBatch.Find(Hold_Search)

Live as if you were to die tomorrow. Learn as if you were to live forever.
Gandhi
Posted

The "Find" wants a sort previous to it. So now when I do it like this:

 

DvBatch.Sort = Hold_Field

DvBatch.Find(Hold_Search)

 

what it seems to be doing is only sorting, but it points the column to the very beginning and then doesn't budge on subsequent key strokes.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...