|
|
| View previous topic :: View next topic |
| Message |
|
Author
|
PeterA
Newbie
|
Joined: 22 Jul 2006
Posts: 2
|
|
Posted: Sat Jul 22, 2006 4:00 am
Post subject: Binding two textboxes to a datagrid |
|
|
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 |
|
 |
|
Author
|
ChrisCottrell
Newbie
|
Joined: 18 Jul 2006
Posts: 5
|
|
Posted: Sat Jul 22, 2006 4:00 am
Post subject: |
|
|
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 |
|
 |
|
Author
|
PeterA
Newbie
|
Joined: 22 Jul 2006
Posts: 2
|
|
Posted: Sat Jul 22, 2006 4:00 am
Post subject: |
|
|
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 |
|
 |
|
Author
|
ChrisCottrell
Newbie
|
Joined: 18 Jul 2006
Posts: 5
|
|
Posted: Sun Jul 23, 2006 4:00 am
Post subject: |
|
|
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 |
|
 |
|
|
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
|
|