在GridView DevExpress中编辑标题和标题

本文关键字:标题 编辑 GridView DevExpress | 更新日期: 2023-09-27 18:28:42

我在devExpress的GridView中放了一个标题和标题:

settings.Settings.ShowGroupPanel = true;
   settings.Settings.ShowTitlePanel = true;

你能告诉我如何添加标题和编辑标题吗,因为它显示在此处拖动列标题以按该列分组

这是我的GridView代码:

@Html.DevExpress().GridView(settings =>
       {
           settings.Name = "GridView";
           settings.KeyFieldName = "Id";
           settings.SettingsBehavior.AllowSelectByRowClick = true;
           settings.SettingsBehavior.AllowFocusedRow = true;
           settings.Width = Unit.Percentage(100);
           settings.SettingsBehavior.AllowSelectSingleRowOnly = true;
           settings.Settings.ShowGroupPanel = true;
           settings.Settings.ShowTitlePanel = true;
           settings.Settings.ShowFooter = true;
           settings.ClientSideEvents.RowClick = "function(s, e){rowSelected(s, e)}";
           settings.Columns.Add("CodeArticle");
           settings.Columns.Add("Prix").Width = Unit.Pixel(200); ;
           settings.Columns.Add("Designation");
           settings.CommandColumn.Visible = true;
       }).Bind(Model).GetHtml()

在GridView DevExpress中编辑标题和标题

settings.SettingsText.Title="Liste Des Articles";设置。SettingsText.GroupPanel="Liste Des Articles";

您有不同的主要成员,它们会影响元素的外观和功能:

//Visibility:
myDevExpressGrid.Settings.ShowTitlePanel="true";
//Contents:
myDevExpressGrid.SettingsText.Title = "My Title";
//Style:
myDevExpressGrid.Styles.TitlePanel.Border.....;
myDevExpressGrid.Styles.TitlePanel.BackColor....;
myDevExpressGrid.Styles.TitlePanel.....
//You have a lot of different choices to custom your Title
//Template:
myDevExpressGrid.Templates.Titlepanel...;
//Same that Styles, you have a lot of different choices to custom it