c# - What is the best way to embed controls in a list/grid -


I have a table of approximately 450 rows, in which I see users in a graphical list to view or modify the line Would not like to display items. Users will have selection options from the Casbox and select the check box etc.

I've got a Listview clou to extend the basic LISTviewview to allow objects to be embedded but when I load all the rows in all these rows

I am using Cambobox And for the checkbox, the datagrid witch used in the past, but it took a lot of time to run and walk ... I do not have any big feelings.

I'm looking for sugestions on how I can do it at least on the ground.

Thanks

C #, vs. 2008, .net 2.0, system.windows.forms

If you have a complex set of controls for each line, this is the easiest way to do this; however, this list will not function as a random; You will not be able to highlight your rows or navigate with the keyboard.

  • Create a user control with public property to point to your line
  • Create a panel on your form - You can set your 'line' user on runtime in this panel
  • Set the panel to autoror scroll (set the property to see active control in view)
  • Set the anchor properties of the panel so that it sizes W / window
  • / Minimum size can be set so that the full user controls line always shows (to prevent horizontal scroll bar in the panel)
  • Make a regular to add rows
  • In a loop, create a new user control, set your property, which includes the line in the dataset
  • Also, set. Of the panel Everything for the high property (pnl.controls.count-1) for the rules but whatever you add

is very simple, allows complex 'rows', get jobs There are better ways to do this, if you want yourself the functionality of the list-bonus without coding, but you do not need it.


Comments