I have a igGrid, but the type of data which are not represented.This occurs because the iggrid is updated and every time represents a different model.When I want to save changes to the model, I can not, because I is not the model type.To save the changes I have a function that I found in the documentation for Infragistics.Is the next function:
Public Function EditingSaveChanges() As ActionResult ViewData("GenerateCompactJSONResponse") = False Dim m As New GridModel() Dim transactions As List(Of Transaction(Of Object)) = m.LoadTransactions(Of Object)(HttpContext.Request.Form("ig_transactions")) For Each t As Transaction(Of Object) In transactions If t.type = "newrow" Then ElseIf t.type = "deleterow" Then ElseIf t.type = "row" Then Next Dim result As New JsonResult() Dim response As New Dictionary(Of String, Boolean)() response.Add("Success", True) result.Data = response
Return result End Function
This modified to receive anything, but I know the type of object that gets me.Any way to get the type of which is the object that gets me?when I do "t.row", I just say "object".
Thanks advances.
Best Regards.
Hi Maya,
Thanks to what you told me, I understand what I needed.
Hello nitaGM,
I’m just following up to see if you’ve been able to resolve your issue. If you have any questions or concerns or if you need further assistance please let me know.
Best Regards,
Maya Kirova
Developer Support Engineer
Infragistics, Inc.
http://es.infragistics.com/support
Do you mean you want to make a specific column ReadOnly?
Generally you can specify that in the Column settings under the Updating feature. For example:
features.Updating()
.ColumnSettings(settings =>
{
settings.ColumnSetting().ColumnKey("EmployeeID").ReadOnly(true);
…
There an example on this here:
http://es.infragistics.com/products/jquery/sample/grid/editing-client-validation
The first column is set as ReadOnly.
Let me know if I understood your issue correctly.
Developer Support Engineer II
Thank you very much for the clarification.
If I wanted to change the index that is used to initialize the primary key if this is readOnly, how could I?
Thanks in advance.
Thank you for the code snippet and clarification.
It seems that you autogenerate all the columns in the grid:
.AutoGenerateColumns(True) _
So the grid will create a column for each property in the model including one for the “Id” column.
If you set that to false and define the columns in the Columns collection you should get the expected result.
If you want the columns to be autogenerated but want to also hide that particular column you could use the Column Hiding feature:
https://www.igniteui.com/help/api/2019.1/ui.igGridHiding
Let me know if you have any questions or concerns.
www.infragistics.com/support