Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
170
Problem with Items Activation
posted

I have my client side event for ItemClick and the first time I click an item I try to get the ActiveItem and there isn't any item selected at all and for the next times that I click some item the active item is the item clicked before.

Sample.- it's a ContexMenu and I have the options Add, Update and Delete, so the first time if I clicked Update the properties __activeItem and __selectedItem are Null, so I send a message saying the no item was selected, so then I click Add and in this two properties mentioned before I get the Update item instead of the Add item.

<ig:WebDataMenu ID="menuEdicion" runat="server" Visible="True" AccessKey="" IsContextMenu="true">

<ClientEvents ItemClick="FuncionesEdicion_Compras" />

<AutoPostBackFlags ItemClick="Off" />

<Items>

<ig:DataMenuItem Key="mnuAdd" Text="Editar" Enabled="true" /> 

Javascript code:

function FuncionesEdicion_Compras(menu, xarg, x2arg) {

  var actItm = menu.get_activeItem(); 

  if (actItm == null) actItm = menu.get_selectedItem(); 

  if (actItm != null) { 

     switch (actItm.get_key()) { 

        case "mnuAdd"

            ModificarPartidaDeCompras_Materiales();

           break

       default:

           alert(

 

'Item activo: ' + actItm.get_key());

      }

  }

  else {

     alert('Item no activo'); }

}

 

 

Parents
No Data
Reply
  • 49378
    posted

    Hi Alfredo,

    I tested your scenario but was unable to replicate the issue you have described. Upon an item click, any item in my context menu is activated correctly.

    It would help to know which version of the product you are using and also the browser that you are testing with. My tests were carried out using .NetAdvantage 11.1, therefore an upgrade may solve your issue.

    Please contact me if you need further assistance.

    Petar Ivanov
    Developer Support Engineer
    Infragistics, Inc.
    http://es.infragistics.com/support

Children
No Data