Hi ,
How to enable tooltip feature in dynamically created column in the controller
foreach (var year in Years) { col = new GridColumn() { HeaderText = years, Key = years, DataType = "double", }; Genyr.Columns.Add(col); ColumnUpdatingSetting colUpdate = new ColumnUpdatingSetting(); colUpdate.ColumnKey = years; colUpdate.DefaultValue = "0.00"; colUpdate.Required = true; lsColumnSettings.Add(colUpdate); } GridTooltips g = new GridTooltips(); g.Name = "tooltip"; GridUpdating update= new GridUpdating() { ColumnSettings = lsColumnSettings,EnableAddRow = false}; Genyr.Features.Add(update);
Hello George,
Thank you for posting in our forum.
You can create and add the tooltips feature, for example:
GridTooltips tooltips = new GridTooltips(); tooltips.Visibility = TooltipsVisibility.Always; gridModel.Features.Add(tooltips);
And then in the foreach loop create and add the column setting for the related column to the tooltip feature, for example:
foreach (var item in data) { ColumnTooltipsSetting setting = new ColumnTooltipsSetting(); setting.ColumnKey = item; setting.AllowTooltips = true; tooltips.ColumnSettings.Add(setting); }
Let me know if you have any additional questions or concerns.
Regards,
Maya Kirova
How to enable tooltip for column header