Friday, February 25, 2011

WPF Listview selection item change

List view selection change is one of interesting matter in WPF. When you will select the item from list view. It will automatically fill field of the corrosponding item. Consider the following Selection change Event:

 private void unitNamelistView_SelectionChanged(object sender, SelectionChangedEventArgs e)
            if (unitNamelistView.SelectedIndex > -1)
   /*====Setting Selected item in Entity=====*/
                EUnitMeasurement seletedUnit = (EUnitMeasurement)unitNamelistView.SelectedItem;
                /*==== Filling UI Field From entity======*/
    unitIDtextBox.Text = seletedUnit.Id;
                unitAbbrivationtextBox.Text = seletedUnit.UnitName;
                fullNameUnittextBox.Text = seletedUnit.FullNameOfUnit;
                unitCommenttextBox.Text = seletedUnit.UnitComment;


vfpoledeb.1 provider is not registered on the local machine

Have u Install VFP Ole DB Provider in your System ? If No then Please Install it from following link.