Multiselect horizontally selects hidden columns

Hi - I have implemented multiselect but faces the issue that when selecting from column to next-column, hidden columns in between get selected too. This is not a behavior I want and consider this to be a bug. 


Please see att. project. 

If you choose a value from a cell in column A, drag to column C, column B is also pasted with a value.

Column B is hidden, but gets selected anyway. 



Attachment: DataGridBlazormultiselect_57febd9a.zip

1 Reply

VN Vignesh Natarajan Syncfusion Team November 8, 2021 06:42 AM UTC

Hi Soren, 
 
Greetings from Syncfusion support.  
 
Query: “ I have implemented multiselect but faces the issue that when selecting from column to next-column, hidden columns in between get selected too. 
 
We have analyzed your query and we are able to reproduce the reported behavior at our end also (i.e.) value gets auto filled for visible hidden columns also. We suggest you to resolve the reported issue by defining the AllowEditing property as false for visibility hidden column. So that it value will not be changed while dragging through the columns for autofill.  
 
Refer the below code example for your reference. 
 
<GridColumns> 
    <GridColumn Field=@nameof(Order.OrderID) HeaderText="ProductKey" AllowEditing="false" 
                IsPrimaryKey="true" Width="100" 
                Visible="false" ShowInColumnChooser="false" /> 
  
    <GridColumn Field=@nameof(Order.CustomerID_A) HeaderText="CustomerID_A" AllowEditing="true" 
                TextAlign="TextAlign.Left" Width="100" 
                Visible="true" ShowInColumnChooser="true"> 
    </GridColumn> 
    <GridColumn Field=@nameof(Order.CustomerID_B) HeaderText="CustomerID_B" AllowEditing="false" 
                TextAlign="TextAlign.Left" Width="100" 
                Visible="Orders.Any(x => x.CustomerID_B != null)" ShowInColumnChooser="true"> 
    </GridColumn> 
    <GridColumn Field=@nameof(Order.CustomerID_C) HeaderText="CustomerID_C" AllowEditing="true" 
                TextAlign="TextAlign.Left" Width="100" 
                Visible="true" ShowInColumnChooser="true"> 
    </GridColumn> 
    <GridColumn Field=@nameof(Order.CustomerID_D) HeaderText="CustomerID_D" AllowEditing="true" 
                TextAlign="TextAlign.Left" Width="100" 
                Visible="true" ShowInColumnChooser="true"> 
    </GridColumn> 
</GridColumns> 
 
  
Please get back to us if you have further queries or if you are facing any other issues with above solution.  
 
Regards, 
Vignesh Natarajan  


Loader.
Up arrow icon