1. Create a class and let us name it TransactionEntry.
2. Inherit the created class from TransactionEntryModuleBase class.
3. Create two lists of the TransactionGridColumn type; one for showing the column(s) and the other for hiding the column(s).
4. Then show and/or hide the column(s) you need.
Refer the following sample code for customising the Transaction Grid on the POS:
class TransactionEntry: TransactionEntryModuleBase
{
List<CXS.Retail.ViewModel.TransactionGridColumn> m_ShowList = new List<CXS.Retail.ViewModel.TransactionGridColumn>{ };
List<CXS.Retail.ViewModel.TransactionGridColumn> m_HideList = new List<CXS.Retail.ViewModel.TransactionGridColumn> { };
public override void OnViewIntialized(object sender, CXS.Retail.Extensibility.ViewInitializedEventArgs args)
{
//Show/Hide Columns to transaction entry
TransactionEntryView m_view;
m_view = sender as TransactionEntryView;
if (m_view != null)
{
m_ShowList.Add(TransactionGridColumn.Comment);
m_view.ShowColumns(m_ShowList);
m_HideList.Add(TransactionGridColumn.Total);
m_HideList.Add(TransactionGridColumn.Description);
m_view.HideColumns(m_HideList);
}
}
}