We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to show combobox in nested child records?

Thread ID:

Created:

Updated:

Platform:

Replies:

119394 Jun 15,2015 08:14 PM Jun 16,2015 07:59 AM Windows Forms 1
loading
Tags: GridDataBoundGrid(Classic)
Alex
Asked On June 15, 2015 08:14 PM

Hello i have an application with a GridDataBoundGrid, with parent records their childs, in this case i have a comobobox cell type in one of the columns, but the problem is that this combo oly appears in the parents, not in the childs and i want the combobox in all levels.

 Dim cboCellTipo As GridStyleInfo = Me.grdActividades.Binder.InternalColumns("IDTipo").StyleInfo
        cboCellTipo.DataSource = listaTablaDetalleTipos
        cboCellTipo.DisplayMember = "DescripcionCorta"
        cboCellTipo.ValueMember = "IDTablaDetalle"
        cboCellTipo.DropDownStyle = GridDropDownStyle.Exclusive
        cboCellTipo.CellType = "ComboBox"

I define the combo cell like this, when I'm filling the grid form the datasource.
Anyone could help me please.
Thanks
greetings

Alejandro

Anish George [Syncfusion]
Replied On June 16, 2015 07:59 AM

Hi Alex,

Thank you for your interest in Syncfusion products.

We suggest you to use the QueryCellInfo event to assign the combobox cell type in the child table. Please refer the below code snippet for better understanding.

VB:


AddHandler Me.gridDataBoundGrid1.Model.QueryCellInfo, AddressOf grid_QueryCellInfo


Private Sub grid_QueryCellInfo(sender As Object, e As GridQueryCellInfoEventArgs)

    ' Where the ColIndex must be the index of the column "IDTipo".

    If e.ColIndex = 3 AndAlso e.RowIndex > 0 Then

        e.Style.CellType = "ComboBox"

        e.Style.DataSource = listaTablaDetalleTipos

        e.Style.DisplayMember = "DescripcionCorta"

        e.Style.ValueMember = "IDTablaDetalle"

        e.Style.DropDownStyle = GridDropDownStyle.Exclusive

        e.Style.CellType = "ComboBox"

    End If



Please let us know if you need any further assistance.

Regards,
Anish.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;