Excel-like Fill Down Functionality

Hi, 

I am trying to recreate a Excel-like feature, fill down with the same cell value. Essentially clicking a button or option that would then fill the entire column with the same value as the first cell from that column. Does SfDataGrid provide a way to do this? If so, can someone point me in the right direction?

Thanks, 
Aurea

3 Replies

JG Jai Ganesh S Syncfusion Team April 19, 2018 03:24 AM UTC

Hi Aurea, 
 
We cannot provide direct support for ExcellLikeFillSelection in SfDataGrid but you can achieve your requirement in SfDataGrid by customize the GridCellSelectionController class. In this sample we have get the first selected cell value and set the value to all dragged cells if single cell is selected in single row and if cells selected in two different rows get the difference of that selectedcells value and paste the increment of that value in dragged rows in ProcessPointerRelease method.   
   
We have prepared the sample based on your requirement, you can download it from below mentioned location.   
  
Regards, 
Jai Ganesh S


AD Aurea Del Moral April 19, 2018 03:18 PM UTC

Thanks for the reply. I will check out the sample code in detail. However I noticed it is a WPF project. My project is UWP. Is there a UWP version for this?

The other issue I see is that this uses GridCellSelectionController, which only works if the SelectionUnit is Any or Cell. How can I make this work if my SelectionUnit is Row and I need to use GridSelectionController instead?

Thanks, 
Aurea


JG Jai Ganesh S Syncfusion Team April 20, 2018 12:52 PM UTC

Hi Aurea,  
We have prepared a sample for ExcellLikeFillSelection in SfDataGrid by customize the GridCellSelectionController class in UWP platform and please find the sample from the below location, 
In this sample, we have performed the fill selection for the selected cells. Hence, we have used the SelectionUnit is Cell and using GridCellSelectionController. If we used the SelectionUnit as Row then it’s not possible to change the values for the selected cells. 
Regards, 
Jai Ganesh S 


Loader.
Up arrow icon