Exemplo n.º 1
0
        protected void cmbUnitCapacity_Init(object sender, EventArgs e)
        {
            BootstrapComboBox cmb = sender as BootstrapComboBox;
            List <MasterDataModel.MasterDataKendaraan> liVehicle = MasterDataEntity.GetMasterDataUnitCapacity_CMB();

            cmb.DataSource = liVehicle;
            cmb.DataBind();
            if (liVehicle.Count == 1)
            {
                cmb.SelectedIndex = 0;
            }
            if (!gv.IsNewRowEditing)
            {
                cmb.Value = Convert.ToString(gv.GetRowValues(gv.EditingRowVisibleIndex, "UnitCapacity_ID"));
            }
        }