I am totally new to IgniteUI and would appreciate assistance.
Is there any sample code available that invokes a new cshtml page from the selected row of the igGrid?
Hello Mark,
Thank you for posting in our community!
Before preparing a sample could you clarify if your requirement is adding a link to another view in a grid row? If not, would you provide more details concerning your scenario?
Looking forwards to hearing from you.
Dimka
Your understanding is correct, but for the sake of clarity:-
The essence of our query is to establish the syntax that allows us to display a new URL having selected a customer row within the grid.
Thanks
I am glad to hear that you have been able to resolve this issue. If any additional questions arise don’t hesitate to contact me again.
I see that the Customer ID is passed into the controller as a QueryString.
As I do not want this to be visible in the URL, is there a way of passing the ID from the CSHTML to the controller in a more secure way?
In order to hide the customer details from the URL is needed to use the URL generated by default. I have added bellow the modified script function for your reference:
<script type="text/javascript">
// the following function is raised when the selection is changed
// it makes ajax call to the server ad passes the information from the cell
$(document).delegate("#grid1", "iggridselectioncellselectionchanged", function (evt, ui) {
// only the email cell in this scenario invokes the 'Details' page
// alternatively another cell might be used or the entire row could be made selectable
debugger;
if (ui.cell.columnKey === "Email") {
var tmpItem = ui.cell.element.text();
$.ajax({
type: "POST",
url: "Home/ComposeDetails",
data: { em: tmpItem }, // the 'em' variable name should correspond to the name of the Details method input variable name
success: function () {
window.location.href = "Home/DisplayDetails"
}
})
else
return;
});
</script>
Hope this helps. If any additional questions arise feel free to contact me again.
Do you have any additional questions regarding this scenario? If so, feel free to contact me again.
Hi Dimka
We have had success with our original problem, but have a similar problem as detailed below.
What we are trying to achieve is:-
Is there any example that we may work through to guide us in this requirement?
Your assistance is appreciated.
Hello,
I am following up to check if you have any questions or concerns regarding this case. If so, feel free to contact me again.
Sincerely,
Dimka Vardina
Developer Support Engineer I
Infragistics, Inc.
www.infragistics.com/support
Data is bound to the combo by using the data source option. In order to set a default value it is needed the selected index option to be added (see the code snippet below):
@(Html.Infragistics().Combo().ID("combo1")
.DataSource("/Home/GetData").SelectedIndexes(new int[]{0})
.ValueKey("Name")
.Render()
)
In this sample the default selected item is the first one from the list of items passed by the controller and its index is zero.
To your second question a possible approach is using the .NullText option for the text editor and setting its value to correspond to the default selected item value.
In order to apply changes to the text editor when the combo selection is changed it is needed the “igcomboselectionchanging” event to be handled. Please note that the text box is not updated dynamically as soon as the combo selection is changed since it is needed the whole page to be reloaded. If appropriate the scenario might be tested with partial views in order to reload page segments only.
Attached is a sample for your reference. Feel free to use it and modify it.
Since these questions are not regarding the initial issue discussed in the current thread I have created an additional internal ticket where I will keep on updating you with further information.
If any additional questions concerning the igGrid scenario arise don’t hesitate to update this thread.
Morning Dimka
Please revert back to me if you have had a chance to look at my request.