Hi.
i'm using igGrid in a solution with multi projects, in my one of my views i have this code:
@inherits System.Web.Mvc.
WebViewPage<IQueryable<CxcModels.Models.tblPaises>>
@using Infragistics.Web.Mvc;
<h2>Catalogo de Pais</h2> < @(Html.Infragistics().Grid(Model).ID( column.For(x => x.idPais).HeaderText( }).Features(features =>{ features.Selection().Mode( features.Filtering().ColumnSettings(settings =>{ settings.ColumnSetting().ColumnKey("idPais").AllowFiltering(false).FilterCondition("igual a"); settings.ColumnSetting().ColumnKey(
<
@(Html.Infragistics().Grid(Model).ID(
column.For(x => x.idPais).HeaderText(
}).Features(features =>{
features.Selection().Mode(
features.Filtering().ColumnSettings(settings =>{
settings.ColumnSetting().ColumnKey("idPais").AllowFiltering(false).FilterCondition("igual a"); settings.ColumnSetting().ColumnKey(
settings.ColumnSetting().ColumnKey(
});
}).DataSourceUrl(Url.Action("Index")).DataBind().Render()
but i have a error in this code, because, JScrip thorw this error: "Can't use the propierty or method WIDGET", in a file js ig.ui.min.
somebody help me, thanks!!
column.For(x => x.Nombre).HeaderText(
WebViewPage<IQueryable<CxcModels.Models.tblPaises>> @
@
using Infragistics.Web.Mvc;
h2>Catalogo de Pais</h2>
p>@Html.ActionLink("Crear Pais", "Create")</p>
"gridPaises").PrimaryKey("idPais").Height("400px").Columns(column =>{ column.For(x => x.idPais).HeaderText(
"idPais").Width("150px"); column.For(x => x.Nombre).HeaderText(
"Nombre").Width("250px"); }).Features(features =>{ features.Selection().Mode(
SelectionMode.Cell).MultipleSelection(true); features.Filtering().ColumnSettings(settings =>{ settings.ColumnSetting().ColumnKey(
"idPais").AllowFiltering(false).FilterCondition("igual a"); settings.ColumnSetting().ColumnKey(
"Nombre").AllowFiltering(true).FilterCondition("termine con"); }); }).DataSourceUrl(Url.Action(
}).DataSourceUrl(Url.Action(
"Index"
)).DataBind().Render()
Hi,
you also need to include javascript references to jQuery UI, and jQuery. Please refer to the following help topic:
http://help.infragistics.com/Help/Doc/jQuery/2011.2/CLR4.0/html/Deployment_Guide_JavaScript_Resouces.html
Thanks,
Angel
Hi Angel.
thanks a lot, it works.
now i'm try these option, in the same scenary, usin all features(except groupby, hiding and rezising), but don't work, now the error is "the object Records its null or not recognize".
do you have an idea what js need for this example, i followed the same steps in the example page of infragistics, and the name of class is the same.
NOTE: in my view i'm using this code:
@(Html.Infragistics().Grid("grid", Model.AllFeaturesModel))
and in my controller i create the follow methods:
public ActionMethod Allfeatures(){
GridAllFeaturesModel model = new GridAllFeaturesModel();
model.AllFeaturesModel.DataSourceUrl = Url.Action("GetDataAllFeatures");
this.InitializeAllFeaturesGridOptions(model.AllFeaturesModel);
retur View("AllFeatures", model);
}
public JSonResult GetDataAllFeatures(){
GridAllFeaturesModel model = new GridAllFeaturesModel(); this.InitializeAllFeaturesGridOptions(model.AllFeaturesModel); model.AllFeaturesModel.DataSource = _repository.GetAllPaises(); return model.AllFeaturesModel.GetData();
model.AllFeaturesModel.DataSource = _repository.GetAllPaises();
return model.AllFeaturesModel.GetData();
private void InitializeAllFeaturesGridOptions(GridModel model){
model.Columns.Add(new GridColumn(HttpContext.GetGlobalResourceObject("igGridResources", "idPais").ToString(), "idPais", "string", "100px"));
model.Columns.Add(new GridColumn(HttpContext.GetGlobalResourceObject("igGridResources", "Nombre").ToString(), "Nombre", "string", "250px"));
and the features...