does anybody have an idea how can i find a row in defailt view table by key value that i have ?????
Printable View
does anybody have an idea how can i find a row in defailt view table by key value that i have ?????
dim MyRow as DataRow()=ds.Tables("MyTable").Select("ID = 5")Quote:
Originally posted by ronlahav
does anybody have an idea how can i find a row in defailt view table by key value that i have ?????
MyRow is an array of DataRows. Each row (element of the array) contains Item collection
MessageBox.Show(MyRow(0).Item("Name")
If you want to search by key based on several fields
Dim vals As String() = {"Value1", "Value2"}
Datatable1.PrimaryKey = New DataColumn() {.Columns("Column1"),
.Columns("Column2")}
dim dr as system.data.datarow = Datatable1.Rows.Find(vals)
thanks for helping me.
mabe i didnt clarify my self as well...
my question is not just how i find row in the dataset.
i have key which type is integer and i want to find a row in dataset table and then to delete it. when i find the row in the dataset i dont knoe how to delete it from the dataset????
pleeeeeesssssseeeee help me!!!!!!!!!!!!!!!