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

Increase Height of SfDataGrid after inserting a new row

Hi,

I guess, that this is easily implemented. But currently I've no idea. 

VerticalAlignment = "Strech" and VerticalContentAlignment = "Strech" doesn't work.

Google search and forum search gave no hints.

Regards

Harald

5 Replies

SV Srinivasan Vasu Syncfusion Team November 10, 2016 06:24 AM UTC

Hi Harald, 
 
Thanks for contacting Syncfusion support. 
 
We have checked your query and we have prepared a sample based on your requirement. In this sample, we have loaded SfDataGrid inside the Grid along with RowDefinition. While adding new record in the collection, automatically SfDataGrid height has been increased. 
 
Please refer the below code example. 
 
Code Example: 
 
<Grid> 
        <Grid.RowDefinitions> 
            <RowDefinition Height="auto"/> 
            <RowDefinition Height="auto"/> 
        </Grid.RowDefinitions> 
        <syncfusion:SfDataGrid 
                                                 Grid.Row="0"  
                                                 ……. 
                                                 ……. 
           </syncfusion:SfDataGrid>                                            
 
        <Button Width="100" Height="50" Grid.Row="1" Click="Button_Click"  Content="AddItem"/> 
    </Grid> 
 
 
If your requirement is differ from this, please let us know the more details and revert the modified sample. 
 
Regards, 
Srinivasan 



HB Harald Betzler November 10, 2016 11:07 AM UTC

Hi Srinivasan,

thank you. This works perfectly.

But now the surrounding SfAccordionItem won't grow, although there is VerticalAlignment and VerticalContentAlignment configured to "Stretch" and Height to "Auto".

Regards

Harald


HB Harald Betzler November 10, 2016 11:23 AM UTC

To be more exact:

I've a View (UserControl) with the discussed SfDataGrid within a Grid. With your help, the increasing height works.

This view is placed within a Grid and this is (the only) part of a SfAccordionItem within a SfAccordion within a Grid.

The structure looks like:
<Grid>
    <syncfusion:SfAccordion>
        <syncfusioin:SfAccordionItem>
            <Grid>
                <view:MyView />
            </Grid>
        </syncfusioin:SfAccordionItem>
    </syncfusion:SfAccordion>
</Grid>

And MyView contains:
<Grid>
    <syncfusion:SfDataGrid />
</Grid>







HB Harald Betzler November 14, 2016 09:27 PM UTC

Hi,

may I help with any further information?

Regards

Harald


VR Vijayalakshmi Roopkumar Syncfusion Team November 15, 2016 12:17 PM UTC

Hi Harald,

We were able to reproduce the reported issue with the SfAccordion and have logged defect report regarding this. A support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents 

Regards,
Vijayalakshmi V.R. 


Loader.
Up arrow icon