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);
"savfileexists").AllowHiding(false).Hidden(true);
"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) {
"iggridupdatingdatadirty");
sorry - just me being very stupid - should be
iggridheadercellrendered