datagrid required field (column)

  • Thread starter Thread starter rainwood
  • Start date Start date
R

rainwood

I've been trying for quite some time.
I have a datagrid with a dropdown working perfect.
But, now I want to make the field required.
(default value is set to 'pick a type' and I want to make sure that they do
before updating the row/grid.)

I've been playing with addhandlers but not really known to that.
anyone can help me a bit?

thanx
ray
 
Rainwood,

I think that the best way to handle this is by evaluating the dataview

(I assume you used that and else just use that) before the update.

I think that a dataview.find will be the best solution (testing it on the
starting value).

The dataview.find gives you direct the row from your datagrid.
(It seems at first look a little bit strange however is very easy to use,
here the link)

http://msdn.microsoft.com/library/d...tml/frlrfsystemdatadataviewclassfindtopic.asp

I hope this helps?

Cor
 
Cor,

sounds logic.
but... (always there is...)

when do I call this event?
The easiest sound after leaving the row. Either on edit or on add.

How to do that?
 
Rainwood,

In the method I showed it is as I tried to explain direct before the update.
(I assume that is a button event).

That gives the users the change untill the latest moment.

However I don't not know your methods of allerting and making corrections
(while that in my opinion would go to far for a newsgroup).

Another approach is of course taking the row changed event.

However than you get a quiet different solution and than you would have to
use that solution I gave you as well. That to prevent that somebody sets it
back to initial and than push the update button.

However just my idea.

Cor
 

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

Back
Top