Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
950
Put the rowselector
posted

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

Parents Reply
  • 19693
    Verified Answer
    posted in reply to Desvernes

    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()) 

     

    Let us know if you still experience issues.

Children