| Author |
Share Topic Topic Search Topic Options
|
bala
Groupie
Joined: 18-Aug-2010
Location: Brazil
Posts: 54
|
Post Options
Quote Reply
Topic: Validation on TextBox Posted: 15-Sep-2010 at 9:05am |
Hi Densk I look out your solution and try to solve problem I am sending my solution would you check out where I am doing mistek uploads/896/valid.zipThanks
|
 |
DenisK
IdeaBlade
Joined: 25-Aug-2010
Posts: 715
|
Post Options
Quote Reply
Posted: 14-Sep-2010 at 3:25pm |
|
You need to implement a class that implements an IVerifierProvider interface. Please take a look at the solution I sent you.
|
 |
bala
Groupie
Joined: 18-Aug-2010
Location: Brazil
Posts: 54
|
Post Options
Quote Reply
Posted: 14-Sep-2010 at 11:25am |
|
Hi Densk
private void btnSave_Click(object sender, RoutedEventArgs e) { STUDENT stud = new STUDENT(); stud.NAME = txtName.Text; stud.PHONE = Convert.ToInt64(txtPhone.Text); mgr.AddEntity(stud); mgr.SaveChangesAsync();
}
Now this my code for save but How to fire that validation i want make sure Name can not be empty and Phone no should be Number.. And want to show proper error message.
|
 |
DenisK
IdeaBlade
Joined: 25-Aug-2010
Posts: 715
|
Post Options
Quote Reply
Posted: 14-Sep-2010 at 10:29am |
|
If you go to our website, the new version should be up there under the product page.
|
 |
bala
Groupie
Joined: 18-Aug-2010
Location: Brazil
Posts: 54
|
Post Options
Quote Reply
Posted: 14-Sep-2010 at 9:11am |
|
HI Denisk
I could not found any upgrade version of Devforce. Where I can find new version?
Thanks
|
 |
DenisK
IdeaBlade
Joined: 25-Aug-2010
Posts: 715
|
Post Options
Quote Reply
Posted: 13-Sep-2010 at 2:46pm |
|
Please update to the latest 6.0.5 version.
|
 |
bala
Groupie
Joined: 18-Aug-2010
Location: Brazil
Posts: 54
|
Post Options
Quote Reply
Posted: 13-Sep-2010 at 1:52pm |
|
Hi Thanks example looking cool I am try to running but I have one error
public class NoNumberVerifier : PropertyValueVerifier {
public NoNumberVerifier(Type pType, string propertyName, string displayName = null, bool? shouldTreatEmptyStringAsNull = null) : base(new PropertyValueVerifierArgs(pType, propertyName, false, displayName, shouldTreatEmptyStringAsNull))// error line {
}
Error 1 'IdeaBlade.Validation.PropertyValueVerifierArgs' does not contain a constructor that takes 5 arguments C:\Users\vend\Documents\Visual Studio 2010\Projects\DevF\ValidDensk\ValidDenskWeb\Student.cs 38 28 ValidDenskWeb
|
 |
DenisK
IdeaBlade
Joined: 25-Aug-2010
Posts: 715
|
Post Options
Quote Reply
Posted: 13-Sep-2010 at 12:56pm |
Please try again with this link:
http://wikisend.com/download/867508/SilverlightApplication1.zip
|
 |
bala
Groupie
Joined: 18-Aug-2010
Location: Brazil
Posts: 54
|
Post Options
Quote Reply
Posted: 13-Sep-2010 at 4:33am |
|
Hey Denisk
Thanks for your sharing but this file is corrupted and not able to open in my side would you like to share again..
Thanks
|
 |
DenisK
IdeaBlade
Joined: 25-Aug-2010
Posts: 715
|
Post Options
Quote Reply
Posted: 10-Sep-2010 at 2:36pm |
I've created a simple solution that should help you get started. Please click the link below to download.
http://wikisend.com/download/445970/SilverlightApplication1.zip
|
 |
bala
Groupie
Joined: 18-Aug-2010
Location: Brazil
Posts: 54
|
Post Options
Quote Reply
Posted: 10-Sep-2010 at 11:10am |
|
I already been went thru this page This validation work only on Data form or grid... How can I populate error on text box.
Thanks
|
 |
DenisK
IdeaBlade
Joined: 25-Aug-2010
Posts: 715
|
Post Options
Quote Reply
Posted: 10-Sep-2010 at 11:01am |
I see. There is a section on our Wiki that describes how to implement Data Verification with DevForce. Here is the link
That should help you get started.
|
 |
bala
Groupie
Joined: 18-Aug-2010
Location: Brazil
Posts: 54
|
Post Options
Quote Reply
Posted: 10-Sep-2010 at 10:58am |
|
No.. I did not implemented any manual code
|
 |
DenisK
IdeaBlade
Joined: 25-Aug-2010
Posts: 715
|
Post Options
Quote Reply
Posted: 10-Sep-2010 at 10:55am |
|
Have you implemented an IVerifierProvider interface anywhere inside your class?
|
 |
bala
Groupie
Joined: 18-Aug-2010
Location: Brazil
Posts: 54
|
Post Options
Quote Reply
Posted: 09-Sep-2010 at 4:28am |
|
Hi Denisk
This is how I am getting records on Datagrid
public ObservableCollection<STUDENT> Students { get; private set; } var query = _mgr.STUDENTs; query.ExecuteAsync(op => { op.Results.ForEach(Students.Add);}, null);
Like this I am showing details with Clicking on Data grid private void StudentGrid_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (StudentGrid.SelectedItem == null) { return; } else { StudentSorders aa = (StudentSorders)StudentGrid.SelectedItem; _id = aa.ID; txtName.Text = aa.NOME; } } Here after diplaying record on txtbox i am doing add/delete/ update operation and this time i need validation.
private void btnUpdate_Click(object sender, RoutedEventArgs e) { STUDENT stud = Students.Where(t => t.ID == Convert.ToDecimal(_id)).Single(); stud.NAME = txtName.Text; StudentGrid.ItemsSource = Students; _mgr.SaveChangesAsync(); }
Thanks
|
 |
DenisK
IdeaBlade
Joined: 25-Aug-2010
Posts: 715
|
Post Options
Quote Reply
Posted: 08-Sep-2010 at 2:57pm |
Bala;
How are you binding your UI control and Data Context?
|
 |