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.
Dear TobiasRueger,
Thank you for contacting Infragistics!
We have received your support request concerning importing UltraWinGrid into a webapp, and this case has been assigned to me. Infragistics is dedicated to helping you solve this issue. Our team and I have done an initial review of your case and my first question is have you checked our online jQuery documentation and samples?
Our ASP.NET controls are not supported for MVC, so jQuery is the best option. Functionality may not be fully portable between these versions. Our documentation and samples can explain which features are included with our jQuery controls and can be found here:
http://help.infragistics.com/NetAdvantage/jQuery/2012.1/CLR4.0?page=igGrid.html
http://help.infragistics.com/jQuery/2012.1/
http://es.infragistics.com/products/jquery/grid/
If you have further questions or concerns, please let me know and I'll be glad to help.
thank you,
however I use razor vbhtml syntax which cannot be found in your samples.
And I do not know a tool for transforming cshmtl in vbhtml.
Maybe you can send me a sample in razor vbhtml.
And I also need functionality to save the current user-specific shape of the grid.
So when the user reopens the grid, then it has its user specific shape (e.g. user specific columns in user specifixc order etc...)
Thank you very much.
thanks again.
could you please send me the datasource of the following infragistics video for CRUD in igGrid.
http://es.infragistics.com/products/jquery/grid/videos/iggrid-crud
I could not get the sample code from the author of this video.
thanks.
Hi TobiasRueger,
I have created a sample based on the video and attached model, View and Controller along with Database. You can also download “NorthWind” database from the Microsoft on the below link:
<http://www.microsoft.com/en-us/download/details.aspx?id=23654>
I hope this helps.
thank you, the example runs in mycase.
however, could you please send me the class "Json" in Visual Basic.Net (Json.vb).
I tried to convert, however the decode function always returns nothing.
Thank you.
Hello,
Due to .NET CLR (Common Language Runtime) support you can still use the “JSON.cs” in your project and use that class in your controller. I would recommend you to search the below website to find JSON parser for VB.NET if needed:
<http://www.json.org/>
I am just following up to see if you have any assistance with this matter.
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.
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