I have a WebDropDown and a WebDataGrid on a page. When I click the item from the dropdown that is already selected, a postback occurs but no server-side SelectionChanged or ValueChanged events are triggered. Therefore the data in my data grid is being cleared as there are no events from which I can re-bind the grid.
How can I either:-
a) prevent the dropdown from causing a postback when the item clicked is the selected item.
b) cause the dropdown to raise a server-side event from which I can re-bind the datagrid.
Any Ideas?
<ig:WebDropDown ID="DropDown1" runat="server" Width="140px" DisplayMode="DropDownList"> <AutoPostBackFlags SelectionChanged="On" /> <ClientEvents /></ig:WebDropDown>
Hi,
Can you use Page_Load, with a check for Page.IsPostBack?
Thanks,
Angel
Angel Todorov"] Hi, Can you use Page_Load, with a check for Page.IsPostBack? Thanks, Angel
Not really.
The example I gave was a simplified case to illustrate the problem. I actually have multiple pages affected by this bug. These pages have multiple dropdown lists and the SelectionChanged event of one list might alter the content and selection of another list. The data grid data is dependent on selected value of these lists - therefore I can't really bind the grid in Page_Load.
I could possibly use the LoadComplete event (after control events have fired) but this seems a clumsy work-around for a problem that should not happen.
It cannot be correct for a list to cause a postback but not raise an event.