codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  problem in filtering datagrid  MRERP at 09:57 on Monday, April 04, 2005
 

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 ??????????????

  Re: problem in filtering datagrid  dev_noob at 16:11 on Monday, April 04, 2005
 

///// *****
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.. :(









CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: Custom Form Validation Using JavaScript
•  Re: Post&submit text to a form in java
•  JDI popframes method
•  Cookies: issue with retrieving?
•  Re: Login system
•  Re: How to avoid and detect memory leaks
•  Re: in dire need of help with my assignment....
•  Re: help me
•  Re: C++ free online Tutorial links


Recent Articles
Communicating with the Database (Using ADO)
MagicGrid
Simple Thumbnail Browsing Solution
Type Anywhere
A Better Moustrap: FmtDate to replace FormatDateTime
ASP.NET Forum Source Code
Internal Search Engine
Javascript Growing Window
Simple date validation
Search engine friendly URLs using ASP.NET (C#.NET)


Site Survey
Help us serve you better. Take a five minute survey. Click here!

© Copyright codetoad.com 2001-2005