xrndMember's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
New Members
Active Posts:
13 (0.02 per day)
Joined:
04-October 12
Profile Views:
388
Last Active:
User is offline Dec 04 2012 04:10 AM
Currently:
Offline

Previous Fields

Dream Kudos:
0
Icon   xrndMember has not set their status

Posts I've Made

  1. In Topic: Combobox force Validation when no value is Selected

    Posted 1 Dec 2012

    well,

    Not dat intension..but sorry if it got so..
  2. In Topic: Combobox force Validation when no value is Selected

    Posted 1 Dec 2012

    Yeah,
    I agree wid u on dat.
    I surely will nd will post back the solution as soon as i get..
    thanks dear.
  3. In Topic: Combobox force Validation when no value is Selected

    Posted 1 Dec 2012

    Surely tlhIn`toq.
  4. In Topic: Combobox force Validation when no value is Selected

    Posted 1 Dec 2012

    well then that answer will be disappointing to you.
    I have just tried this code and the code for textbox worked abs fine.
    the function is this.
    private void errorCheckTextBox(System.Windows.Controls.Control controlName)
            {
                System.Windows.Controls.TextBox mytext = controlName as System.Windows.Controls.TextBox;
                if (String.IsNullOrEmpty((mytext.Text)) == true)
                {
                    Validationerror validationerror = new Validationerror(new NumberValidator(),
                                                      controlName.GetBindingExpression(System.Windows.Controls.TextBox.TextProperty), "Field Empty", null);
                    Validation.MarkInvalid(controlName.GetBindingExpression(System.Windows.Controls.TextBox.TextProperty), validationerror);
                    ErrorExists = true;
                }
            }
    


    but for combobox i hardly found things.and m very new to wpf. this is my 1st app in WPF. so not so well versed.

    well the xaml for the target control is
    <TextBox x:Name="txtDescription" Height="75"  HorizontalAlignment="Left" Margin="6,6,0,0"  VerticalAlignment="Top"
                     Width="223" Grid.Column="1" Grid.Row="3" Grid.RowSpan="2" HorizontalScrollBarVisibility="Auto"
                     VerticalScrollBarVisibility="Auto" TextChanged="txtDescription_TextChanged">
                <Binding Path="ModelName"  UpdateSourceTrigger="PropertyChanged" ValidatesOnDataErrors="True">
                    <Binding.ValidationRules>
                        <ExceptionValidationRule />
                    </Binding.ValidationRules>
                </Binding>
            </TextBox>
    
  5. In Topic: Combobox force Validation when no value is Selected

    Posted 1 Dec 2012

    hi
    Any idea how to fix this?

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Private

Friends

xrndMember hasn't added any friends yet.

Comments

xrndMember has no profile comments yet. Why not say hello?