Click here to Skip to main content
15,888,803 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have use Xceed data grid with more than 20 columns when i use 20th column and do any action in my grid after refreshing the scrollbar will automatically start with column no 1 how to avoid such refreshing issue ?

I used this code

What I have tried:

XML
<xcdg:DataGridControl AllowDrop="True" 
                      AutoCreateColumns="False" 
                      ReadOnly="True" 
                      Name="xcddgTst" 
                      ItemScrollingBehavior="Immediate"  
                      MouseDoubleClick="xcddgTst_MouseDoubleClick" 
                      VerticalAlignment="Stretch" 
                      HorizontalAlignment="Stretch">
    <xcdg:DataGridControl.Columns>
        <xcdg:Column FieldName="Column01" 
		             ReadOnly="True"
					 Title="Column 01 ">
        <xcdg:Column.CellContentTemplate>
            <DataTemplate>
                <TextBlock Text="{Binding RelativeSource={RelativeSource 
				                     AncestorType={x:Type xcdg:DataRow}}, 
				           Path=DataContext[Column01], 
						        StringFormat=\{0: MM/dd/yyyy\}}"/>
            </DataTemplate>
        </xcdg:Column.CellContentTemplate>
        <!-- </xcdg:Column>.......... up to column20 -->
    </xcdg:DataGridControl.Columns>
</xcdg:DataGridControl>
Posted
Updated 2-Mar-17 19:53pm
v5

1 solution

You would be better off asking Xceed product support questions in the Xceed WPF controls Forum[^]
 
Share this answer
 
Comments
rkthiyagarajan 3-Mar-17 0:47am    
Thanks Sure i will ... but not only Xceed grid in All wpf datagird having this kind of difficulties.
Graeme_Grant 3-Mar-17 1:10am    
Post an example of a standard Wpf control and not the one from Xceed so the community can better see what you are doing.

But taking a stab at it, without your code (missing from the question), it is the way that you are refreshing the data that is causing your problem.
rkthiyagarajan 3-Mar-17 1:19am    
Yeah... The thing is i had 20 column from left to right now i do one action (double click event) in 20th column after complete the action grid will automatically refresh and scroll bar came at left column01 position so my need is how to avoid such difficulties.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900