Page 1 of 1

Reset Data in a Grid Control

Posted: Tue Jul 17, 2018 7:22 am
by owainesau
Hi,

I am trying to reset the data inside a grid control when a radio button is changed.

Here is the code i am trying on event "change" :

Code: Select all

if (rbMyJobs.Checked == true) {
	op_MyJobsOnly = true;
}
if (rbMyJobs.Checked == false) {
	op_MyJobsOnly = false;
}


GetJobTitles.Disconnect();
GetJobTitles.Connect();

object [] values = Stimulsoft.Report.Dictionary.StiDataColumn.GetDatasFromDataColumn(this.Dictionary, "GetJobTitles.JobTitle"); 
gcJobTitle.Items.Clear(); 
gcJobTitle.Items.AddRange(values);
The data source GetJobTitles changes based on the variable that is set above, i need this to reflect in the grid control.

I am getting the following error:
The error of compilation
The error of compilation is found in the 'CheckedChanged' event of the 'rbMyJobs' component:
'Stimulsoft.Report.Dialogs.StiGridControl' does not contain a definition for 'Items' and no extension method 'Items' accepting a first argument of type 'Stimulsoft.Report.Dialogs.StiGridControl' could be found (are you missing a using directive or an assembly reference?)
Any help would be much appreciated, i haven't worked with the Grid Controls before.

Re: Reset Data in a Grid Control

Posted: Thu Jul 19, 2018 12:34 pm
by Lech Kulikowski
Hello,

Please send us a sample project which reproduces the issue for analysis.

Thank you.