How can I tell a data bound checked list box to reload it's data after a data source has changed? Also is there a way to have keys associated with items in a checked list box?
Thanks!
Mat Murdock
Reload Databound Checked List Box
Reload Databound Checked List Box
You can access to the standard .Net CheckedListBox component via StiCheckedListBoxControl.Control property. This property allows access to a collection of the checked items.
What about your fist question - data should be reload automatically, is it not?
Thank you.
What about your fist question - data should be reload automatically, is it not?
Thank you.
Reload Databound Checked List Box
So I have a form with a Checked List Box on it an it's linked to a datasource. Have have that datasource set to NOT connect on start because I want to allow the user to enter in some information to filter the data. When they hit the OK button I have a line that says "students.connect" where students is the name of the datasource. After this I need it to populate the Checked List Box with the results. This is not happening. So I thought I might need to tell the Checked List Box the the datasource has changed and it needs to reload.
Thanks,
Mat
Thanks,
Mat
Reload Databound Checked List Box
What id need a reload, requery, or resetbindings method. That method would causes a control bound to the BindingSource to reread all the items in the list and refresh their displayed values.
Thanks,
Mat
Thanks,
Mat
Reload Databound Checked List Box
You can use following code:
Thank you.
Code: Select all
object [] values = Stimulsoft.Report.Dictionary.StiDataColumn.GetDatasFromDataColumn(this.Dictionary, "Categories.CategoryName");
Array.Sort(values);
ListBox1.Control.Items.Clear();
ListBox1.Control.Items.AddRange(values);