Current filter:
                                You should refresh the page.
                                  • Hi

                                    I was trying to develope a gridview responsive using the code in demo  Adaptive Layout With FormLayout (https://demos.devexpress.com/MVCxGridViewDemos/Adaptivity/AdaptiveLayoutWithFormLayout?device=tablet&rotate=0). It's all working except the fact i would like to add the new, edit and delete button in my adaptive form layout which are missing in the demo and are not displayed in adaptive mode. I assume i need to add the column in settings.SettingsAdaptivity.AdaptiveDetailLayoutProperties.Items  collection to make the command column visible in adaptive layout but i couldn't find any example working. Could you please provide an example of gridview adaptive layout with FormLayout with new, edit and delete button visible in adaptive mode?
                                    Than k you.

                                • Oleg (DevExpress Support) 05.24.2019

                                  Hello Marco,
                                  We are working on this issue but we don't have an immediate solution right now.
                                  We will answer you as soon as we can. We appreciate your time.

                                1 Solution

                                Creation Date Importance Sort by

                                Fixed:


                                Additional information:

                                In the scope of the fix applied in this thread, we added the following overload of the AdaptiveDetailLayoutProperties.Items.AddCommandItem method with the ColumnName parameter.
                                Use this method to add command columns to the Adaptive Detail Layout:

                                [C#]
                                //Layout Items configuration settings.SettingsAdaptivity.AdaptiveDetailLayoutProperties.Items.AddCommandItem("CommandColumnEdit"); settings.SettingsAdaptivity.AdaptiveDetailLayoutProperties.Items.AddColumnItem("ProductName"); settings.SettingsAdaptivity.AdaptiveDetailLayoutProperties.Items.AddColumnItem("CategoryID"); settings.SettingsAdaptivity.AdaptiveDetailLayoutProperties.Items.AddColumnItem("QuantityPerUnit"); settings.SettingsAdaptivity.AdaptiveDetailLayoutProperties.Items.AddColumnItem("UnitPrice"); settings.SettingsAdaptivity.AdaptiveDetailLayoutProperties.Items.AddCommandItem("CommandColumnDelete");

                                 Take special note that it is necessary to specify names for all required command columns to use this method. For example, if you create command columns using the GridViewSettings.Columns.Add  method, then you can specify command columns's names as shown below:

                                [C#]
                                // columns definition settings.Columns.Add(new MVCxGridViewCommandColumn() { Name = "CommandColumnEdit", ShowEditButton = true, Visible = true }); settings.Columns.Add(c => { c.FieldName = "ProductName"; //.......................... }); settings.Columns.Add(c => { c.FieldName = "CategoryID"; //.......................... }); settings.Columns.Add(c => { c.FieldName = "QuantityPerUnit"; //.......................... }); settings.Columns.Add(c => { c.FieldName = "UnitPrice"; //.......................... }); settings.Columns.Add(new MVCxGridViewCommandColumn() { Name = "CommandColumnDelete", ShowDeleteButton = true, Visible = true });

                                 If you enable command columns using the GridViewSettings.CommandColumn parameters, then you can specify a command column name as shown below:

                                [C#]
                                settings.CommandColumn.Visible = true; settings.CommandColumn.ShowDeleteButton = true; settings.CommandColumn.ShowEditButton = true; settings.CommandColumn.Name = "CommandColumn";
                                [C#]
                                settings.SettingsAdaptivity.AdaptiveDetailLayoutProperties.Items.AddCommandItem("CommandColumn");