Passing Value from Tracker Field on Dashboard

Hi, I have a dashboard with a tracker. How can I pass the value from the tracker text box into a variable ? With a standard text box I am able to use the below code.

private void epiButtonC2_Click(object sender, System.EventArgs args)
{
	// ** Place Event Handling Code Here **

MessageBox.Show(epiTextBoxC1.Text);
}

The tracker text box has a name of txtVendor_VendorID but it doesnt work as a standard text box above. (The name is greyed out in the properties) I believe I need to be using GetNativeControlReference with the EpiGuid but I can’t get it to work. Example below (been experimenting with lots of variations on this).

private void epiButtonC3_Click(object sender, System.EventArgs args)
{
	// ** Place Event Handling Code Here **
private EpiTextBox VendorID;

this.VendorID = (epiTextBox)csm.GetNativeControlReference(“32e4d0e6-b1af-49c7-ab37-3596955e2667”);

MessageBox.Show(this.VendorID);
}

Here’s what i use to declare it. You’ll need to take the Guid from the control’s properties:


Then, you can use txtCName.Text = “some text”;

Dragos

1 Like