Reputation: 1
I am using an AJAX ComboBox in my ASP.Net web application and I have an OnItemInserted
event that requires a postback to hit the server side logic however this requires that I have AutoPostBack = True
. This causes an unwanted effect of OnSelectedIndexChanged
event triggering a Postback causing the control to lose focus.
More background: This combobox resides inside of a fairly complex gridview which contains other comboboxes, dropdownlists, and textboxes. My objective is to allow the user to smoothly tab through the row while entering data without having to use the mouse to promote rapid data entry.
I believe that I need to utilize javascript to suppress this postback but I am open to suggestions.
Upvotes: 0
Views: 899
Reputation: 968
You can suppress the postback by simply returning false on the relevant client event:
http://edgewaters.blogspot.com/2008/01/button-that-doesnt-post-back.html
Upvotes: 2