I need to raise an AsyncPostBack
when the datasource of a DrowpDownList Column of an UltraWebGrid change.
The ultrawebgrid is inside a WebAsyncRefreshPanel.
There are a way to do this?
Hi,
When you do your changes, then you may try to find a way to pass a javascript statement from server to client. I do not know options available for WebParts (maybe somekind of script registration or adding a literal control filled with <script> block). You may start with "alert(1)". If you will get that alert on client, then you may replace "alert(1)" by "refresh" statement. If you will not find any options to pass javascript to client, or invoke any other event on client, then async postback of WARP is not possible.
I have two Web Par, when I change a Web Part the datasource of the other change and I need to raise a asyncpostback in the second one.
As I am using Web Parts.
There are no way to connect the controls to add it in the list of RefreshTarget or anything else.
I probably misunderstood your question. If data source is changed, then I guess that action happens on server within a postback. So, why do you need extra postback? If that postback is a private async postback of grid and WARP is not aware about that action, then you may disable async features of grid, or process (if available) async response of grid on client and from handler of that event, you may call a function which I suggested in my previous response.
To raise async postback you may use member function refresh(), or invoke "submit" action of any child element in WARP, or call explicitly __doPostBack with id of any html element in WARP. Below example for local element and refresh().
<script type="text/javascript">function submitWARP(){ var submitByRefresh = true; if(submitByRefresh) { var warp = ig$('WebAsyncRefreshPanel1'); if(warp) warp.refresh(); } else __doPostBack('elemInWARP', '');}</script>
<igmisc:WebAsyncRefreshPanel ID="WebAsyncRefreshPanel1" runat="server"> <span id="elemInWARP"></span> <input value="submit" type="button" onclick="submitWARP()" /></igmisc:WebAsyncRefreshPanel>