overrtiding Edit in a datagrid

G

Guest

Hi,
I have a datagrid and a datatable, and have overrided the Edit method so
that the background cellcolor isn't effected when a cell is clicked on.
Everything's fine, although now the column won't sort when clicking at the
top. Here is some of my code:
from Form 1:
PropertyDescriptorCollection pcol =
this.BindingContext[tCat].GetItemProperties();
DataGridTableStyle ts1 = new DataGridTableStyle();
ts1.MappingName = "Catalog";
ts1.AllowSorting = true;
DataGridColumnStyle cCust;
cCust = new PaintDG(pcol["Catalog"]);
cCust.MappingName = "Customer";
cCust.HeaderText = "Customer";
cCust.Width = 210;
ts1.GridColumnStyles.Add(cCust);

public class PaintDG : DataGridTextBoxColumn
{
public PaintDG(PropertyDescriptor pcol)
{
}
protected override void Edit(CurrencyManager Source, int RowNum,Rectangle
Bounds, bool ReadOnly,string InstantText, bool CellIsVisible)
{
}
}
Any idea what I need to do?
Thanks!!!
Mel
 
G

Guest

Hi again,
I don't know why this happens, I struggle for hours, even days to get
something working and finally ask you guys. Then two minutes later I figure
it out.
Thanks though!
Mel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top