TextBox not clearing in Order Entry Screen

Basically i added new textbox and assigned the value of another textbox and data is populating , but when i try to clear the screen newly created textbox data is not clearing . when i tried to call the tool bar method to clear newly created box , its not working.

You should have all your controls bound to a dataview. A free floating textbox (unbound) needs to be fully controlled by you and it is generally not best practice.

can you please help me in sorting this out , this is how assign my value to textbox .

EpiTextBox txtBillToAddr = (EpiTextBox)csm.GetNativeControlReference(GUID);
** txtBillToAddrSummary.IsEpiReadOnly=true;**
** txtBillToAddrSummary.Text = txtBillToAddr.Text;**

is this correct approach? else can you guide me to a setup data view , which will clear the data,
thanks.

In InitializeCustomCode() see if this is already there:
this.baseToolbarsManager.ToolClick += new Infragistics.Win.UltraWinToolbars.ToolClickEventHandler(this.baseToolbarsManager_ToolClick);
if it’s there already, search for the code and clear the textbox there.

Otherwise add it, then in the code:
private void baseToolbarsManager_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs args)
{
switch (args.Tool.Key)
{
case “ClearTool”:
// clear the text box
break;
}
}

for the Textbox, you can use the .Text as you have it, but in order to force readonly, I have found that .ReadOnly doesn’t hold all the time. I have had to add (using the wizard) a lot of code like:
private static void baqComboOrderAck_BackColorChanged(object sender, System.EventArgs args)
{
// ** Place Event Handling Code Here **
if (!(baqComboOrderAck.ReadOnly))
baqComboOrderAck.ReadOnly = true;
}

1 Like

Thanks , it was not initalized in initializecustomcode() and i did it , but still the toolbar method is not invoked while clicking the clearTool.

Thanks Marjorie Lamkin , its working now my bad i didn’t closed the form and opened , really very much appreciated , thanks.