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
315
Webdatamenu not showing on correct position
posted

I'm having an ultrawebgrid and an ultrawebmenu on my form. The webmenu is configured as an popup menu and does have one option 'Delete'

I did set up everything according to the samples, but when I click right mouse button on my grid, the popup does show, but at the wrong place.  It's about 200px down and 100px to the right of the webgrid.  I've checked everything and probably oversee something, but what?  How do I get the popup menu to appear on the clicked row?

See also the screenshot on how the popup menu now appears. (I clicked with my mouse on the first row of the grid)

Here's my code: (the option in the menu is added by code)

            <igtbl:UltraWebGrid ID="grid_FavoriteWineRegions" runat="server" Height="200px"
                Width="325px">
                <Bands>
                    <igtbl:UltraGridBand>
                        <AddNewRow View="NotSet" Visible="NotSet">
                        </AddNewRow>
                    </igtbl:UltraGridBand>
                </Bands>
                <DisplayLayout BorderCollapseDefault="Separate"
                    Name="ctl00xgridxFavoriteWineRegions" RowHeightDefault="20px" Version="4.00">
                    <ClientSideEvents CellChangeHandler="Grid_Regions_CellClickHandler"
                        MouseUpHandler="Grid_Regions_MouseUpHandler" />
                    <ActivationObject BorderColor="" BorderWidth="">
                    </ActivationObject>
                </DisplayLayout>
            </igtbl:UltraWebGrid>
           
            <ignav:UltraWebMenu ID="Menu_Delete" runat="server" TargetFrame=""
                TargetUrl="" WebMenuTarget="PopupMenu">
            </ignav:UltraWebMenu>

 

and the BLOCKED SCRIPT

function Grid_Regions_CellClickHandler(gridName, cellId, button){
    if(button == 2)
    {
        var cell = igtbl_getCellById(cellId);
        cell.activate();
        cell.select();
        var grid = igtbl_getGridById(gridName);
        igmenu_showMenu("ctl00ContentPlaceHolder1ProfilePreferencesMenuDelete", grid.event);       
    }
}

function Grid_Regions_MouseUpHandler(gridName, id, button){
    if(button == 2)
    {
        var grid = igtbl_getGridById(gridName);
        var r = igtbl_getRowById(id);
        if(r)
            {
                igmenu_showMenu("ctl00ContentPlaceHolder1ProfilePreferencesMenuDelete", grid.event);
                ig_cancelEvent(grid.event);
            }
    }
}