Print Page | Close Window

ReportControl doesnt refresh when deleting a row

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=5256
Printed Date: 19 September 2024 at 1:06pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: ReportControl doesnt refresh when deleting a row
Posted By: gbrix
Subject: ReportControl doesnt refresh when deleting a row
Date Posted: 10 October 2006 at 5:04am
Hi,
New to this control.
I delete a selected row like this:
    ReportControl1.FocusedRow.Record.DeleteAll
    ReportControl1.Redraw
    ReportControl1.Populate
 
however this leaves the control with broken indentation and gap.

Am I doing something wrong?
 
Thanks



Replies:
Posted By: sserge
Date Posted: 10 October 2006 at 6:58am
Hi,

.DeleteAll deletes all Items from this Record -- it's not what you need.
You'd better use the following:

ReportControl1.Records.RemoveAt ReportControl1.FocusedRow.Record.Index
ReportControl.Populate


--
WBR,
Serge


Posted By: gbrix
Date Posted: 10 October 2006 at 7:09am
Thanks for your quick reply
Just tried and  seems to delete them all ,I just want to delete the selected row.
Just noticed that the index is always 0.
I am loading the tree view in a kind of treeview style
 
Any more suggestions
 
 


Posted By: sserge
Date Posted: 10 October 2006 at 7:41am
Well, if this is a tree view, you just need to delete a records not from top Records collection as it is shown above, but from the parent record collection. Something like below:

ReportControl1.FocusedRow.ParentRow.Record.Childs.RemoveAt ReportControl1.FocusedRow.Record.Index
ReportControl1.Populate


--
WBR,
Serge


Posted By: gbrix
Date Posted: 10 October 2006 at 7:44am
Thanks a lot it worked.Sorry for not telling you earlier that it was a treeview.
Just to say that are great controls.Are you planning more examples where you also show how to manipulate this controls like remove-find etc..
 
again thanks


Posted By: sserge
Date Posted: 10 October 2006 at 8:57am
For some more tips and tricks you can look at "Articles and tutorials" chapter at the web site: http://www.codejock.com/support/articles/ - http://www.codejock.com/support/articles/

--
WBR,
Serge



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net