Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > Trying a Top 10 With Datagridview Bounded to a DataSet
 

Trying a Top 10 With Datagridview Bounded to a DataSet

i have a datagridview that's binded to a dataser that's bounded to a datatable

GridDatos dg = new GridDatos();

DataGridView grid = dg.ConvertirDGV(ds, "TableName");

there are 3 columns: Name, Times Voted and Location

i already ordered the datagridview so i can have the person that voted the most in first place

grid.Sort(grid.Columns["Versiones"], System.ComponentModel.ListSortDirection.Descending);

now i want it to show only the first 10 persons that voted more

i tryed with rowcount but since it is binded to a dataset it throws an exception

any kind of help will be much appreciated..

oh and... im sorry for my horrible english

kikunozuke  Friday, February 08, 2008 7:30 PM

its ok, i made it work

thanks anyway

kikunozuke  Friday, February 08, 2008 8:44 PM

its ok, i made it work

thanks anyway

kikunozuke  Friday, February 08, 2008 8:44 PM

Hi, kikunozuke,

Could you please post your solution here?

I think the community members could benefit from it if they meet with the same problem.

Regards

Yu Guo â€?MSFT  Wednesday, February 13, 2008 3:34 AM

You can use google to search for other answers

Custom Search

More Threads

• BindingList with multiple filtered views
• Error icon tooltip not visible when editing a cell
• Reposition to specific record using Bound controls on Windows form
• Find out datagridview header height
• Clear the node values
• Datagridview combo unique values
• What BindingSource functions does ComboBox use?
• Add a TextBox Control to DataGridView
• Automatic refresh of a DatagridView from another form
• Column Visiblitiy ?