I Work with HTLM.Infragistixs.grid ( but I Donot find the good forum ).
With Entities framework and MVC 3
How I Configure the rowselector and capture the line in my code ?
@( Html.Infragistics().Grid<MvcChantierCe40.Chantier>() .AutoGenerateColumns(false)
.Columns(column =>{
column.For(x => x.Ch_Code).DataType("int").HeaderText("Customer ID");
column.For(x => x.Ch_Nom).DataType("string").HeaderText("Company Name");
column.For(x => x.Ch_Desi).DataType("string").HeaderText("Contact Title");
column.For(x => x.Ch_Ref).DataType("string").HeaderText("Contact Name");
column.For(x => x.Ch_Ville).DataType("string").HeaderText("Country");
})
.Features(features =>{
features.Paging().PageSize(20).PrevPageLabelText("Previous").NextPageLabelText("NEXT");
features.Sorting().Mode(SortingMode.Single).ColumnSettings(settings =>{settings.ColumnSetting().ColumnKey("Ch_Code").AllowSorting(true);
});
features.Selection().MouseDragSelect(true).MultipleSelection(true).Mode(SelectionMode.Row);
.DataSourceUrl(Url.Action("ListChantiers"))
.Width("100%")
.Height("350px")
.DataBind()
.Render()
)
Thank You CaisseOdev
Hello caiseodev,
Thank you for contacting Infragistics!
RowSelectors is one of the igGrid features. In order to include RowSelectors you may use the following:
features.RowSelectors()
For more information on RowSelectors, you may refer to the following documentation and sample:
http://help.infragistics.com/jQuery/2012.1/ui.iggridrowselectors
http://ko.infragistics.com/products/jquery/sample/grid/row-selectors-basic
I hope this helps.
If you have any questions, please let us know as well.
My Problem is not with igGrid but with Htlm.Infragistics.Grid . I I do not finf documentation for Htlm.Infragistics.Grid
Thank You Caisseodev
Thank you for the update.
I understand. I apologize for the reference to igGrid. I see that you are using MVC. Our jQuery grid may be used using Html and MVC platform. With MVC, you may use Html.Infragistics.Grid. In order to use MVC, a reference to Infragistics.Web.MVC is needed.
I see that you are using Entity framework. I have attached a sample as well.
For more information on our samples, please refer to the following:
http://ko.infragistics.com/products/jquery/samples
For MVC samples, I suggest looking into the *.cshtml codes.
If you have any questions, please let me know as well
Thank you for your sample. It will be useful.
But my problem is feature.RowSelectors.How do to create a event and his handler for navigate to other view ?
I am working with the sample : http://help.infragistics.com/Help/NetAdvantage/jQuery/2012.1/CLR4.0/html/igGrid_RowSelectors_Events.html
See :Attaching Handlers to Events in jQuery and MVC. But it does not work.
Thank you Caisseodev
Hello Caisseodev,
Please take a look at the Help API documentation regarding handling of events
http://help.infragistics.com/jQuery/2012.1/ui.iggridrowselectors#events
You can use the code snippet below :
<script type="text/javascript"> $(document).delegate("#grid2", "iggridrowselectorsrowselectorclicked", function (evt, ui) { // reference to the row the clicked row selector resides in var row = ui.row; var employeeID = $(row[0].cells[0]).text(); window.location.href = "@Url.Action("Index", "Home")" + "?employeeID=" + employeeID; }); </script> @(Html.Infragistics().Grid<igGridDataTable.Models.Employee>().ID("grid2").PrimaryKey("EmployeeID") .AutoGenerateColumns(true) .Features(features => { features.Paging().PageSize(20).Type(OpType.Local).PrevPageLabelText("Previous").NextPageLabelText("Next"); features.Sorting().Type(OpType.Local).Mode(SortingMode.Single); features.Resizing().AllowDoubleClickToResize(false).DeferredResizing(false); features.Selection().Mode(SelectionMode.Row).MultipleSelection(true); features.RowSelectors(); features.GroupBy().Type(OpType.Local); }) .DataSourceUrl(Url.Action("DataTableDS")) .DataBind() .Render())
$(document).delegate("#grid2", "iggridrowselectorsrowselectorclicked", function (evt, ui) {
// reference to the row the clicked row selector resides in
var row = ui.row;
var employeeID = $(row[0].cells[0]).text();
window.location.href = "@Url.Action("Index", "Home")" + "?employeeID=" + employeeID;
</script>
@(Html.Infragistics().Grid<igGridDataTable.Models.Employee>().ID("grid2").PrimaryKey("EmployeeID")
.AutoGenerateColumns(true)
.Features(features =>
{
features.Paging().PageSize(20).Type(OpType.Local).PrevPageLabelText("Previous").NextPageLabelText("Next");
features.Sorting().Type(OpType.Local).Mode(SortingMode.Single);
features.Resizing().AllowDoubleClickToResize(false).DeferredResizing(false);
features.Selection().Mode(SelectionMode.Row).MultipleSelection(true);
features.RowSelectors();
features.GroupBy().Type(OpType.Local);
.DataSourceUrl(Url.Action("DataTableDS"))
.Render())
Let us know if you still experience issues.
Very good sample. I Think that is my issue.
Give me some days for testing and I will come to you
If you have any questions, please do not hesitate to inform us as well.
We are glad you are able to move forward with your application.
If you have any questions, please do not hesitate to contact us. We are here to assist you.
Ok for me that is good. I Understand how use the rowselector.
Thank you to all.
Caisseodev