Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Last active November 15, 2016 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerntx/17f9c052eea4d11697ed8869fc53bdec to your computer and use it in GitHub Desktop.
Save bjoerntx/17f9c052eea4d11697ed8869fc53bdec to your computer and use it in GitHub Desktop.
private void textControl1_SubTextPartEntered(object sender,
TXTextControl.SubTextPartEventArgs e)
{
// is the SubTextPart a valid merge block?
if (DataSourceManager.IsMergeBlock(e.SubTextPart))
{
// set the merge block as the new internal master table
if(dsManager.DataTables.Contains(e.SubTextPart.Name.Remove(0, 5)))
dsManager.MasterDataTableInfo =
dsManager.DataTables[e.SubTextPart.Name.Remove(0,5)];
}
}
private void textControl1_SubTextPartLeft(object sender,
TXTextControl.SubTextPartEventArgs e)
{
// set the master table back to the originally selected table
dsManager.MasterDataTableInfo = cbMasterTable.SelectedItem as DataTableInfo;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment