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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

resize rows on column changed

Thread ID:

Created:

Updated:

Platform:

Replies:

119122 May 12,2015 07:23 PM UTC May 13,2015 01:06 PM UTC WPF 1
loading
Tags: SfDataGrid
Henry Harris
Asked On May 12, 2015 07:23 PM UTC

How do I get the rowcount of the datagrid?

Also when I try to follow the example on how to force a redraw after remeasureing the rows I am getting an error 

Error 44 'Syncfusion.UI.Xaml.Grid.SfDataGrid' does not contain a definition for 'GetVisualContainer' and no extension method 'GetVisualContainer' accepting a first argument of type 'Syncfusion.UI.Xaml.Grid.SfDataGrid' could be found (are you missing a using directive or an assembly reference?)

Ashok N [Syncfusion]
Replied On May 13, 2015 01:06 PM UTC

Hi Henry,

Thank you for contacting Syncfusion support,

We have analyzed your query and you can resolve this problem by adding Syncfusion.UI.Xaml.Grid.Helpers namespace within the file. When you are trying to get the VisualContailner, you need to use Syncfusion.UI.Xaml.Grid.Helpers namespace in SfDataGrid. And you can get the RowCount by using VisualContainer.RowCount property. Please refer the below code example:

using Syncfusion.UI.Xaml.Grid.Helpers;


private void Button_Click_1(object sender, RoutedEventArgs e)

{

var visualContainer = this.datagrid.GetVisualContainer();

int rowcount=visualContainer.RowCount;

}

Please let us know if you require further assistance.

Thanks,

Ashok


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;