在GridView DevExpress中编辑标题和标题

时间:2016-01-03 01:31:04

标签: c# asp.net gridview

我在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()

2 个答案:

答案 0 :(得分:0)

settings.SettingsText.Title =“Liste Des Articles”;            settings.SettingsText.GroupPanel =“Liste Des Articles”;

答案 1 :(得分:0)

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

//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