This is a migrated thread and some comments may be shown as answers.

combox edit mode

1 Answer 64 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Niko
Top achievements
Rank 2
Niko asked on 19 Oct 2009, 10:09 AM

I need to synchronize updates in edit mode I have chosen to display the information of the item.

I set  IsTextSearchEnabled = "False"  FilteringMode = "None" 

 But now when I enter a character, it calls the selectAll method. I need this feature, but I do not want it was selectAll

Help me !

<Common:IscCombo x:Name="cboISBN" IsTextSearchEnabled="False" DataContext="{Binding}" FilteringMode="None" StaysOpenOnEdit="True"  SelectedTextPath="strValue"  ItemsSource="{Binding Path=DataModel.ISBN,Mode=TwoWay}"  KeyDown="cboISBN_KeyDown" KeyUp="cboISBN_KeyUp" SelectedItem="{Binding Path=DataModel.ISBNSelected,Mode=TwoWay}"  DisplayMemberPath="strValue" Style="{StaticResource ComboBoxStyle}"/> 
      private void cboISBN_KeyUp(object sender, KeyEventArgs e)  
      {  
         int iPos = _viewModel.DataModel.ISBN.IndexOf(_viewModel.DataModel.ISBNSelected);  
         ISBNData oNew = new ISBNData() { strValue = cboISBN.Text };  
         _viewModel.DataModel.ISBN.RemoveAt(iPos);  
         _viewModel.DataModel.ISBN.Insert(iPos, oNew);  
         _viewModel.DataModel.ISBNSelected = _viewModel.DataModel.ISBN[iPos];  
         //cboISBN.IsEditable = true;  
      } 
Data
      private ObservableCollection<ISBNData> _iSBN;  
      public ObservableCollection<ISBNData> ISBN  
      {  
         get 
         {  
            return _iSBN;  
         }  
         set 
         {  
            if (value != _iSBN)  
            {  
               _iSBN = value;  
               OnPropertyChanged("ISBN");  
            }  
         }  
 
      }  
 
      private ISBNData _iSBNSelected;  
      public ISBNData ISBNSelected  
      {  
         get 
         {  
            return _iSBNSelected;  
         }  
         set 
         {  
            if (value != null && value != _iSBNSelected)  
            {  
               if (value !=null && value.strValue == "<NEW>")  
               {  
                  ISBNData o = new ISBNData(){strValue=string.Empty};  
                  ISBN.Insert(0, o);  
                  _iSBNSelected = o;  
               }  
               else 
               {  
                  _iSBNSelected = value;  
               }  
               OnPropertyChanged("ISBNSelected");  
            }  
         }  
 
      } 


Init Method
                           this.ItemDataModel.ISBN = new ObservableCollection<ISBNData>();  
                           ISBNData strNew = new ISBNData() { strValue = string.Empty };  
                           this.ItemDataModel.ISBN.Add(strNew);  
                           this.ItemDataModel.ISBN.Add(new ISBNData() { strValue = "<NEW>"});  
                           //this.ItemDataModel.ISBN.Add(GVariable.gsvNew);  
                           this.ItemDataModel.ISBNSelected = strNew; 

1 Answer, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 22 Oct 2009, 11:48 AM
Hello,

Could you please, open a new support ticket and attach the complete application? It would be much easier to fix the problem if we have a working application where we can observe what's happening.

Kind regards,
Valeri Hristov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
ComboBox
Asked by
Niko
Top achievements
Rank 2
Answers by
Valeri Hristov
Telerik team
Share this question
or