We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Empty grid - gridlines

Hi,

we are evaluating your controls before we are 100% sure that we will buy them.

Basically we have a need for one special thing that we couldn't find in any competitors datagrid equivalents, but we can't find it here too.

This is the problem:
1. In all our datagrids  WE define the columns (we never use autogenerate)
2. Before the datagrid is bound to a dataset /datatable /dataview /collection /etc... the datagrid should display empty with gridlines
3. When bound the data appears, but if there's for example 2-3 rows and on the datagrid in visible area can fit 10 rows, we want to 
see the 2-3 rows and fill the remaining space with the same empty grid with gridlines

Basically we want what you can see on the right side of this image:


If you could show me how to accomplish that in your SFDataGrid that would be great, and it would be the final push towards
buying your product.

Thank you in advance, Mega. 


12 Replies

ME MegaMan September 23, 2017 06:07 PM UTC

Hi Syncfusion,


still no replies? 


I'm getting worried that it's impossible to make,

can at least someone give me any info?


Thanks in advance.


DY Deivaselvan Y Syncfusion Team September 24, 2017 08:12 AM UTC

Hi MegaMan,

We regret for the inconvenience.

Currently we are ensuring the stability of all the grid functionalities when include this customization and fixing the issues with high priority, so that its delaying. Since we are facing some technical difficulties to update the empty grid lines while changing the Grid size based on the window size at runtime. So could you please confirm us either you will do runtime grid size change or you are using the grid control in fixed size? Please provide your confirmation on this and that will help us to provide the appropriate customization sample as much as earlier.

Please let us know if you have any further questions.

Regards,
Deivaselvan



ME MegaMan September 24, 2017 08:17 AM UTC

Hi,

thanks for fast reply.

Yes, in our case we allow users to change the column and row sizes as they see fit. 

We also use the functionality to save each users grid layout and once it's loaded back it restores that layout (for example when application is run again).

We use datagrid on a lot of windows in our app and basically this functionality is crucial to us, otherwise it looks like blank spaces, which is why i've asked for your help.


Thank you again in advance. 





DY Deivaselvan Y Syncfusion Team September 24, 2017 08:29 AM UTC

Hi MegaMan,

Thank you for your update.

We will consider all your mentioned scenarios while ensuring the stability of your requirement and update you the customized application on or before September 25, 2017.

Please let us know if you have any other questions.

Regards,
Deivaselvan



ME MegaMan September 24, 2017 08:30 AM UTC

Thank you.

I will be eagerly awaiting your update.





MK Muthukumar Kalyanasundaram Syncfusion Team September 26, 2017 03:42 AM UTC

Hi MegaMan, 
 
As per your requirement, we have prepared simple sample to achieve your reported scenario. In that attached sample, we have loaded the SfDataGrid with minimum number of rows and loaded the empty row in the empty space of the grid. While performing such operation like filtering, grouping, sorting and adding/delecting records at runtime, based on this windows size the records will be arranged in SfDataGrid. For your reference, we have attached the sample in the below location. 
 
 
For more details about SfDataGrid, you can refer the below link, 
 
Please let us know if you have any other questions. 
 
Regards, 
Muthukumar K    



ME MegaMan September 26, 2017 09:57 AM UTC

Hi,

thank you for your reply. 

This is the effect I was looking to achieve.  There is only one problem with it which I will present with this gif image: 




Basically what happens is after resizing the window a scrollbar appears that scrolls half the row up and down (even if  there isn't more data to scroll). 

Could you just update the example not to do that?  I've tried removing groups and summaries to get clean rows but the problem persists like it is shown on 
the GiF image. 

 
Thank you in advance. 


MK Muthukumar Kalyanasundaram Syncfusion Team September 26, 2017 10:59 AM UTC

Hi MegaMan, 

Sorry for the inconvenience caused. 

The reported “after resizing the window a scrollbar appears that scrolls half the row up and down” problem has be resolved. In that below attached sample, you can perform  such operation like filtering, sorting and adding/deleting records at runtime, based on this windows size the records will be arranged in SfDataGrid.  For your reference, we have attached the modified sample in the below location. Could you please refer to it. 
 
 
Please let us know us if you have any other questions. 
 
Regards, 
Muthukumar K 



ME MegaMan September 26, 2017 11:23 AM UTC

yes, this is exactly what I needed.  Thank you! 

Just one more, short question.  Since this drawing is done in code behind, is there a way to attach it to datagrid 

so we won't have to write in each window's code behind that uses datagrid the same code and avoid repeating? 






MK Muthukumar Kalyanasundaram Syncfusion Team September 27, 2017 11:57 AM UTC

Hi MegaMan, 

Thank you for your update. 

We regret to inform you that we are unable to move your reported behavior to our source because it will affect our default behavior of dataGrid. So we suggest you to implement this behavior (apply windows size customization to multiple grid)  by using Behavior concept as like below code. You can use this DataGridSizeChange.cs where ever you want to access on your application. For your reference, we have attached sample in below location. In that sample, we have loaded two SfDataGrid with minimum number of rows and loaded the empty row in the empty space of grid. Could you please refer to it. 

Code Snippet: 

<!-- Add the Windows.Interactivity namespace in windows--> 
xmlns:I="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" 

<syncfusion:SfDataGrid x:Name="sfGrid1"  
                        Grid.Row="0" 
                        Grid.Column="2" 
                        AllowEditing="True" 
                        AllowDeleting="True"                                 
                        ColumnSizer="Star"  
                        HeaderRowHeight="40" 
                        AddNewRowPosition="Top"                                 
                        AllowFiltering="True" 
                        AutoGenerateColumns="False" 
                        LiveDataUpdateMode="AllowSummaryUpdate" 
                        ItemsSource="{Binding UserDetails1}"                                                               
                        ShowRowHeader="False"> 
 
    <!--  SfDataGrid  windows size change Behavior  --> 
    <I:Interaction.Behaviors> 
        <local:DataGridSizeChange /> 
    </I:Interaction.Behaviors> 
 
</syncfusion:SfDataGrid> 



Please let us know if you have any other questions. 

Regards, 
Muthukumar K 



ME MegaMan September 27, 2017 12:05 PM UTC

Yes, this is exactly what I wanted! 

Very nice, thank you for the help! 

If I need any further help I will contact you through your forums, you have been very helpful! 


Thank you!



MK Muthukumar Kalyanasundaram Syncfusion Team September 28, 2017 05:50 AM UTC

Hi MegaMan 

We are glad that your requirement has been met. Please contact us if you need any other assistance and we will be happy to help you
 
Regards,  
Muthukumar K  


Loader.
Up arrow icon