Behavior of AllowNullInput

Hello,

I recently upgraded from v16.4.0.52 to v18.1.0.42. I found that the behavior of the control has changed when it comes to AllowNullInput. Previously, the user could enter a value that was not in the value, and only when he shifted focus, the value converted to null. 

Now when AllowNullInput= true, as soon as edit causes the search to fail, the text box clears. And AllowNullInput= false allows values that are NOT in the items.

Can this be prevented? Is there a way to enforce that the value should be in the items and also allow user to edit a wrong input?

Thanks for any help.

Regards.

24 Replies

YO Yogesh May 28, 2020 05:17 PM UTC

Noticed something else, which in my opinion is a bug. If AllowNullInput =false, and the user enters a value which is not in the list, the selected value remains the last valid value entered in the textbox.

For eg:
Items:
HelloAll
HelloSyncfusion
HelloWorld

If I will type Hello, HelloAll will be the autocomplete selected item. But if I press x for example, the textbox will continue to show Hellox, but the selected item will remain HelloAll.

As an example to the other problem: if I set AllowNullInput=true, as soon as I typed the 'x' in Hellox, the whole text box will be cleared.



SS Susmitha Sundar Syncfusion Team May 30, 2020 10:45 AM UTC

Hi Yogesh, 
 
Thank you for using Syncfusion controls. 
 
 
 
Regards, 
Susmitha S 



SS Susmitha Sundar Syncfusion Team June 2, 2020 12:03 PM UTC

 
Thank you for your patience. 
 
We have created bug report for the reported issue. We will fix this issue and provide you with patch on June 5, 2020 
   
We appreciate your patience until then.  
 
You can track the status of this report through the following feedback link,   
 
 
Note: The provided feedback link is private, and you need to login to view this feedback.   
 
 
Regards, 
Susmitha S 



YO Yogesh June 2, 2020 04:06 PM UTC

Thanks for the response.

Any suggestion on the second issue: Allowing user to edit a wrong input when AllowNullInput= true? I don't want the textbox to clear when a wrong input is made. Is there any way to stop that so that it clears/sets null value only when the focus is lost?



SS Susmitha Sundar Syncfusion Team June 4, 2020 02:08 AM UTC

Hi Yogesh,   
   
Thank you for your patience. 
   
Currently, we are checking the feasibility to achieve your requested behavior. We will validate and update you the details on or before June 5, 2020.   
   
We appreciate your patience until then.   
   
Regards,   
Susmitha S   



SS Susmitha Sundar Syncfusion Team June 5, 2020 05:46 PM UTC

Hi Yogesh,    
    
Sorry for the inconvenience caused.   
 
Currently, we are working on this we will provide the both patch and the further details of issue “Invalid text clears while typing when AllowNullInput true” on June 9, 2020. 
 
We appreciate your patience until then. 
 
Regards, 
Susmitha S 



SS Susmitha Sundar Syncfusion Team June 9, 2020 02:52 PM UTC

Hi Yogesh,     
     
We regret for the inconvenience caused.    
  
Currently, we are working on this with high priority. we will provide the patch on June 12, 2020.  
  
We appreciate your patience until then.  
  
Regards,  
Susmitha S  



SS Susmitha Sundar Syncfusion Team June 13, 2020 05:22 PM UTC

Hi Yogesh, 
 
We have fixed the both issues “Invalid value maintained in Editor when AllowNullInput is false and  Invalid text clears while typing when AllowNullInput true“. You can download the patch from following location.  
 
  v18.1.0.42 
Recommended approach – exe will perform automatic configuration       
Please find the patch setup here:   
      
Advanced approach – use only if you have specific needs and can directly replace existing assemblies for your build environment                        
Please find the patch assemblies alone from:   
 
  
Assembly Version: 18.1.0.42 
Installation Directions:  
This patch should replace the files “Syncfusion.SfGrid.WPF” under the following folder.  
$system drive:\ Files\Syncfusion\Essential Studio\$Version # \precompiledassemblies\$Version#\4.0  
Eg : $system drive:\Program Files\Syncfusion\Essential Studio\ 18.1.0.42\precompiledassemblies\ 18.1.0.42\4.0  
   
To automatically run the Assembly Manager, please check the Run assembly manager checkbox option while installing the patch. If this option is unchecked, the patch will replace the assemblies in precompiled assemblies’ folder only. Then, you will have to manually copy and paste them to the preferred location, or you will have to run the Syncfusion Assembly Manager application (available from the Syncfusion Dashboard, installed as a shortcut in the Application menu) to re-install assemblies.  
   
Note 
To change how you receive bug fixes, ask your license management portal admin to change your project’s patch delivery mode.  
   
   
Disclaimer:  
If you have received other patches for the same version for other products, please apply all patches in the order received. Please note that we have created this patch for version 18.1.0.42 specifically to resolve the following issue reported in the forum 154664. This fix will be included in our Volume 2 release which is expected on June 2020.  
 
Regards, 
Susmitha S 



YO Yogesh June 14, 2020 08:53 AM UTC

Thanks a lot. I can confirm that both issues have been fixed. Much appreciated.


VS Vijayarasan Sivanandham Syncfusion Team June 15, 2020 06:19 AM UTC

Hi Yogesh,

Thanks for the update.

We are glad to know that the reported issue has been resolved. Please get back to us if you have any other queries. As always, we will happy to assist you
😊

Regards,
Vijayarasan S




YO Yogesh June 15, 2020 08:53 AM UTC

Hi Vijaya,

Unfortunately another bug has been introduced while fixing the other two:

With example:
If the SfMultiColumnDropDownControl has two columns, Code and Name, DisplayMember is Name and FilterRecord is as follows:
if (item is StudentDto Student)
{
return Student.Code.StartsWith(SearchText, StringComparison.OrdinalIgnoreCase) ||
   Student.Name.Contains(SearchText, StringComparison.OrdinalIgnoreCase);
}

If the user types a code and does keyboard interaction (presses enter or changes selection using arrow keys and then presses enter), the text box is cleared and selecteditem is set to null.
If the user types a partial name (as FilterRecord allows Contains instead of StartsWith) the same thing happens.

In other words, keyboard selection only works if the DisplayMember name startswith the value in the textbox.

PS: Please post the patch for v18.1.0.52 so I can update to the said version.


VS Vijayarasan Sivanandham Syncfusion Team June 16, 2020 04:48 PM UTC

Hi Yogesh,

Thanks for the update.

We have created bug report for the reported issue “Selecteditem is set to null when applying filter based on various column value of SfMultiCoumnDropDownControl”. We will fix this issue and provide you with patch June 19, 2020.

We will update the feedback link for this bug on 17th June 2020.

We appreciate your patience until then.

Regards,
Vijayarasan S
 



VS Vijayarasan Sivanandham Syncfusion Team June 18, 2020 05:06 PM UTC

Hi Yogesh,

Thank you for your patience.

We will fix this issue and provide you with patch June 19, 2020.

You can track the status of this report through the following feedback link,

Feedback link:
https://www.syncfusion.com/feedback/15294/selecteditem-is-set-to-null-when-applying-filter-based-on-various-column-value-of

Note: The provider feedback link is private, and you need to login to view this feedback.

We appreciate your patience until then.

Regards,
 
Vijayarasan S 



VS Vijayarasan Sivanandham Syncfusion Team June 19, 2020 02:26 PM UTC

Hi Yogesh,

Thank you for your patience.

We have fixed the issue “Selecteditem is set to null when applying filter based on various column value of SfMultiColumnDropDown” and you can download the patch from following location.

v18.1.0.52
 
Recommended approach – exe will perform automatic configuration       
Please find the patch setup here:   

 
http://syncfusion.com/Installs/support/patch/18.1.0.52/256336/F154664/SyncfusionPatch_18.1.0.52_256336_6192020092121286_F154664.exe

Advanced approach – use only if you have specific needs and can directly replace existing assemblies for your build environment                       
 
Please find the patch assemblies alone from:  
  
Assembly Version: 18.1.0.52 
Installation Directions:  
This patch should replace the files “Syncfusion.SfGrid.WPF” under the following folder.  
$system drive:\ Files\Syncfusion\Essential Studio\$Version # \precompiledassemblies\$Version#\4.0  
Eg : $system drive:\Program Files\Syncfusion\Essential Studio\18.1.0.52\precompiledassemblies\18.1.0.52\4.0  
   
To automatically run the Assembly Manager, please check the Run assembly manager checkbox option while installing the patch. If this option is unchecked, the patch will replace the assemblies in precompiled assemblies’ folder only. Then, you will have to manually copy and paste them to the preferred location, or you will have to run the Syncfusion Assembly Manager application (available from the Syncfusion Dashboard, installed as a shortcut in the Application menu) to re-install assemblies. 

FeedBack Link:
https://www.syncfusion.com/feedback/15294/selecteditem-is-set-to-null-when-applying-filter-based-on-various-column-value-of

 
Note:  
To change how you receive bug fixes, ask your license management portal admin to change your project’s patch delivery mode.  
   
   
Disclaimer:  
If you have received other patches for the same version for other products, please apply all patches in the order received. Please note that we have created this patch for version 18.1.0.52 specifically to resolve the following issue reported in the Forums 154664. This fix will be included in our Volume 2 release which is expected on June 2020.  
 
Regards, 
Vijayarasan S 



YO Yogesh June 19, 2020 03:35 PM UTC

The issue with filter is fixed now, but yet another bug has been introduced.

A misspelling just hangs the whole program when AllowNullInput = False. AllowNullInput = True is working as intended now.


SS Susmitha Sundar Syncfusion Team June 22, 2020 05:26 PM UTC

Hi Yogesh, 
 
Thank you for the update. 
 
We are not clear with your reported scenario “misspelling just hangs the whole program when AllowNullInput = False”. Can you please provide below things? 
 
1.       How many records you are using in SfDataGrid? 
2.       Video reference. 
 
It will be helpful for us to check on it and provide you the solution at the earliest.   
 
Regards, 
Susmitha S 



YO Yogesh June 23, 2020 06:07 AM UTC

Please ignore that. It was a some GAC issue most probably. Uninstalled and reinstalled syncfusion assemblies and the issue is now gone.

Thanks a lot. Much appreciated. Keep up the good work.


SS Susmitha Sundar Syncfusion Team June 24, 2020 07:20 AM UTC

Hi Yogesh, 
 
Thanks for the update. 
 
We are glad to know that the reported problem has been resolved at your end. Please let us know if you have any further queries on this. We are happy to help you. 
 
Regards, 
Susmitha S 



YO Yogesh July 15, 2020 12:27 PM UTC

Another issue which I noticed is that if AllowInput = true and you set the SelectedItem in code, the value displayed in the Textbox is not cleared.


VS Vijayarasan Sivanandham Syncfusion Team July 16, 2020 12:27 PM UTC

Hi Yogesh,

Thanks for the update.

Based on provided information we are unclear about your issue, that SelectedItem set in code behind in SfMultiColumnDropDownControl or Code means your column in SfMultiColumnDropDownControl. Can you please share us below things?
       
        1. Brief replication procedure of the reported issue
        2. Video illustration of the reported issue 
It will be helpful for us to check on it and provide you the solution at the earliest.     
   
Regards,   
Vijayarasan S 



YO Yogesh July 16, 2020 12:41 PM UTC

Hello,

How to reproduce:

Let's assume we have one edit and one button on a form:
<sync:SfMultiColumnDropDownControl 
ItemsSource="{Binding Students}" AllowNullInput="True" AllowSpinOnMouseWheel="False"
SelectedItem="{Binding SelectedStudent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
DisplayMember="Name" Grid.Column="1" Margin="2" PopupWidth="360" IsAutoPopupSize="False" BorderThickness="1"
AllowAutoComplete="True" AllowIncrementalFiltering="True" AutoGenerateColumns="False"
ResizingThumbVisibility="Hidden" AllowImmediatePopup="True">
...
</sync:SfMultiColumnDropDownControl>

After we select the value in the editor, we click the button (focusable) to programmatically set the SelectedStudent to null.

This will not clear the value (i.e. Student's Name) displayed in the SfMultiColumnDropDownControl's text box, but it should.


VS Vijayarasan Sivanandham Syncfusion Team July 19, 2020 03:05 PM UTC

Hi Yogesh,

Thanks for the update. 
 
We could able to reproduce your reported issue “SelectedItem not null when set programmatically in SfMultiColumnDropDown” from our end. Currently, we are checking the feasibility to fix this issue from our end. We will validate and update you details on July 21, 2020. 
 
We appreciate your patience until then. 
 
Regards, 
Vijayarasan S 



VS Vijayarasan Sivanandham Syncfusion Team July 21, 2020 05:18 PM UTC

Hi Yogesh,

Sorry for the inconvenience caused.

We are currently working on “SelectedItem not null when set programmatically in SfMultiColumnDropDown” and we need two more business days to validate this. We will update you with further details on or before July 23, 2020.

We appreciate your patience until then. 
 
Regards, 
Vijayarasan S

 



VS Vijayarasan Sivanandham Syncfusion Team July 22, 2020 01:00 PM UTC

Hi Yogesh,

Thank you for your patience.

We have checked the reported issue “SelectedItem not null when set programmatically in SfMultiColumnDropDown” and unable to replicate the issue from our end. it is working fine as expected. Please find the tested sample and video demo from our end in the below link, 
 

We suspect that your code behind set the SelectedStudent property value not implements with INotifyPropertyChanged. Please refer the below code snippet,

 
private object _selectedItem; 
         
public object SelectedStudent 
{ 
            get 
            { 
                return _selectedItem; 
            } 
            set 
            { 
                _selectedItem = value; 
                RaisePropertyChanged("SelectedStudent"); 
            } 
} 

if you still facing the same issue? If yes, please modify the sample based on your scenario.  

If we misunderstood your requirement, please provide more information regarding the requirement. This would help us to proceed further.


Regards,
Vijayarasan S

 


Loader.
Up arrow icon