datagrid template columns and customvalidation

G

Guest

hey all,

I'm not sure if this is even possible but here goes:
if i put a CustomValidator control in my EditItem template column how do i
get to it? Or how and where do i write my custom code for the
customvalidation control?

thanks,
rodchar
 
G

Guest

There are problems trying to implement cell by cell validation using the
grid's Validating event architecture. The problem is that the grid is not the
object handling the data. Instead, a TextBox or some other control is the
control managing the changing of the cell contents. One way to implement the
validation at the grid level is to handle the CurrentCellChanged event, and
if the previous cell's value is not proper, then return to that cell.







Fernando Hunth
Senior Developer
Huddle Group S.A.
(e-mail address removed)



Huddle Group S.A. | Enterprise Technology Services
Microsoft Certified Partner

Ciudad de la Paz 2719

· Piso 6D (C1428CPU)

· Ciudad de Buenos Aires · Argentina
www.huddle.com.ar
 
G

Guest

Try using the Handle_CurrentCellChanged Event
and obtain it with something like this:

newCurrentRow = dataGrid1.CurrentCell.RowNumber;
newCurrentCol = dataGrid1.CurrentCell.ColumnNumber;








Fernando Hunth
Senior Developer
Huddle Group S.A.
(e-mail address removed)



Huddle Group S.A. | Enterprise Technology Services
Microsoft Certified Partner

Ciudad de la Paz 2719

· Piso 6D (C1428CPU)

· Ciudad de Buenos Aires · Argentina
www.huddle.com.ar
 

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

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top