This is a migrated thread and some comments may be shown as answers.

[Solved] Why first column is showing again?

18 Answers 103 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Alberto
Top achievements
Rank 1
Alberto asked on 06 Oct 2010, 10:52 AM
Hi

I got a really strange issue with an grid with 28 columns  the first column is been rendered again at the end of the grid when I scroll horizontally. I got a mix of type of columns  GridViewDataColumn, GridViewCheckBoxColumn some with GridViewDataColumn.HeaderCellStyle and some without.

18 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 06 Oct 2010, 11:26 AM
Hello Alberto,

 Can you send us an example where we can reproduce this? More info about the grid version will be appreciated as well. 

Best wishes,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Alberto
Top achievements
Rank 1
answered on 06 Oct 2010, 11:39 AM
Version number is 2010.2.924.1040, Sending you an example is not quite simple, with got lots of code and names that I am not free to talk about, Have you ever seen that issue ?
0
Vlad
Telerik team
answered on 06 Oct 2010, 11:41 AM
Hello Alberto,

 I've never seen such issue before. Can you post more info about your scenario? How grid columns are generated in your case? Auto-generated or programmatically created?

Greetings,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Alberto
Top achievements
Rank 1
answered on 06 Oct 2010, 11:56 AM
Columns are generated using data binding / templates e.g.
<telerik:GridViewDataColumn DataMemberBinding="{Binding Path=Isin}" HeaderTextAlignment="Center" Header="ISIN"/>

also
 <telerik:GridViewCheckBoxColumn ...

and some other like that

<telerik:GridViewDataColumn Header="" HeaderTextAlignment="Center" IsGroupable="False" IsFilterable="False" SortMemberPath="">
    <telerik:GridViewDataColumn.HeaderCellStyle>
        <Style TargetType="telerik:GridViewHeaderCell">
            <Setter Property="ContentTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <StackPanel>
                            <TextBlock Text="" HorizontalAlignment="Center"/>
                        </StackPanel>
                    </DataTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </telerik:GridViewDataColumn.HeaderCellStyle>
    <telerik:GridViewDataColumn.CellTemplate>
        <DataTemplate>           
        </DataTemplate>
    </telerik:GridViewDataColumn.CellTemplate>
</telerik:GridViewDataColumn>
0
Vlad
Telerik team
answered on 06 Oct 2010, 12:15 PM
Hello Alberto,

 Can you verify if AutoGenerateColumns is set to False in your case?

Kind regards,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Alberto
Top achievements
Rank 1
answered on 06 Oct 2010, 12:18 PM
This is  mine RadGridView

<telerik:RadGridView Grid.ColumnSpan="4" Grid.Row="5" DataLoadMode="Asynchronous"
                            ScrollMode="Deferred" AutoGenerateColumns="False"
                          SelectedItem="{Binding NewIssueItemSelected, Mode=TwoWay}" ShowGroupPanel="False" IsFilteringAllowed="False"
                          ItemsSource="{Binding Path=....}" IsReadOnly="True" MinWidth="1100" Height="720" FontSize="10"  
                          Grid.RowSpan="2">
0
Vlad
Telerik team
answered on 06 Oct 2010, 12:32 PM
Hi Alberto,

 Unfortunately from provided info so far I cannot tell you what is going on and why you see such issue and my suggestion is to isolate the case in small project (where the problem can be reproduced) and send us this project via support ticket. We will review your scenario and we will let you know about our findings. 

Sincerely yours,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Alberto
Top achievements
Rank 1
answered on 06 Oct 2010, 12:34 PM
How I can I add I zip ?
0
Vlad
Telerik team
answered on 06 Oct 2010, 12:36 PM
Hello Alberto,

 Please reopen your support ticket and attach the zip. 

Kind regards,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Vlad
Telerik team
answered on 06 Oct 2010, 12:55 PM
Hello Alberto,

 I've checked your project and indeed your right. We fixed this immediately and the fix will be part of our upcoming latest build (this Friday). In the meantime please use Header property of the columns instead HeaderCellStyle. Here is an example:

<telerik:GridViewDataColumn HeaderTextAlignment="Center" IsGroupable="False" IsFilterable="False" SortMemberPath="">
    <telerik:GridViewDataColumn.Header>
        <StackPanel>
            <TextBlock Text="Some text" HorizontalAlignment="Center"/>
            <TextBox Width="200"/>
        </StackPanel>
    </telerik:GridViewDataColumn.Header>
    <telerik:GridViewDataColumn.CellTemplate>
        <DataTemplate>
        </DataTemplate>
    </telerik:GridViewDataColumn.CellTemplate>
</telerik:GridViewDataColumn>


Best wishes,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Alberto
Top achievements
Rank 1
answered on 06 Oct 2010, 02:33 PM
Well that is another issue, using <telerik:GridViewDataColumn.Header> will affect the way databinding works, when the object you want to bind is outside of the itemsource you should be using elementname  and that works really well under <telerik:GridViewDataColumn.HeaderCellStyle> but is broken <telerik:GridViewDataColumn.Header>

e.g.
 <telerik:GridViewDataColumn.HeaderCellStyle>
                            <Style TargetType="telerik:GridViewHeaderCell">
                                <Setter Property="ContentTemplate">
                                    <Setter.Value>
                                        <DataTemplate>
                                            <StackPanel>
                                                <TextBlock Text="Issue Name" HorizontalAlignment="Center"/>
                                                <sdk:AutoCompleteBox Grid.Column="2" TabIndex="2" Height="20" Width="295" AllowDrop="False" IsDropDownOpen="False"
                                                                ItemsSource="{Binding ElementName=LayoutRoot, Path=DataContext.Collection}" FilterMode="Contains"
                                                                ValueMemberPath="IssueName" Text="{Binding item, Mode=TwoWay}" MinimumPrefixLength="2">
                                                    <sdk:AutoCompleteBox.ItemTemplate>
                                                        <DataTemplate>
                                                            <StackPanel Orientation="Horizontal">
                                                                <TextBlock Text="Issue : " FontWeight="Bold" />
                                                                <TextBlock Text="{Binding ...}"/>
                                                                <Rectangle Style="{StaticResource DividerStyle}"/>
                                                                <TextBlock Text="{Binding ...}" FontWeight="Bold" />
                                                            </StackPanel>
                                                        </DataTemplate>
                                                    </sdk:AutoCompleteBox.ItemTemplate>
                                                </sdk:AutoCompleteBox>
                                            </StackPanel>
                                        </DataTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </telerik:GridViewDataColumn.HeaderCellStyle>
0
Vlad
Telerik team
answered on 06 Oct 2010, 02:42 PM
Hello Alberto,

In this case please wait a bit for our upcoming build and let me know if you still have any problems. 

Regards,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Alberto
Top achievements
Rank 1
answered on 06 Oct 2010, 02:50 PM
Are you planning to fin the biding issue ?
0
Vlad
Telerik team
answered on 06 Oct 2010, 04:09 PM
Hello,

 Unfortunately ElementName Binding issue is out of our control still if we find any workaround we will publish more info (or even fix if the workaround is enough stable/general). 

Best wishes,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Alberto
Top achievements
Rank 1
answered on 06 Oct 2010, 04:12 PM
Vlad

The proxy fix is not an elegant fix is to noisy and hit the performance, I just wander why work well on the style but fails on the another?
0
Vlad
Telerik team
answered on 07 Oct 2010, 12:58 PM
Hi,

Generally our templates are loaded using LoadContent() method and the Header is assigned to the Content of the header cell. In this case ElementName Binding will fail since the template is not yet part of the visual tree when the binding is executed. 

Kind regards,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Alberto
Top achievements
Rank 1
answered on 11 Oct 2010, 05:19 PM
HI

Friday is already passed and I haven't seen the promissed patch.
0
Hristo
Telerik team
answered on 12 Oct 2010, 10:16 AM
Hi Alberto,

Our latest internal build with version 2010.2.1008 was shipped on Friday. You can find it under Your Account->Downloads->RadControls for Silverlight->Latest Internal Builds  or follow this link.

Please let me know if I can be of further assistance.

Best wishes,
Hristo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Alberto
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Alberto
Top achievements
Rank 1
Hristo
Telerik team
Share this question
or