dhj Posted August 18, 2004 Posted August 18, 2004 hi all this is abt a vb.net windows application i have a typed dataset with data. and i have a textbox, user can enter any value there. and after user enters a value to the textbox i need to find whether that value is in the typed dataset how can i do this. i found a find function in a typed dataset row, but i can search only primary key using that. the value which i need to find is not the primary key. eg: in the typed dataset i have 2 fields ID (Primary Key) Name i need to check name column with the entered text by user can anybody tell me the syntax of how to this thank you Quote
Kurt Posted August 19, 2004 Posted August 19, 2004 Have a look at the 'RowFilter' property of the DataView object. You could use the RowFilter of the DefaultView object like this.... dataset.datatable.DefaultView.RowFilter = "Name = 'Jhon'" and than check the Count property of the DefaultView object to see if it's bigger than 0 if (dataset.datatable.DefaultView.Count > 0) { // the name was found } Quote qrt
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.