Hi all,
For you that have been following my finding a control in a template column
post, this is an extension to it.
I have a XML file which is read into a dataset and bound to a data grid -
Nothing special.
The XML file structure is as follows:
<?xml version="1.0" standalone="yes"?>
<ApplicationSettings>
<Section Name="EmailSettings">
<Key Name="Filter Address" Value="email1@m..." />
<Key Name="Admin Address 1" Value=email2@m... " />
<Key Name="Admin Address 2" Value="email3@m... " />
<Key Name="Admin Address 3" Value="email4@m... " />
<Key Name="Admin Address 4" Value="email5@m... " />
<Key Name="Subject" Value="Please read the following" />
<Key Name="Body" Value="Please review the link below" />
</Section>
<Section Name="WinSvsSettings">
<Key Name="ScanTime" Value="1800" />
<Key Name="GarbageColl" Value="1000" />
</Section>
<Section Name="ErrorTrapSettings">
<Key Name="Error" Value="2400" />
<Key Name="GarbageColl" Value="2400" />
</Section>
</ApplicationSettings>
The columns/Nodes Key is bound to the data grid.
So the data will appear as follows:
Row# EditColumn NameColumn ValueColumn
Row 1 Edit Admin Address 1 email1@m...
<mailto:email1@m...>
Row 2 Edit Admin Address 2 email2@m...
Row 3 Edit Admin Address 3 email3@m...
Row 4 Edit Admin Address 4 email4@m...
<mailto:email4@m...>
Row 5 Edit Subject Please read the
following
Row 6 Edit Body Please review the link
below
Row 7 Edit ScanTime 1800
Row 8 Edit GarbageColl 1000
Row 9 Edit Error 2400
Row 10 Edit GarbageColl 2400
On edit command only Value Column becomes "editable", I would put a regular
expression validator for the e-mail addresses in that column. The problem I
now face is that the Value Column does not only "house/display" e-mail
addresses like you can see, so if try and edit row 5 the text box displays
"Please read the following" if I change that the regular expression
validator kicks in not allowing me to format/change the value unless it
adheres to the regex validation sequence.
I need advise on how to structure this so that it allows me to edit the
e-mail addresses and be validated and edit the normal text and NOT be
validated using the e-mail regular expression validator.
What I was thinking is when any of the admin addresses are clicked all four
addresses will be in the same edit row in text boxes i.e.
Row# EditColumn NameColumn ValueColumn
Row 1 Edit Admin Address 1 email1@m...
<mailto:email1@m...>
email2@m...
email3@m...
email4@m... <mailto:email4@m...>
maybe this way I can specify that only when txtEmail is created use Regular
expression Validator to validate. I don't know, so anyone that has had
experience with this I would greatly appreciate your help or suggestions.
Regards,
Carlos Magalhaes