arcross
asked on
Dropdown in gridview failing when objectdatasource.FilterExpression is applied.
Hello,
I ve got a datagrid with 2 dropdownlists in the edit template.
What Im trying to do is to filter the second list based on the selection on the first one.
Both dropdowns are bind to an objectdatasrouce. So when I select an item from the first one, in the 'SelectedIndexChanged' event i doing something like
if list1.selecteditem.text = "WHATEVER" then
objectdatasource_secondlis t.filterex pression = "field=xxx"
else
.....
But i get this error everytime:
"Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control."
The second dropdown is bound to field like bind("field").
any ideas??
I ve got a datagrid with 2 dropdownlists in the edit template.
What Im trying to do is to filter the second list based on the selection on the first one.
Both dropdowns are bind to an objectdatasrouce. So when I select an item from the first one, in the 'SelectedIndexChanged' event i doing something like
if list1.selecteditem.text = "WHATEVER" then
objectdatasource_secondlis
else
.....
But i get this error everytime:
"Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control."
The second dropdown is bound to field like bind("field").
any ideas??
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.