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 1 1034
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
"melanieab" wrote: 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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Tamir Khason |
last post by:
How to prevent the selected cell from being editable (visual) at DataGrid?
Once click on cell (even readonly) there are cursor inside it and select
text appears. How to prevent it
Thankx
|
by: Sky |
last post by:
Hello:
Another question about trying to wring functionality from a DataGrid...
Have a DB table of "Contacts" -- 14 or more fields per record
Show in datagrid -- but only 5 columns (First,Last,...
|
by: Leo |
last post by:
I have a datagrid with the first column as a Edit,Update,Cancel button
column. The other 5 columns are template columns. When I click the Edit
button in IE6 the row correctly displays the...
|
by: julian.tklim |
last post by:
Hi,
I need to build an editable Datagrid with add & delete buttons on each
row using javascript.
DataGrid need not be pre-populated with values.
To make the thing complicated, one of the...
|
by: rn5a |
last post by:
A Form has a DataGrid which displays records from a SQL Server 2005 DB
table. Users can modify the records using this DataGrid for which I am
using EditCommandColumn in the DataGrid. This is the...
|
by: arlie_maija |
last post by:
Hey -
I'm writing a control that contains a DataGrid, and I'm unable to get
the update event to fire. When I click the update link, the edit event
fires.
heres the details...
my control...
|
by: Andrew Wan |
last post by:
Is it possible to make some of the DataGrid functionality to client-side?
Such as the Edit, Update, Cancel, Delete functionality? Everytime I click on
a
row's Edit button, I wait 2 seconds...
|
by: nateraaaa |
last post by:
While working on a recent project I discovered how useful the CommandArgument property can be. I needed to determine the record_id of a row displayed in my datagrid. When the user clicked the Edit...
|
by: =?Utf-8?B?bWlrZWc=?= |
last post by:
Hi,
I am building a small Help Desk application for my company and need to be
able to edit "open" help desk issues. I use a simple datagrid to display
each issue (6 per page) , with an Edit...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |