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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Refresh column size

Thread ID:

Created:

Updated:

Platform:

Replies:

117669 Nov 25,2014 08:41 PM UTC Nov 27,2014 05:23 PM UTC WPF 3
loading
Tags: SfDataGrid
Charles Ricard
Asked On November 25, 2014 08:41 PM UTC

    I have this SfDatagrid:
    <syncfusion:SfDataGrid x:Name="grid"
                            AllowGrouping="False"
                            AllowDraggingColumns="False"
                            AllowResizingColumns="True"
                            AutoGenerateColumns="False"
                            SelectionMode="Single"
                            AllowSorting="True"
                            AllowFiltering="True"
                            NavigationMode="Row"
                            Style="{StaticResource EddyfiBaseSfDataGridStyle}"
                            ItemsSource="{Binding Path=Messages}">
      
      <syncfusion:SfDataGrid.Columns>
        <syncfusion:GridTemplateColumn MappingName="Type" HeaderText="" ColumnSizer="SizeToHeader" x:Name="ColumnType" 
                                       AllowSorting="True" AllowFiltering="True" AllowEditing="False" AllowResizing="False" >
          <syncfusion:GridTemplateColumn.CellTemplate>
            <DataTemplate>
              <eddyfi:MultiSizeImage Source="{Binding Path=Type, Converter={StaticResource MessageTypeToImageConverter}}" />
            </DataTemplate>
          </syncfusion:GridTemplateColumn.CellTemplate>
        </syncfusion:GridTemplateColumn>
        
        <syncfusion:GridTextColumn MappingName="Number" HeaderText="" ColumnSizer="Auto"
                                   AllowSorting="True" AllowFiltering="False" AllowEditing="False" AllowResizing="True"  />
        
        <syncfusion:GridTextColumn MappingName="DateTime" HeaderText="Date/Time" ColumnSizer="Auto"
                                   AllowSorting="True" AllowFiltering="False" AllowEditing="False" AllowResizing="True" />
        
        <syncfusion:GridTextColumn MappingName="Message" HeaderText="Message" ColumnSizer="Star"
                                   AllowSorting="True" AllowFiltering="False" AllowEditing="False" AllowResizing="True" />
        <syncfusion:GridTextColumn MappingName="Source" HeaderText="Source" ColumnSizer="Auto" x:Name="ColumnSource" 
                                   AllowSorting="True" AllowFiltering="True" AllowEditing="False" AllowResizing="True" />
      </syncfusion:SfDataGrid.Columns>
    </syncfusion:SfDataGrid>
  </DockPanel>
</UserControl>

The control behaves correctly except when the number of rows creates a vertical scroll bar. The vertical scrollbar reduces the space available for the columns and, because of that, it created a horizontal scrollbar. Is there a way to "refresh" the column size in order to avoid the horizontal scrollbar from appearing?


Ashok N [Syncfusion]
Replied On November 26, 2014 11:14 AM UTC

Hi Charles,

 

Thank you for contacting Syncfusion Support.

We have tested the reported issue with our sample. But, we are unable to reproduce the issue. So could you please share the details like what are all the styles you are using to SfDataGrid? and please modify the sample based on your application along with the replication procedure? This would be helpful for further analysis. Please find the sample from the below attachment


Please let us know if you require further assistance.

Thanks,

Ashok


Attachment: ScrollBar_WPF_4384ee7d.zip

Charles Ricard
Replied On November 26, 2014 03:35 PM UTC

The problem occurs when I am in touch mode (EnableTouch="True") and when items are added. I'll investigate some more in the next week. 

BTW, where do I put :

<syncfusion:IntegerTextBox

         syncfusion:SkinStorage.EnableTouch="True" >

</syncfusion:IntegerTextBox >

In order to activate the touchmode?


Ashok N [Syncfusion]
Replied On November 27, 2014 05:23 PM UTC

Hi Charles,

We are sorry about the inconvenience caused.

We have analyzed your query but we are unable to understand your query clearly. So could you please share the details like, where you are enable the touch mode? within IntegerTextBox Or SfDataGrid? otherwise please modify our previously updated sample based on your application along with the replication procedure? This would be helpful for us to provide the exact solution to you.

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

;