|
hi
i have problem in filtering datagrid
i use this code in Page_Load
if Not IsPostBack Then
Me.SqlDataAdapter1.Fill(Me.UsersDS1)
Me.DataGrid1.DataBind()
and this in DropDownList1_SelectedIndexChanged
Dim dvusers As New DataView(Me.UsersDS1.Tables("Users"))
dvusers.RowFilter= "User_Namelike '*"&Me.DropDownList1.SelectedItem.Value & "*' "
DataGrid1.DataSource = dvusers
DataGrid1.DataBind()
the datagrid filtering dont throw any error but the datagrid is empty without any records
i think there is something missing in the code ??????????????
|
|
|
///// *****
dvusers.RowFilter= "User_Namelike '*"&Me.DropDownList1.SelectedItem.Value & "*' "
****** /////
try to put a space between user_name and like, it could help :)
dvusers.RowFilter= "User_Name like '%"&Me.DropDownList1.SelectedItem.Value & "%' "
i am still newbie....maybe it wont work.. :(
|
|
|
|
|
|
|
|