BGriglia
Identità
Namespace:
B.BWindows.BControlsBase:
UserControlControllo interno:
BView
Scopo
Griglia modificabile B-Arts. Costruisce colonne tipizzate, mantiene una BDataTable dei valori e una tabella separata delle chiavi, usa editor BTesto, BCombo e BCheck e gestisce lookup, formattazione, obbligatorietà e stato di modifica.
Colonne
Le colonne sono descritte da MBGrigliaColonna. Possono essere configurate tramite il designer (Colonne) oppure con AggiungiColonna.
Le informazioni comprendono mapping, tipo dato e numerico, controllo, formato, larghezza, accesso dati, obbligatorietà, blocco ed eventuale elenco tramite MBGrigliaCampoElenco.
Dati e operazioni
Connection: connessione usata dai lookup collegati.DataTable: valori della griglia.DataTableKey: chiavi associate.CurrentCell, selezioni eCount: stato corrente.AzzeraColonne,AggiungiColonna,EliminaColonna,GetColonna,SetColonna,RefreshColumns.LeggiCella,ScriviCella,LeggiKey,ScriviKey.AddRow,DeleteRow,Clear,IsRowInsert.SetFocus,SpostaSuCella,DisattivaEditing,RedrawControl.
Eventi
CellaClick, CellaConfermata, CellaModificata, EntroInCella, EscoDaCella, StateChange, RowChange, HelpClick, BeforeDelete, AfterDelete, RowsRemoved e GestioneMouse.
Riferimento API completo
Identità
Namespace:
B.BWindows.BControlsAssembly:
BFrameworkControlsTipo:
classClasse base:
UserControlSorgente API: versione
5.0.0
Dichiarazione
public class BGriglia : UserControl
Costruttori
BGriglia()
Campi pubblici
Nessun campo pubblico dichiarato.
Proprietà
| Proprietà | Tipo | Accesso |
|---|---|---|
AnnullaInserimento |
bool |
get/set |
AutoDeleteRow |
bool |
get/set |
BackColorCella |
Color |
get/set |
BackColorCellaBloccata |
Color |
get/set |
BackColorCellaSel |
Color |
get/set |
Backgroundcolor |
Color |
get/set |
CelleSelezionate |
DataGridViewSelectedCellCollection |
get |
ColAllineamento |
string |
get/set |
ColBloccata |
string |
get/set |
ColCifreDec |
string |
get/set |
ColElenco |
string |
get/set |
ColFormat |
string |
get/set |
ColHelp |
string |
get/set |
ColLarghezza |
string |
get/set |
ColMapping |
string |
get/set |
ColMaxLength |
string |
get/set |
ColMaxLengthAuto |
string |
get/set |
ColNumDecVis |
string |
get/set |
ColObbligatoria |
string |
get/set |
Colonne |
string |
get/set |
ColonneSelezionate |
DataGridViewSelectedColumnCollection |
get |
ColStrFormat |
string |
get/set |
ColTipoControllo |
string |
get/set |
ColTipoDato |
string |
get/set |
ColTipoNum |
string |
get/set |
ColumnHeaderBorderStyle |
DataGridViewHeaderBorderStyle |
get/set |
ColumnHeaderStyle |
DataGridViewCellStyle |
get/set |
Connection |
BConnection |
get/set |
Count |
int |
get |
CurrentCell |
DataGridCell |
get |
DataTable |
BDataTable |
get |
DataTableKey |
BDataTable |
get |
Direzione |
mbeDirezione |
get/set |
Font |
Font |
get/set |
FontRighe |
Font |
get/set |
ForeColorCella |
Color |
get/set |
ForeColorCellaBloccata |
Color |
get/set |
ForeColorCellaSel |
Color |
get/set |
Invio |
bool |
get/set |
KeyElenco |
Keys |
get/set |
KeyHelpClick |
Keys |
get/set |
MaxRighe |
int |
get/set |
MinRighe |
int |
get/set |
ProponiValore |
object |
get/set |
RigheBloccate |
bool |
get/set |
RigheSelezionate |
DataGridViewSelectedRowCollection |
get |
RowHeaderBorderStyle |
DataGridViewHeaderBorderStyle |
get/set |
RowHeaderStyle |
DataGridViewCellStyle |
get/set |
StateEditing |
bool |
get |
StatusBarVisible |
bool |
get/set |
Eventi CLR
AfterDelete:AfterDeleteEventHandlerBeforeDelete:BeforeDeleteEventHandlerCellaClick:CellaClickEventHandlerCellaConfermata:CellaConfermataEventHandlerCellaModificata:CellaModificataEventHandlerEntroInCella:EntroInCellaEventHandlerEscoDaCella:EscoDaCellaEventHandlerGestioneMouse:GestioneMouseEventHandlerHelpClick:HelpClickEventHandlerRowChange:RowChangeEventHandlerRowsRemoved:RowsRemovedEventHandlerStateChange:StateChangeEventHandler
Metodi
bool AddRow(bool RigaVisibile = false)bool AggiungiColonna(MBGrigliaColonna colmbg)bool AggiungiColonna(string Nome, long Larghezza, long MaxLarghezza, mbeTipoDato TipoDato, mbeTipoNum TipoNum, mbeBloccata Bloccata, mbeObbligatoria Obbligatoria, mbeTipo Tipo = RICERCA, string NomeTabella = "", string CampoKey = "", string CampoDescrizione = "", string Condizione = "", string CampoOrdine = "", mbeTipoRicerca CampoRicerca = ENTRAMBI, mbeTipoDropDown TipoControllo = NORMALE, mbeTipoDato TipoCampoKey = Numerico, mbeCampoVisibile CampoVisibile = DESCRIZIONE)void AzzeraColonne()bool Clear()bool DeleteRow(int Index)void DisattivaEditing()bool EliminaColonna(int Index)MBGrigliaColonna GetColonna(int indexCol)bool IsRowInsert(int rowIndex)object LeggiCella(int rigo, int col, bool Key)object LeggiKey(int rigo, int col)bool RedrawColorOnRow(int rowIndex)void RedrawControl()void RefreshColumns()void ResizeControl()void ScriviCella(object Valore, int rigo, int col, bool Key = false)void ScriviKey(object Valore, int rigo, int col)bool SetColonna(int indexCol, MBGrigliaColonna col)bool SetFocus(int rowIndex, int colIndex, bool OnEdit = false)void SpostaSuCella(int Rigo, int Colonna)
Tipi annidati pubblici
Delegate AfterDeleteEventHandler
Firma:
void AfterDeleteEventHandler(int Rigo, bool Esito)
Delegate BeforeDeleteEventHandler
Firma:
void BeforeDeleteEventHandler(int Rigo)
Delegate CellaClickEventHandler
Firma:
void CellaClickEventHandler(int Rigo, int Col)
Delegate CellaConfermataEventHandler
Firma:
void CellaConfermataEventHandler(int Rigo, int Col, bool CommitByReturn)
Delegate CellaModificataEventHandler
Firma:
void CellaModificataEventHandler(int Rigo, int Col)
Delegate EntroInCellaEventHandler
Firma:
void EntroInCellaEventHandler(int Rigo, int Col)
Delegate EscoDaCellaEventHandler
Firma:
void EscoDaCellaEventHandler(int Rigo, int Col)
Delegate GestioneMouseEventHandler
Firma:
void GestioneMouseEventHandler(object Celle)
Delegate HelpClickEventHandler
Firma:
void HelpClickEventHandler(int Rigo, int Col)
mbeDirezione
mbeAVANTI=0mbeINDIETRO=1
mbeStatoModifica
Nessuno=0Modifica=1Conferma=2Annulla=3
Delegate RowChangeEventHandler
Firma:
void RowChangeEventHandler(int Rigo)
Delegate RowsRemovedEventHandler
Firma:
void RowsRemovedEventHandler()
Delegate StateChangeEventHandler
Firma:
void StateChangeEventHandler(int Rigo, int Col)
