AndyGB4
Posts: 122
|
| Posted: 08/05/2011, 11:12 AM |
|
Hey guys,
a weird problem here:
I have 2 grids on a page,
the first is a list of Customers, and the second is a list of the customers Orders.
When you select a Customer, it shows his orders in the 2nd Grid. (This works fine)
But when you try to Search the Orders table, it finds ALL the records that match,
instead of just the records for that customer that match.
Any ideas why?
|
 |
 |
mamboBROWN
Posts: 1713
|
| Posted: 08/10/2011, 9:50 PM |
|
AndyGB4,
As a part of the search are you including the selected customer?
|
 |
 |
AndyGB4
Posts: 122
|
| Posted: 08/12/2011, 9:12 AM |
|
hi mambo,
well technically no, but its still in the URL after the search,
and in the Grid's where clause, I compare the value to the one in the URL.
---
Ok well I think I understand why it wasn't working.
Basically, I forgot to mention that the 2nd grid is inside an Update Panel, so when you search, the values dont go in the normal URL, but the separate one inside the Update Panel.
So I took your advice and added a hidden field in the Search which originally gets the value from the URL, and since i gave it the same name as the parameter in the original URL, it will have the same name in the Update Panel URL as well. Which means it will continuously get the custID after every search.
In other words, it works perfectly!
Thanks mambo!
|
 |
 |
|