locked
Datalist with ASPxBinaryImage and showing a AspxPopupMenu on ASPxBinaryImage ClientClick Problem - or is there another solution for this RRS feed

  • Question

  • User-557567467 posted

    Hello folks out there.
    Again - I really need your help cuz i am facing a problem i do not know how to solve.

    Okay i have a DataList containing a ASPxBinaryImage.

    DATALIST WITH BINARYIMAGE:
    -----------------------------------------------------------

     

    <asp:DataList CellPadding="0" CellSpacing="0" ID="dataListImages" runat="server"
    
                        HorizontalAlign="Left" RepeatDirection="Horizontal" ShowFooter="False" ShowHeader="False"
    
                        meta:resourcekey="dataListImagesResource1">
    
                        <EditItemStyle VerticalAlign="Bottom" HorizontalAlign="Left" />
    
                        <ItemTemplate>
    
                            <dx:ASPxBinaryImage ID="binimgVeneer" runat="server" meta:resourcekey="binimgVeneerResource1"
    
                                ToolTip='<%# Eval("ToolTip") %>' Value='<%# Eval("ImageMS") %>'>
    
                                <ClientSideEvents Click="show" />
    
                            </dx:ASPxBinaryImage>
    
                        </ItemTemplate>
    
                        <AlternatingItemStyle HorizontalAlign="Left" />
    
                        <ItemStyle VerticalAlign="Bottom" BorderStyle="None" HorizontalAlign="Left" />
    
                        <SeparatorStyle VerticalAlign="Bottom" BorderStyle="None" HorizontalAlign="Left" />
    
                        <SelectedItemStyle HorizontalAlign="Left" />
    
                        <HeaderStyle VerticalAlign="Bottom" />
    
                    </asp:DataList>
    

    -----------------------------------------------------------

    On Page_Load im getting some Imagepaths from the Database, save them into a DataTable and converting every image into a byte[ and save that byte[ into the ImageMS colum / field. After that i am binding the datatable to the datalist so that the byte[ images are shown in the ASPxBinaryImage - Control.
    Every ASPxBinaryImage - Control has a ClientSideEvent Click, which is showing a ASPxPopUpMenu - which contains two Buttons.
    What i now want is that i want to know which Image has been clicked. Because: One of that two Buttons is called "Zoom" so i want to get the Image and Show it into a ASPxPopup Control to manipulate that Image (for example Zoom in and out).
    Problem is that i dont know how i can determine which Image has been clicked.
    Is there a way to solve this?

    Or if its possible to use another solution?
    I'm really pissed off at the moment (sorry) because i really dont know how to handel that.
    If you have other ways to solve this problem please tell me

    Thanks in advance
    - Daniel
    Thursday, February 10, 2011 2:26 AM

All replies

  • User-1203469223 posted

    why dont you use the

    ClientSideEvents Click=" function(s,e){ Show(s, e); }"  />

    Now s is your sender, so thats your image, now you can determine which image this is inside your javascript

    function Show(s, args) {


    }

    Thursday, February 10, 2011 3:51 AM
  • User-557567467 posted

    Thanks for the reply.

    I've tried it but when i use 

     alert("e:" + e);
                 alert("s:" + s);


    It only says = "e: [object Object]" "s: [object Object]"

    So how can i now go further with that... little confused

    Thursday, February 10, 2011 5:09 AM
  • User-1203469223 posted

     function Show(image, testvalue) {
            alert(testvalue);
            alert(image.GetValue());
          }
    
    ="funtion(s,e) { Show(s,e.GetValue()); }"
    
    


    http://documentation.devexpress.com/#AspNet/DevExpressWebASPxEditorsScriptsASPxClientBinaryImageMembersTopicAll

    is the list of all clientside methods and properties

    Saturday, February 12, 2011 10:25 AM
  • User-557567467 posted

    Does not work - and yes i noticed that you wrote "funtion" and not "function" ;)

    Monday, February 14, 2011 4:38 AM