Clearing selected Components programatically
Clearing selected Components programatically
Folks,
I have an embedded Designer control. In response to various events in my application I want to be able to disable the Designer control so the user cannot make any further changes.
It works fine just by setting the Enabled property to false on the designer control. However, if there are any components selected on the page then they remain selected (even though you can't do anything with them). I would like to be able to deselect all of the selected components before I disable the control.
I can't find any obvious way to do this. Is there a way to do it?
Cheers,
Dan
Clearing selected Components programatically
Hello,
We couldn't reproduce this bug. Could you explain your issue in more details?
Can you please send us a simple test project, which reproduce the issue?
Thank you.
We couldn't reproduce this bug. Could you explain your issue in more details?
Can you please send us a simple test project, which reproduce the issue?
Thank you.
Clearing selected Components programatically
I have a small sample project to send to you. How do I upload it?
Cheers,
Dan
Clearing selected Components programatically
Hi,
I have a small sample project created in VS2008. You will need to add the Stimulsoft libs into the lib directory. I had to take them out to get the attachment to upload.
Run the application and open the report included in the zip file.
Select any component on the page in the report designer.
Disable the report designer by clicking on the "Enabled" checkbox
Note that the component previously selected is still selected, even thought the report designer is disabled.
Cheers,
Dan
I have a small sample project created in VS2008. You will need to add the Stimulsoft libs into the lib directory. I had to take them out to get the attachment to upload.
Run the application and open the report included in the zip file.
Select any component on the page in the report designer.
Disable the report designer by clicking on the "Enabled" checkbox
Note that the component previously selected is still selected, even thought the report designer is disabled.
Cheers,
Dan
- Attachments
-
- 799.DisableDesignerTest.zip
- (15.8 KiB) Downloaded 270 times
Clearing selected Components programatically
Hello,
You can use the following code:
Thank you.
You can use the following code:
Code: Select all
private void checkBoxEnableDesigner_CheckedChanged(object sender, EventArgs e)
{
StiReport report = stiDesignerControl1.Report;
foreach (StiComponent component in report.Pages[0].Components)
{
component.IsSelected = false;
}
stiDesignerControl1.Refresh();
stiDesignerControl1.Enabled = checkBoxEnableDesigner.Checked;
}
Clearing selected Components programatically
Thank you!
Clearing selected Components programatically
We are always glad to help you.