v
Not logged inv
SearchAsk a QuestionReport an IssueMake a SuggestionMy Questions and Issues
Issue Details
Find By ID

Does CallbackPanel have CustomDataCallback?

Issue Details

Log in to Track Changes or Edit
Q203015
Question
Jeffrey Tschiltsch
Yes
Processed
Answered
.NET (ASP.NET)
ASPxGridView and Editors Suite
9.1.3
Windows XP
Microsoft Visual Studio 2008
4/22/2009 10:42:43 AM
-> Created by Jeffrey Tschiltsch 4/20/2009 6:35:44 PM

There is a "ASPxCombox" (named: websites) and below this comboBox there is a "ASPxButton" (named "Submit Action" button)

Lets say there are two values "A" and "B" in the "websites combo box).

If the user selects "A" and clicks the "Submit Action" button -- the user should be taken to http://www.AAA.com?key1=value1 and if the user selects "B" and clicks the "Submit Action" button -- the user should be taken to http://www.BBB.com?key1=value1

The url paramaters key1 and value1 should be dynamically populated from the "SERVER" side ----> For choice "A"
The url parameters key1 and value1 should be dynamically populated from ther "CLIENT" side ---> for choice "B"

<- Reviewed by DevExpress Team 4/21/2009 6:26:06 AM
<- Processed (Answered) by DevExpress Team 4/21/2009 10:48:25 AM

Attachment: dxSample_Q203015.zip (3831414 bytes)

Hi Jeffrey:

Unfortunately, the ASPxCallbackPanel has no CustomDataCallback event. You can pass values from the client side as a callback parameter of the ASPxCallbackPanel.
I've created a simple sample illustrating this approach. See the attachment. If this solution doesn't meet your requirements, please reactivate this report.

Thanks
Kate.

-> Reactivated by Jeffrey Tschiltsch 4/21/2009 9:35:22 PM

Hai Kate -- thanks for the good idea -- it worked out good....kind off...

I modified the code as follows:
****************************
string url = "javascript:function f1(){window.open('https://www.yaoo.com','_blank','width=1100,height=650',false);};f1()";
ASPxWebControl.RedirectOnCallback(url);

****************************
The entire Default.aspx page does not get painted after the yahoo window is launched...
How do we fix this ?

<- Processed (Answered) by DevExpress Team 4/22/2009 10:42:43 AM

Hi Jeffrey:

If you need to open the url in a NEW window, then my previous solution isn't optimal. In this situation I suggest you use the ASPxCallback, rather than the ASPxCallbackPanel control. ASPxCallback allows you to send a callback to the server and return the result.
Here is the simple example:

ASPX:

<dxe:aspxbutton ID="ASPxButton1" runat="server" Text="ASPxButton"
        AutoPostBack="False">
        <clientsideevents Click="function(s, e) {
     callback.PerformCallback();
}" />
    </dxe:aspxbutton>
    <dxcb:aspxcallback runat="server" ID="ASPxCallback1"
        ClientInstanceName="callback" oncallback="ASPxCallback1_Callback">
        <clientsideevents callbackcomplete="function(s, e) {
    debugger;
     window.open(e.result);
}" />
    </dxcb:aspxcallback>

CS:

 protected void ASPxCallback1_Callback(object source, DevExpress.Web.ASPxCallback.CallbackEventArgs e)
    {
        e.Result = "https://www.yahoo.com";
    }

Thanks
Kate.

Log in to Track Changes or Edit

Peer-to-Peer Discussion in DevExpress Forums

No discussion on this article has been started yet.

Please login to start discussion.

v
v
Search
Searching Tips