C# Programming
09-18-2009, 07:56 PM
Hello Friends,
I have inherited the DataGridViewColumn class and add new property in it.
I am able to see myClass and its property in DataGridView but when I set the value to my property, it is set to null automatically. Here is my class :
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Drawing;
using System.Windows.Forms;
namespace dataridviewColumns
{
public class DataGridViewFinderColumn : DataGridViewColumn
{
public DataGridViewFinderColumn()
{
this.CellTemplate = new DataGridViewTextBoxCell();
this.ReadOnly = true;
}
private string _Caption;
public string Caption
{
get { return _Caption; }
set
{
_Caption = value;
}
}
}
}
Thanks and Regards,
Rahul
rahul saini
I have inherited the DataGridViewColumn class and add new property in it.
I am able to see myClass and its property in DataGridView but when I set the value to my property, it is set to null automatically. Here is my class :
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Drawing;
using System.Windows.Forms;
namespace dataridviewColumns
{
public class DataGridViewFinderColumn : DataGridViewColumn
{
public DataGridViewFinderColumn()
{
this.CellTemplate = new DataGridViewTextBoxCell();
this.ReadOnly = true;
}
private string _Caption;
public string Caption
{
get { return _Caption; }
set
{
_Caption = value;
}
}
}
}
Thanks and Regards,
Rahul
rahul saini