Populate Text Box on Form Rendered Event
Mon 27 Jan 2020 - 17:13
Hi,
I have added a text box to our matter details tab and am populating this data from an sql query (as the information is not from the object that the form is associated with) with the following code in the 'Rendered' event on the form:
This works great however as the text box is being populated after the screen is rendered, the application thinks that a change has been made and asks the user if they want to save the form. How can I stop this from occuring?
Thanks, Romie
______________________________________________________________________________________________________________________________
If the text box holds extended data why not write to the extended data instead of the control and then refresh the form.Peter
______________________________________________________________________________________________________________________________
regards Danny
I have added a text box to our matter details tab and am populating this data from an sql query (as the information is not from the object that the form is associated with) with the following code in the 'Rendered' event on the form:
- Code:
FWBS.OMS.OMSFile file = EnquiryForm.Enquiry.Object as FWBS.OMS.OMSFile;
string matterReview = "";
string sql = @"select top 1 evExtended from dbfileevents where fileID = " + file.ID + " and evtype = 'REVIEWDATE' order by evWhen desc";
FWBS.OMS.SourceEngine.Source results = new FWBS.OMS.SourceEngine.OMSDataSource(sql, "<params/>");
System.Data.DataTable dt = (System.Data.DataTable)results.Run();
matterReview = Convert.ToString(dt.Rows[0]["evExtended"]);
FWBS.Common.UI.IBasicEnquiryControl2 _txtReview = EnquiryForm.GetIBasicEnquiryControl2("txtReview");
_txtReview.Value = matterReview;
This works great however as the text box is being populated after the screen is rendered, the application thinks that a change has been made and asks the user if they want to save the form. How can I stop this from occuring?
Thanks, Romie
______________________________________________________________________________________________________________________________
If the text box holds extended data why not write to the extended data instead of the control and then refresh the form.Peter
______________________________________________________________________________________________________________________________
- Code:
EnquiryForm.GetIBasicEnquiryControl2("txtReview");
_txtReview.IsDirty = false;
regards Danny
Permissions in this forum:
You cannot reply to topics in this forum
|
|