private void Form1_Load(object sender, EventArgs e)
{
CalendarTextBoxCellType textBoxCell1 = new CalendarTextBoxCellType();
//If the text cannot display completely, one '......' string will be shown at the text's end, hover the cell, the whole text will be shown in tool tip.
textBoxCell1.Ellipsis = CalendarGridEllipsisMode.EllipsisEnd;
textBoxCell1.EllipsisString = "......";
//Enter the edit mode, the text will be highlight selected.
textBoxCell1.HighlightText = true;
textBoxCell1.MaxLength = 10;
//The value will be casted to lower case.
textBoxCell1.CharacterCasing = CharacterCasing.Lower;
CalendarTextBoxCellType textBoxCell2 = new CalendarTextBoxCellType();
//Input text in textBoxCell2, it will be treated as password, always display '#'.
textBoxCell2.PasswordChar = '#';
textBoxCell2.UseSystemPasswordChar = false;
CalendarTemplate template1 = CalendarTemplate.CreateDefaultTemplate();
template1.Content[1, 0].CellType = textBoxCell1;
template1.Content[1, 0].Value = "DELETE THIS STRING TO INPUT BY YOURSELF, ONLY 10 CHARACTERS CAN BE INPUT";
template1.Content[2, 0].CellType = textBoxCell2;
template1.Content[2, 0].Value = "12345";
gcCalendarGrid1.Template = template1;
}
Private Sub Form1_Load(sender As Object, e As EventArgs)
Dim textBoxCell1 As New CalendarTextBoxCellType()
'If the text cannot display completely, one '......' string will be shown at the text's end, hover the cell, the whole text will be shown in tool tip.
textBoxCell1.Ellipsis = CalendarGridEllipsisMode.EllipsisEnd
textBoxCell1.EllipsisString = "......"
'Enter the edit mode, the text will be highlight selected.
textBoxCell1.HighlightText = True
textBoxCell1.MaxLength = 10
'The value will be casted to lower case.
textBoxCell1.CharacterCasing = CharacterCasing.Lower
Dim textBoxCell2 As New CalendarTextBoxCellType()
'Input text in textBoxCell2, it will be treated as password, always display '#'.
textBoxCell2.PasswordChar = "#"c
textBoxCell2.UseSystemPasswordChar = False
Dim template1 As CalendarTemplate = CalendarTemplate.CreateDefaultTemplate()
template1.Content(1, 0).CellType = textBoxCell1
template1.Content(1, 0).Value = "DELETE THIS STRING TO INPUT BY YOURSELF, ONLY 10 CHARACTERS CAN BE INPUT"
template1.Content(2, 0).CellType = textBoxCell2
template1.Content(2, 0).Value = "12345"
gcCalendarGrid1.Template = template1
End Sub