GST Billing Software

header image

Triple Dot Button

Erachana Line

82. How to add triple dot button? when is it needed? what is the corresponding code formalities?

Triple dot button is generally added when we need to open a master form or another form, from where values will be fetched for selection into the dropdown.

Standards to add a triple dot button -

Height, width = 30px

Font Segeo UI 10px

Button Name = btn<Form name to open>
If the triple dot button is clicked to open Place Master, it can be named as 'btnPlaceMaster'

This can be done in 2 ways -

1. By using Kushal Button Properties:
Select the button and set the following properties - ActionType = 'ShowFormRefresh'

FormName='<form name>' (Which for needs to open when the button is clicked)
AssociatedInputControl = 'ControlName' ( (Only dropdowns) which need to refresh after form closes)

AssociatedInputControlGridColumn = 'ColumnName' ( (Only dropdown columns) which need to refresh after form closes)

2. By Custom Code

Don't set any properties for the button. Only create an expression and associate it to button click event.

Code is as follows:

try {
int country = 0;
int state = 0;
int place = 0;
if (txt_Country.SelectedIndex >= 0)
country = TypeConverter.ConvertToInt(txt_Country.SelectedValue);

if (txt_State.SelectedIndex >= 0)
state = TypeConverter.ConvertToInt(txt_State.SelectedValue);

if (txt_PlaceId.SelectedIndex >= 0)
place = TypeConverter.ConvertToInt(txt_PlaceId.SelectedValue);

Form frm = ControlAdapter.CreateForm("Place");
//frm.SetPropertyValue("IsAdmin", this.IsAdmin);
//frm.SetPropertyValue("Priviledge", this.Priviledge);
ControlAdapter.Filter(txt_Country, "", fieldSqls);
ControlAdapter.Filter(txt_State, "", fieldSqls);
ControlAdapter.Filter(txt_PlaceId, "", fieldSqls);
txt_Country.SelectedIndex = -1;
txt_State.SelectedIndex = -1;
txt_PlaceId.SelectedIndex = -1;

if (txt_Country.DataSource != null && country > 0)
txt_Country.SelectedValue = country;
if (txt_State.DataSource != null && state > 0)
txt_State.SelectedValue = state;
if (txt_PlaceId.DataSource != null && place > 0)
txt_PlaceId.SelectedValue = place;

} catch (Exception exc) {
MessageBox.Show("Unexpected error occured!" + Environment.NewLine + exc.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

Purpose of the above manual code - Before the form is opened, if the customer has selected any values in 'Country' and 'State' combo box, the same values should be shown after control refresh also.