Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,153,189 members, 7,818,615 topics. Date: Sunday, 05 May 2024 at 07:54 PM

Column Visibility And Sequence - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Column Visibility And Sequence (953 Views)

3 SEO-TOOLS And Tactics That Will Increase Your Website Visibility In (2018) / Premium Websites To Boost Your Organization Visibility / Select All Rows Where The Sum Of Column Equals A Value (2) (3) (4)

(1) (Reply)

Column Visibility And Sequence by Lifeguru02: 7:52pm On May 19, 2016
which is the best way I can do column visibility and sequence to my grid. I am using dapfor wpf gridcontrol.
Re: Column Visibility And Sequence by omosis2: 8:00pm On May 19, 2016
Lifeguru02:
which is the best way I can do column visibility and sequence to my grid. I am using dapfor wpf gridcontrol.


A programmer may also set column visibility and position. To define a manage visibility columns have Column.Visible property. Column visibility covers only the column panel. It is also possible to group data by hidden columns. Moreover, columns that are used for grouping are usually not displayed. An example of managing column visibility via API is shown below:
C#
Header header = new Header();
header.Columns.Add(new Column("Column1"wink);
header.Columns.Add(new Column("Column2"wink);

Debug.Assert(header[0].Id == "Column1"wink;
Debug.Assert(header[1].Id == "Column2"wink;
Debug.Assert(header.VisibleColumns[0].Id == "Column1"wink;
Debug.Assert(header.VisibleColumns[1].Id == "Column2"wink;
Debug.Assert(header["Column1"].VisibleIndex == 0);
Debug.Assert(header["Column2"].VisibleIndex == 1);

//Hide the first column
header["Column1"].Visible = false;

//The header has the single visible column
Debug.Assert(header.VisibleColumns.Count == 1);
Debug.Assert(header.VisibleColumns[0].Id == "Column2"wink;
Debug.Assert(header["Column2"].VisibleIndex == 0);

//Enumerate all visible columns
foreach (Column column in header.VisibleColumns)
{
//Some code here...
}

//Hide all columns
header.VisibleColumns.Clear();

(1) (Reply)

Andriod Game Developer Urgently Need. / Web Applications Developer / The Date Is 29th Of November, 2016. Are You Ready For #empowertech 2.0?

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 11
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.