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
210
Webdata grid cell value
posted

I would like the grid to work in a way so that the user clicks on a row value and the row value is selected and then I need to redirect to another page based on which row the user value selects .

Suppose i have three columns

ServiceName       Availability

XYZ                    100%

When user click on 100% cell value , it should redirect to another page where i need to pass service name  , selected value(100%) , and the availability 

Regards

Tulsi

Parents
  • 11095
    Offline posted

    Hello Tulsi,

    To select in WebDataGrid Selection Behavior can be used by setting CellClickAction to cell which will trigger cell selection event.

    http://ko.infragistics.com/help/aspnet/webdatagrid-selection#_cell_selection.

    The event can be handled as described in the snipped to redirect to another page.

    function WebDataGrid_On_CellSelectionChanged(sender, evtArgs) {
        var selectedCells = evtArgs.getSelectedCells(),
        selectedCell = selectedCells.getItem(0),
        redirectUrl = "http://infragistics.com";

        alert("You have selected cell with value " + selectedCell.get_value() + ".\nRedirecting to url: " + redirectUrl);

        // redirect to the target url
        window.location = redirectUrl;
    }

    I have attached sample in order to demonstrate this.

    Let me know if I need further assitance.

    SelectionAndRedirect.zip
Reply Children