public void UpdateColumnSettings(int columnIndex, MultiColumnHeaderState.Column columnSettings) { if (m_TableConfig == null || columnIndex >= m_TableConfig.columns.Length) { return; } var searchColumn = m_TableConfig.columns[columnIndex]; searchColumn.width = columnSettings.width; searchColumn.content = columnSettings.headerContent; searchColumn.options &= ~SearchColumnFlags.TextAligmentMask; switch (columnSettings.headerTextAlignment) { case TextAlignment.Left: searchColumn.options |= SearchColumnFlags.TextAlignmentLeft; break; case TextAlignment.Center: searchColumn.options |= SearchColumnFlags.TextAlignmentCenter; break; case TextAlignment.Right: searchColumn.options |= SearchColumnFlags.TextAlignmentRight; break; } SearchAnalytics.SendEvent(null, SearchAnalytics.GenericEventType.QuickSearchTableEditColumn, searchColumn.name, searchColumn.provider, searchColumn.selector); SearchColumnSettings.Save(searchColumn); SetDirty(); }
public void UpdateColumnSettings(int columnIndex, MultiColumnHeaderState.Column columnSettings) { if (m_TableConfig == null) return; var searchColumn = m_TableConfig.columns[columnIndex]; searchColumn.width = columnSettings.width; searchColumn.content = columnSettings.headerContent; searchColumn.options &= ~SearchColumnFlags.TextAligmentMask; switch (columnSettings.headerTextAlignment) { case TextAlignment.Left: searchColumn.options |= SearchColumnFlags.TextAlignmentLeft; break; case TextAlignment.Center: searchColumn.options |= SearchColumnFlags.TextAlignmentCenter; break; case TextAlignment.Right: searchColumn.options |= SearchColumnFlags.TextAlignmentRight; break; } SearchColumnSettings.Save(searchColumn); }