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
410
Extending jQuery controls using C#
posted

I would like to know if the jQuery library can be extended using C# code. I want to write html extension helpers for the igGrid, etc..

I want to be able to create this code using c#. How can I do that?

 @(Html.Infragistics().Grid(Model).ID("grid2").Columns(column =>
    {
        column.For(x => x.ProductID).HeaderText(this.GetGlobalResourceObject("igGridResources", "PRODUCT_ID").ToString()).Width("100");
        column.For(x => x.Name).HeaderText(this.GetGlobalResourceObject("igGridResources", "PRODUCT_NAME").ToString()).Width("250px");
        column.For(x => x.ProductNumber).HeaderText(this.GetGlobalResourceObject("igGridResources", "PRODUCT_NUMBER").ToString()).Width("150px");
        column.For(x => x.StandardCost).HeaderText(this.GetGlobalResourceObject("igGridResources", "STANDARD_COST").ToString()).Width("200px");

    }).Features(features =>
    {
        features.Paging().PageSize(12).PrevPageLabelText(this.GetGlobalResourceObject("igGridResources", "PREVIOUS").ToString()).NextPageLabelText(this.GetGlobalResourceObject("igGridResources", "NEXT").ToString());
        features.Sorting().Mode(SortingMode.Single).ColumnSettings(settings =>
        {
            settings.ColumnSetting().ColumnKey("ProductID").AllowSorting(true);
        });
        // this sample also shows custom RowTemplate functionality
    }).RowTemplate(
        "<tr><td> ${ProductID}  </td><td> ${Name} </td> <td> <span style=\"color:green;\"> Serial</span> : ${ProductNumber} </td> <td> ${StandardCost} </td> </tr>"
        ).DataSourceUrl(Url.Action("ChainingGetData")).DataBind().Render()
    )

Parents
No Data
Reply Children
No Data