I have downloaded your JQuery Controls CTP for inspection as I am in the early planning stages of a MVC 3 web site project using the Razor view engine. Your samples downloaded with the CTP are all using the ASPX view engine even for the MVC 3 samples. Does Infragistics have samples of using the JQuery controls within the MVC 3 Razor view engine context?
I should also add that you'll probably find more help available in the Infragistics jQuery forums located here:
http://community.infragistics.com/jquery/forums/default.aspx
With NA 2011.2 you can hid columns with features.Hiding
Here is an example of code:@( Html.Infragistics().Grid<Models.item>().ID("igGrid1").FixedHeaders(true).Columns(column =>{column.For(x => x.fld1).HeaderText("fld1").Width("90");column.For(x => x.fld2).HeaderText("fld2").Format("MM/dd/yyyy").Width("100");column.For(x => x.fld3).HeaderText("fld3").Format("currency").Width("155");column.For(x => x.fld4).HeaderText("fld4").Width("155");column.For(x => x.fld5).HeaderText("fld5").Format("MM/dd/yyyy").Width("100");column.For(x => x.fld6).HeaderText("fld6").Format("currency").Width("155");column.For(x => x.fld7).HeaderText("fld7").Width("100");column.For(x => x.fld8).HeaderText("fld8").Width("60");column.For(x => x.fld9).HeaderText("fld9").Width("10");column.For(x => x.fld10).HeaderText("fld10").Width("10");column.For(x => x.fld11).HeaderText("fld11").Width("400");}).Features(features =>{features.Sorting().Mode(SortingMode.Single).ApplyColumnCss(false);features.Selection().MouseDragSelect(false).MultipleSelection(false).Mode(SelectionMode.Row);features.Selection().Activation(true);features.Sorting();features.Paging().PageSize(25);features.Filtering().Mode(FilterMode.Advanced);features.Hiding().ColumnSettings(settings =>{settings.ColumnSetting().ColumnKey("fld1").Hidden(false).AllowHiding(false);settings.ColumnSetting().ColumnKey("fld2").Hidden(false).AllowHiding(false);settings.ColumnSetting().ColumnKey("fld3").Hidden(false).AllowHiding(false);settings.ColumnSetting().ColumnKey("fld4").Hidden(false).AllowHiding(false);settings.ColumnSetting().ColumnKey("fld5").Hidden(false).AllowHiding(false);settings.ColumnSetting().ColumnKey("fld6").Hidden(false).AllowHiding(false);settings.ColumnSetting().ColumnKey("fld7").Hidden(false).AllowHiding(false);settings.ColumnSetting().ColumnKey("fld8").Hidden(false).AllowHiding(false);settings.ColumnSetting().ColumnKey("fld9").Hidden(true).AllowHiding(true);settings.ColumnSetting().ColumnKey("fld10").Hidden(true).AllowHiding(true);settings.ColumnSetting().ColumnKey("fld11").Hidden(false).AllowHiding(false);});}).ClientDataSourceType(ClientDataSourceType.JSON).DataSourceUrl(Url.Action("someFunction", new RouteValueDictionary(new { id = Model.id}))).Width("100%").Height("400").DataBind().Render())
Thanks its fixed now after adding json2.js.
But now i am facing one more problem.
i have put one hidden column by making it's width 0, but still i can see that column having width around 1-2 px.
code is given below
@( Html.Infragistics().Grid<GridRow>()
.ID("igGrid1")
.Columns(column =>
{
column.For(x => x.DocumentType).DataType("string").HeaderText("Document Type");
column.For(x => x.AIV).DataType("string").HeaderText(" ").Width("0px");
})
.Features(features =>
features.Paging().PageSize(20).PrevPageLabelText("Previous").NextPageLabelText("NEXT");
features.Sorting().Mode(SortingMode.Single).ColumnSettings(settings =>
settings.ColumnSetting().ColumnKey("DocumentGuid").AllowSorting(true);
});
features.Selection().MouseDragSelect(true).MultipleSelection(true).Mode(SelectionMode.Row);
.ClientDataSourceType(ClientDataSourceType.JSON)
.DataSourceUrl(Url.Action(ViewBag.HI))
.Width("100%")
.Height("450")
.LocalSchemaTransform(true)
.DataBind()
.Render()
Hi Snohig,
Under IE 7 you need to manually add json2.js file in your scripts folder and to refer it on the page in order to prevent this errors. Some browsers like IE& or below are not natively implementing this:
Follow this link for more details:
http://stackoverflow.com/questions/4956076/problem-with-json-in-internet-explorer-7
I hope this helps.
For any further questions do not hesitate to contact me.
Sincerely,
Georgi Sashev
Developer Support Engineer
Infragistics, Inc.
http://es.infragistics.com/support
i tried above code in IE 7, but its giving JQuery error whenever i perform any action like paging or change page no. from top dropdown.