Home Forums WinForms controls Xceed Grid for WinForms Problem on dynamically creating a GridControl Reply To: Problem on dynamically creating a GridControl

User (Old forums)
Member
Post count: 23064

Other thing,
After creating all the columns I need to set a format to display each column’s data. In other places of my application (when I’m not creating the grid dynamically) the FormatSpecifier works fine, but now it doesn’t.

 Here is a code example

gridGap.Columns.Add(new DataBoundColumn(“Exposition”));
gridGap.Columns[“Exposition”].FormatSpecifier = “#,###,###,###,##0.0000 %”

after that I use the following commands:

gridGap.Dock = DockStyle.Fill;
gridGap.ReadOnly = true;
gridGap.RowSelectorPane.Visible = false;
gridGap.AllowCellNavigation = false;              
gridGap.ApplyStyleSheet(AssEstilo);

gridGap.DataSource = AdsDadosGAPAtual;
gridGap.DataMember = dtbTabelaAtual.TableName;

Any ideas why the FormatSpecifier isn’t working?
My data is displayed exacly as it is shown in my datasource…

 Thanks again!

Imported from legacy forums. Posted by Oscar (had 375 views)