hello,
i'm trying to develop a web application, currently with MVC3 and razor syntax.
I will try to transform a windows forms application with full infragistics grid functionality (column chooser / column size moving / column shifting / filtering / adding / deleting / updating).
I tried JQuery, webdatagrid, webgrid etc ... in MVC. However, I found no situable documentation, where I can find a solution of how to include such grid functions that I have in an ultrawingrid. in MVC I have no code behind ... only controller classes ...
do you have an idea and maybe a runnable sample where I can see how this functions are implemented in a web application ?
thanks in advance.
Hello,
I am just following up to see if you need any further assistance with this matter.
Refer to the link below that will give you more details on localization of our NetAdvantage jQuery controls:
<http://help.infragistics.com/NetAdvantage/jQuery/2012.1/CLR4.0?page=Customizing_the_localization_of_NetAdvantage_for_jQuery_controls.html>
I am not certain on missing JavaScript files. You can use fiddler or other debugging tool to find more details on this. Based on my understanding you need to set column data type as well as setting RenderCheckboxes property of the grid to true as shown below in order to implement this:
column.For(x => x.MakeFlag).HeaderText("MAKE_FLAG").DataType("bool");
RenderCheckboxes(true).
You can set some delay and call filter grid based on the data. I have attached a simple HTML page for you to review.
I hope this helps.
Thank you, but I have further problems on those suggestions:
1) The EditorType DatePicker: can I change it to german culture (regional("de")), i found no property in this case ?
2) If I change datatype to "bool" I get true and false and when I open it I get the list "true / false" but not the checkbox itself,
could this be a missing / wrong javascript reference for the checkbox icon ?
3) combobox: works: but when opening the combobox, the value in the field disappears in contrast to comboboex in windows forms ...
4) filter: I tried several possibilites but none worked
I just want to define a default filter when the grid appears:
so i just added: $("#MyGrid").igGridFiltering("filter", ([{ fieldName: "username", expr: 'testuser', cond: 'equals'}]));
in the javascript, but in the UI no filter default values appeared.
should I include this line in an javascript filter function ?
do I need a further event which calls this function ?
thank you in advance.
You can use Editor Type to DatePicker as shown below:
columnSettings.ColumnSetting().ColumnKey("ModifiedDate").EditorType(ColumnEditorType.DatePicker);
Refer to the link below that will give more details on this:
<http://help.infragistics.com/NetAdvantage/jQuery/2012.1/CLR4.0?page=igGrid_Updating.html>
You need to set column DataType to "bool" in order to see checkboxes. Refer to the sample on the below link: <http://es.infragistics.com/products/jquery/sample/grid/checkbox-column>
You can set ColumnEditorType to Combo a shown below:
settings .ColumnSetting() .ColumnKey("City") .Required(true) .EditorType(ColumnEditorType.Combo) .ComboEditorOptions(options => { options.DataSource(this.ViewData["ComboItems"] as List<string>).ValidatorOptions(option => { option.KeepFocus(ValidatorKeepFocus.Never); option.CustomErrorMessage("City field is required"); }); });
Refer to the sample on the below link:
<http://es.infragistics.com/products/jquery/sample/grid/editing-client-validation>
You can apply filter condition using below line of code:
$("#EmpGrid").igGridFiltering("filter", ([{ fieldName: "Id", expr: '1', cond: 'equals'}]));
More details on the API as well as sample on the below link:
<http://help.infragistics.com/jQuery/2011.1/ui.iggridfiltering>
<http://es.infragistics.com/products/jquery/sample/grid/filtering-api>
okay thank you so far.
however I have got further questions concerning the iggrid:
1) date fields are not displayed correctly / how can I integrate a calendar function when changing this field
2) boolean values -> how can they be displayed as checkboxes ?
3) how to integrate comboboxes in iggrid fields, so that a user can easily choose one of the values when changing a field value.
4) filtering: how can i define a "default filter" when displaying the grid (e.g. filter for "user = loginuser")
thanks for answering my questions