how to link MultiColumnComboBox from model value in the grid to custom popup window editor?

1 Answer 21 Views
Grid MultiColumnComboBox
Tony
Top achievements
Rank 1
Iron
Iron
Iron
Tony asked on 29 Jul 2021, 03:43 PM

Good day guys,

I have a problem where i have grid with popup custom window editor. in the pop window I have a MultiColumnComboBox which i can use to update the field which is bound to the MultiColumnComboBox field in the popup window. now the problem comes when some of the fields return the ID and not the string text field which is very weird. have a look at the attached screenshots.

I have the multicomlumncombobox configures as below in the custom popup window 


                        @(Html.Kendo().MultiColumnComboBox()
                                      .Name("NameAbbreviation")
                                      .DataTextField("NameAbbreviation")
                                      .DataValueField("AccoutID")
                                      .ValuePrimitive(true)
                                      .AutoBind(false)
                                      .Filter("contains")
                                      .Placeholder("--Search/Select Mine---")
                                      .FilterFields(new string[] { "AccountType", "Status", "NameAbbreviation", "Company", "Minerals" })
                                      .Columns(columns =>
                                      {
                                          columns.Add().Field("AccountType").Title("AccountType").Width("130px");
                                          columns.Add().Field("Status").Title("Type").Width("130px");
                                          columns.Add().Field("NameAbbreviation").Title("Manufacturer").Width("350px");
                                          columns.Add().Field("Company").Title("Company").Width("350px");
                                          columns.Add().Field("Minerals").Title("Minerals").Width("130px");

                                      })

                                      .Events(e => e.Select("onParkarBayComboSelect"))
                                      .HtmlAttributes(new { style = "width:100%" })
                                      .Height(204)
                                      .FooterTemplate("Total <strong>\\#: instance.dataSource.total() \\#</strong> items found")
                                      .DataSource(source => {
                                          source.Custom()
                                              .ServerPaging(true)
                                              .PageSize(80)
                                              .Type("aspnetmvc-ajax") //Set this type if you want to use DataSourceRequest and ToDataSourceResult instances
                                              .Transport(transport => transport
                                              .Read(read =>
                                              {
                                                  read.Action("ParkerBay_GetMineDetails_Read", "SiteCodes");
                                              }))
                                              .Schema(schema =>
                                              {
                                                  schema.Data("Data") //define the [data](https://docs.telerik.com/kendo-ui/api/javascript/data/datasource#configuration-schema.data) option
                                                        .Total("Total"); //define the [total](https://docs.telerik.com/kendo-ui/api/javascript/data/datasource#configuration-schema.total) option
                                              });
                                      }).ToClientTemplate()

    )

1 Answer, 1 is accepted

Sort by
0
Accepted
Tony
Top achievements
Rank 1
Iron
Iron
Iron
answered on 06 Aug 2021, 10:16 AM

Hi guys,

i have this resolved,

thanks you :)

kind regards

Tony

Anton Mironov
Telerik team
commented on 11 Aug 2021, 06:51 AM

Hi Tony,

Thank you for letting us know that the issue you were facing is now resolved.

If assistance for anything else is needed, do not hesitate to contact me and the team.

Best Regards,
Anton Mironov
Tags
Grid MultiColumnComboBox
Asked by
Tony
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Tony
Top achievements
Rank 1
Iron
Iron
Iron
Share this question
or