2017-05-24 12 views
0

私の問題は、ImageGallery Itemからテキストを取り出し、aspxgridviewの行として追加する必要があることです。しかし、私はできないのでできませんそのテキストをjavascriptまたはC#で読み込む。私が知っていることは、クリックされた画像の番号を表すe.indexです。 ASP.NET(webforms)Devexpress AspxImageGallery(e.index)

<Items> 
     <dx:ImageGalleryItem Text="blablabla" ImageUrl="~/Models/24.jpg"> 
     </dx:ImageGalleryItem> 


    </Items> 
    <SettingsTableLayout RowsPerPage="1" /> 
    <ClientSideEvents FullscreenViewerShowing="OnFullscreenViewerShowing" /> 
</dx:ASPxImageGallery> 

 var imageIndex = 0; 
    function OnFullscreenViewerShowing(s, e) { 
     imageIndex = e.index; 
     if (e.index == 0) { 

     alert(e.index.text); 

     } else if (e.index == 1) { 

     } 
     popup.Show(); 
    } 

答えて

0

はあなたがASPxImageGalleryコントロールにClientInstanceNameを設定していることを確認してください: はここに私のコードの一部です。 ClientInstanceNameを設定すると、コントロールのクライアント側のイベントが有効になります。

関連する問題