作成日: 2019/05/21 最終更新日: 2019/05/21
文書種別
使用方法
詳細
GcDateTime型セルでは、編集時と表示時(非編集時)でそれぞれ別の日付書式を設定することができます。例えば、「2015/06/24」と入力して編集を終了すると自動的に「平成 27年06月24日」と書式が変更される、というようなことが可能です。
[Visual Basic]
[C#]
[Visual Basic]
Imports GrapeCity.Win.MultiRow
Imports GrapeCity.Win.MultiRow.InputMan
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
' GcDateTime型セルの設定
Dim gcDateCell As New GcDateTimeCell()
' 編集時の書式設定
gcDateCell.Fields.Clear()
gcDateCell.Fields.AddRange("yyyy/MM/dd")
gcDateCell.DisplayFields.Clear()
' 表示時の書式設定
gcDateCell.DisplayFields.AddRange("ggg ee年MM月dd日")
GcMultiRow1.Template = Template.CreateGridTemplate(New Cell() {gcDateCell})
GcMultiRow1.RowCount = 5
End Sub
End Class
[C#]
using GrapeCity.Win.MultiRow;
using GrapeCity.Win.MultiRow.InputMan;
namespace sample
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
// GcDateTime型セルの設定
GcDateTimeCell gcdateCell = new GcDateTimeCell();
// 編集時の書式設定
gcdateCell.Fields.Clear();
gcdateCell.Fields.AddRange("yyyy/MM/dd");
gcdateCell.DisplayFields.Clear();
// 表示時の書式設定
gcdateCell.DisplayFields.AddRange("ggg ee年MM月dd日");
// MultiRowの設定
gcMultiRow1.Template = Template.CreateGridTemplate(new Cell[] { gcdateCell });
gcMultiRow1.RowCount = 5;
}
}
}
旧文書番号
83982