The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

pheara (2) [Avatar] Offline
#1
I run the example, it display correctly, displaying three columns(Title, Page, Publisher). I have checked both Gridview Property and LINQ query, I didn't see anything related to specify those three columns. Where did you define it?

I try to follow the example, it display all rows, not just three column.

could you please explain me how to control gridview's column?

Thanks,
Pheara
pheara (2) [Avatar] Offline
#2
Re: Custom Sort (Page 169):How to set gridview to have a fixed number of column
I found out that I need to set a property of GridView as below:

dataGridView1.AutoGenerateColumns = false;

I couldn't find it in the property window, but I can set it in the form load event.

Thanks,
Pheara