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
Below is the example
when i click on cell value 99.903 , it should redirect to Second Page.aspx where it should display the values from 1st page
1st page.aspx
Grid Page
Service
Application Production Metric Reporting
Availability
Week Availability
Food Percentage
99.903%
99.697%
Water Percentage
99.906%
100.000%
Juice Percentage
99.937%
99.861%
second Page.aspx
Service: Food Percentage
Metric Group: Application Production
Metric Name: Availability
Current Value: 99.903%
………………
…………………
……………………
………………………
Hope i gave all the information .please do let me know if you need more
Hello Tulsi,
You can do it server-side. You should use the CellSelectionChanged event - http://help.infragistics.com/Help/Doc/ASPNET/2016.2/CLR4.0/html/Infragistics4.Web.v16.2~Infragistics.Web.UI.GridControls.WebDataGrid~CellSelectionChanged_EV.html .
Attach to the event:
set the autopostbackflags to true:
Please let me know if you need further assistance.
Hello,
Thank You , But can we implement this without java script?
Thanks
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;}
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.