Hi all,
I have a igGrid and i want to add a column with one ACTIONLINK or similar.
When i clicked the action link i want to go other view with other action to show row details in other view.
another option would be, on double click on the row, go directly to another view
It's this possible?
a lot of thanks for advance
Hi Ruben Ordonez,
You can use an unbound column to acheive your goal.
Inside the unbound golumn you can create anchor tag uising Template. Here is an example:
column.Unbound(
"UnBound").Template("<a href='/Home/Details/${ID}'>Details</a>").Width("100px").HeaderText("Details");
This code Navigate to Details ActionView of the Home controller, and it's passing ID property of my model to the ActionView, where you can add extra logic to get the details for that specific row of the grid and display them in a suitalble to your case way.
Thanks,
Todor Paskalev
Infragistics
Hi Todor,
thanks for help, I try to do this but i Can't, when i put column.Unbound the intilesense doesn't show this option and don't work
my version of infragistics.Web.MVC is 3.11.1.2118, probably i need a version more actual? this version don'y have this option? my licenced packaged from infragistics is: NetAdvantatge 2011.1
a lot fo thanks for advance
A lot of thanks Martin, without your help I can't resolve my issue!!!
Hi Ruben,
My bad. The "data-id" attribute is not available in 11.1 version. I forgot about that. It seems that you've found the only possible solution.
I'm glad that you were able to resolve your issue.
Good luck,Martin PavlovInfragistics, Inc.
Finally i found the solution:
with this code you can't get the value of the row that you like, lot of than martin!
$('#igGrid1 td').live("dblclick", function (e) { var $this = $(this); var row = $this.closest("tr"); //var cell2text = row.find('td:eq(1)').text(); Como coger otros valores de otra celda var rowID = row.find('td:first').text(); window.location.href = "Documento/Details/" + rowID; });
Hi , Martin
I don't see anything of TR element in my code... when I do:
var rowId = $row.attr("data-id");
my var rowId get the value = Undefined...
version of my components is : netAdvantatge 2011.1 it's that as you need?
i'm going crazy with this!!!
thanks for advance!
There is nothing peculiar in this code, so I'm not sure what the problem is. Can you inspect the grid TR element in order to see if there is a "data-id" attribute.
igGrid adds this attribute (with the value from the primary key) to the TR element when primaryKey property is defined for the grid. In the code I use this attribute in order to get the PK value of the row.
Also what version (and build) of Ignite UI controls, jQuery and jQuery UI are you using?
Thanks in advance,Martin PavlovInfragistics, Inc.