Skip to content

Replies

0
Sam Elliott
Sam Elliott answered on Jul 18, 2016 3:32 PM

Hello,

In this case, you won't be able to use the input with type submit as it will be sent to a single route which will only handle the form data.

I did some research and found that there is no supported way to attach data to the igGrid payload when using updateUrl. This would be considered a product idea and can be submitted here: http://ideas.infragistics.com. Therefore, you would need to add an event handler to the button in your page and get the form and grid data and send it within the body of a POST to your route.

Within your client side code, you can try serializing the form (https://api.jquery.com/serialize/) which will return a string corresponding to the form and use the pendingTransactions method to create a custom payload that can be handled by your route.

0
Sam Elliott
Sam Elliott answered on Jul 15, 2016 3:34 PM

Hello,

Thanks for providing the information.

I noticed that in your client-side code, you are handling the button click event which is then sending to the controller the transactions being sent but there is nothing here to handle submitting the recently created form. I recommend giving this documentation a read on working with forms in ASP.NET MVC: http://www.asp.net/web-pages/overview/ui-layouts-and-themes/4-working-with-forms. This documentation does not cover the use of forms with Razer but it's a good starting ground to familiarize yourself with forms without the abstraction from Razer. After giving that a look, I suggest giving this a look: https://msdn.microsoft.com/en-us/library/system.web.mvc.html.formextensions.beginform(v=vs.118).aspx.

Also note that to submit a form not that the <input> element will have a type of submit which is missing in your sample. I also do not recommend utilizing igButton and instead utilize just vanilla HTML5 elements for form handling.

Also note that this is not something we traditionally support as this is not entirely related to our controls.

0
Sam Elliott
Sam Elliott answered on Jul 14, 2016 11:26 PM

Hello,

In the screenshot provided, it looks like the input element is after the curly brace, I suggest putting it within the curly brace of the Html.BeginForm.

Please provide more information on how you are handling saving the data within the controller.

0
Sam Elliott
Sam Elliott answered on Jun 29, 2016 10:00 PM

Hello,

Including these files within your project should be enough to instantiate the igDialog control within your project. Please provide more details on where in the project the cdn links are being referenced. They are most likely contained within the head of the html page containing this project and if this is the case, this could be a scoping issue as the partial view does not have access to the jQuery object ($).

0
Sam Elliott
Sam Elliott answered on Jun 27, 2016 8:27 PM

Hello,

The error states that igDialog is not defined which will depend on how the Ignite UI files are being loaded to your project.

Please provide more information on how the Ignite UI files are being loaded to your project. Are the files included locally or is this by referencing the CDN?

0
Sam Elliott
Sam Elliott answered on Feb 19, 2016 9:28 PM

Hello Rob,

I made a slight modification to the code you provided to make it work. I am utilizing the jQuery selector to obtain the dom element and passing that value to the collapseRow method when iterating over the rows to achieve the desired behavior.

This is the resulting code:

var rows = $("#treegrid").igTreeGrid("allRows");

for(var i = 0; i < rows.length; i++){
                   
     var row = $(rows[i]);
     $("#treegrid").igTreeGrid("collapseRow", row);
                   
}

I am also attaching a sample that I used to test this behavior and achieves the desired behavior.

I will be looking into this a bit deeper as the initial code that you provided I would expect to work.

Sincerely,
Sam Elliott
Associate Software Developer
Infragistics, Inc.
http://www.infragistics.com