FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister  MasterVB.NET
Visual Basic 2005 .NET Forum
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Binding two textboxes to a datagrid
 
Post new topic   Reply to topic    MasterVB.NET Forum Index -> Web Forms
View previous topic :: View next topic  
Message
Author
PeterA
Newbie
Joined: 22 Jul 2006
Posts: 2

PostPosted: Sat Jul 22, 2006 4:00 am    
Post subject: Binding two textboxes to a datagrid
Reply with quote

Is it possible to bind more than one textbox control to a Datagrid to enable more than one search on a form? The design view lets me bind the Datagrid to a textbox with ease, but I'm unsure how to add a second query. Any takers???



 

Back to top
View user's profile Send private message
Author
ChrisCottrell
Newbie
Joined: 18 Jul 2006
Posts: 5

PostPosted: Sat Jul 22, 2006 4:00 am    
Post subject:
Reply with quote
Do you mean bind DataSet to TextBoxes? If yes, you can. Not sure what you mean by second query. Do you mean bind two datasets to one textbox so you get a combination or something?

On 7/21/06, PeterA <attfieldp> wrote:
Quote:


Is it possible to bind more than one textbox control to a Datagrid to
enable more than one search on a form? The design view lets me bind the
Datagrid to a textbox with ease, but I'm unsure how to add a second
query. Any takers???


>





 

Back to top
View user's profile Send private message
Author
PeterA
Newbie
Joined: 22 Jul 2006
Posts: 2

PostPosted: Sat Jul 22, 2006 4:00 am    
Post subject:
Reply with quote

I effectively want my users to be able to search the records of a large table in my database. It would be nice if they could search by Name,
ID or Product, for example, all on one page.

Once the user finds the record, then they can update the record using the datagrid control.

Make sense?



 

Back to top
View user's profile Send private message
Author
ChrisCottrell
Newbie
Joined: 18 Jul 2006
Posts: 5

PostPosted: Sun Jul 23, 2006 4:00 am    
Post subject:
Reply with quote
Well, that's fairly easy. Write a stored proc with the search parameters defaulted to NULL or something. Then in the sp, you can determine the type of search being made. Depending on how many different search options exist you may or may not want to build your sql dynamically in the sp and do an execute_sql statement.

The updating is then just normal updates from the grid.


On 7/21/06, PeterA <attfieldp> wrote:
Quote:


I effectively want my users to be able to search the records of a large
table in my database. It would be nice if they could search by Name,
ID or Product, for example, all on one page.

Once the user finds the record, then they can update the record using
the datagrid control.

Make sense?


>





 

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    MasterVB.NET Forum Index -> Web Forms All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Archieve

Powered by phpBB © 2001, 2002 phpBB Group, used in Visual Basic 2005 .NET Forum

| Visual Basic .NET Forum | Online Recipe Archiver | Shareware Freeware PAD | Lowongan Kerja | Kamus Online | Health Supply | Digital Camera Review |
Orang Paling Keren

RSS