Reset Data in a Grid Control

Stimulsoft Reports.NET discussion
Post Reply
owainesau
Posts: 7
Joined: Wed Jul 19, 2017 1:02 am

Reset Data in a Grid Control

Post 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.
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: Reset Data in a Grid Control

Post by Lech Kulikowski »

Hello,

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

Thank you.
Post Reply