Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
645
problem with combo editor
posted

Hi,

I'm working with igGrid.
My current problem is that I have a igGrid with not the kind of list that'll show.
My problem comes when I show the list has a property that is a class.
To explain, I show an example:
a type of list that will:

public class ResourceMessage

property Description as srting

property Id  as integer

End class

public class Message

property code as integer

property Post as new ResourceMessage

End class

My class Message, it's show in the igGrid.

I want that reflection to display property of the class ResourceMessage is Description.
Eventually, you will not know that the list type is displayed igGrid, so I need to be by reflection.

But this property Description shown, the igGrid want is a combo.
What I have been trying to:

@(Html.Infragistics().Grid(Model.listaGrid.AsQueryable).ID("grid1").PrimaryKey(Model.Id) _
            .UpdateUrl(Url.Action("EditingSaveChanges")) _
            .AutoGenerateColumns(True) _
           .Columns(Sub(column)
                      column.For((Function(x) x.GetType.GetProperty("Post").GetValue(x, Nothing).GetType.GetProperty("Description").Name)).HeaderText("aa")
           End Sub) _
           .Features(Sub(features2)
                      features2.Paging()
                      features2.Selection.Mode(SelectionMode.Row).MultipleSelection(False)
                      features2.Updating() _
                                 .EnableAddRow(True).AddRowLabel("Añadir nueva fila") _
                                 .EnableDeleteRow(True) _
                                 .EditMode(GridEditMode.Row) _
                                  .ColumnSettings(Sub(setting)

                                            setting.ColumnSetting().ColumnKey(Model.Id).ReadOnly(True)

                                           setting.ColumnSetting() _

                                            .ColumnKey("Post") _
                                            .EditorType(ColumnEditorType.Combo) _
                                            .ComboEditorOptions(Sub(o)
                                                       o.DataSource(Model.propiedadesDeNavegacion)
                                             End Sub)
                                 End Sub)
                      End Sub) _
           .Height("90%").DataSourceUrl(Url.Action("PagingGetData")).DataBind().Render())

I get to this display is two time the type property ResourceMessage. First time, the header is aa, and the last time, the header is Post.

In column post, when I edit, I can see it's a combo, but when I try to view the values of the combo, no value, since not even deployed.

I change the value to the setting .ColumnKey("Description"),but I can not see the editor's combo in any of the columns that reference the property post.

Thanks in advanced.

Best Regards.

Elena Guillén.

Parents
No Data
Reply
  • 37874
    posted

    Hi Elena Guillén,

    I am not sure I understand what is your issue, can you please clarify? If possible, attach a sample, reproducing the issue so I can investigate it further. Also, I would suggest you to have a look at this thread, discussing the igCombo, used as an editor in the grid - http://es.infragistics.com/community/forums/p/72892/370474.aspx and this demo sample - http://es.infragistics.com/products/jquery/sample/combo-box/grid-editor.

    Hope this helps.

Children