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
455
headerCellRendered not firing
posted

Using MVC3 as follows

@(Html.Infragistics().Grid<System.Data.

DataTable>(Model).ID("GraphGrid")

    .PrimaryKey(

"savfilename")

    .Features(features =>

    {

        features.Updating();

        features.Hiding().ColumnChooserHideOnClick(

true).ColumnSettings( settings =>

            {

                settings.ColumnSetting().ColumnKey(

"ispublished").AllowHiding(false).Hidden(true);

                settings.ColumnSetting().ColumnKey(

"savfileexists").AllowHiding(false).Hidden(true);

                settings.ColumnSetting().ColumnKey(

"haschanged").AllowHiding(false).Hidden(true);

            });

        features.Sorting().ModalDialogSortOnClick(

false).Mode(SortingMode.Multiple).Type(OpType.Local);

        features.Paging().PageSize(10).Type(

OpType.Local);

        features.Filtering();

    })

    .AutoGenerateColumns(

true)

    .DataSource(Model)

    .DataBind()

    .Render())

to build a grid I want to catch the headerCellRendered event so I can change the cell captions. I have several other events working successfully in the same code block but this fails. I have tried it both in and out of the $.ig.loader. The code is as follows

 

$.ig.loader(

   

function () {

        $(document).delegate(

"#GraphGrid", "headerCellRendered", function (event, ui) {

            alert(

"headercellrendered");

           

//            var headerText, grid = ui.owner,

           

//                 key = ui.columnKey,

           

//                 th = ui.th;

           

//            headerText = "test";

           

//            $(th[0]).text(headerText);

        });

        $(

"#GraphGrid").live("iggridupdatingdatadirty", function (event, ui) {

            alert(

"iggridupdatingdatadirty");

        });