StrataFrame Forum

MultiSelect

http://forum.strataframe.net/Topic6567.aspx

By Chan - 2/5/2007

Hi,

Which control should I use to allow user to have multiselect?

Also, how to insert/update only checked records back to DB?

Any sample?

Thank you

By StrataFrame Team - 2/6/2007

Most of the .NET controls allow you to have checkboxes on each of the rows.  There is a "CheckBoxes" property on the ListView as well as the ListBox and TreeView.  When you set that property, you can test on the Checked state of each of the items in the list. 

As for the records that will be saved to the database, only records that are modified are saved, so if you do not want a record to be saved, you can call RejectChanges or AcceptChanges on the row which will set the row to an Unchanged state, preventing it from being saved to the database.