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

[Solved] Custom Databinding

4 Answers 94 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.
Carson
Top achievements
Rank 1
Carson asked on 18 Jul 2011, 05:49 PM
Hello I am having a problem with the grid using custom databinding row templates. I am getting random white lines that are getting injected into the grid when sort the grid. This is randomly happening, but does not occur the first time the grid is bound.  I am using MVVM with Caliburn.Micro and here is my XAML

<Controls:RadGridView ItemsSource="{Binding Alerts}" CanUserFreezeColumns="False" ScrollMode="Deferred" IsReadOnly="True" x:Name="Alerts" GridLinesVisibility="None" AutoGenerateColumns="False" CanUserReorderColumns="False" CanUserSortColumns="True" MinHeight="400" RowStyle="{StaticResource rowStyle}" Height="535" SelectionMode="Multiple">
                <Controls:RadGridView.Columns>
                    <Controls:GridViewDataColumn Header="Alert Date" DataMemberBinding="{Binding AlertDate}" IsFilterable="False" Width="150" />
                    <Controls:GridViewDataColumn Header="Alert Type" DataMemberBinding="{Binding AlertType}" IsFilterable="False" Width="100" />
                    <Controls:GridViewDataColumn Header="Job Name" DataMemberBinding="{Binding Path=Job.JobName}" IsFilterable="False" Width="100" />
                    <Controls:GridViewDataColumn Header="Comment" DataMemberBinding="{Binding Comment}" IsFilterable="False" Width="100" />
                </Controls:RadGridView.Columns>
            </Controls:RadGridView>

and my template for the control
<StackPanel.Resources>
                <ControlTemplate x:Key="AlertRowTemplate" TargetType="telerik:GridViewRow">
                    <Border x:Name="rowsContainer" BorderBrush="#FFA0AFC3">
                        <UserControl cal:View.Context="{Binding AlertType}" cal:View.Model="{Binding}"></UserControl>
                    </Border>
                </ControlTemplate>
                <Style x:Key="rowStyle" TargetType="telerik:GridViewRow">
                    <Setter Property="Template" Value="{StaticResource AlertRowTemplate}" />
                </Style>
            </StackPanel.Resources>

Is this a known issue? or is it something that is screwed up in my markup?

Thanks for your help!

4 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 19 Jul 2011, 06:54 AM
Hi,

 Can you post more info about your grid version? Is it our latest official Q2 2011?

Regards,
Vlad
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Carson
Top achievements
Rank 1
answered on 19 Jul 2011, 05:00 PM
Indeed we are using the 2011 Q2 Official Release. On further reveiw of the problem that we are having the grid apears to not be displaying the control that we are binding to. A little more background on the issue

1) We have a series of controls that represent the item that we are bindng to in different states.
2) The Controls are being being bound to the Grid just fine  on the initial databinding of the grid.
3) When we scroll or sort the grid be start to get white spaces where the controls should be, and in the size of the spaces is consistant with what we would expect for the size of the control.

It apears that something within the grid or maybe else where in preventing the Item from being displayed properly.

Thanks again for your help!
0
Vlad
Telerik team
answered on 22 Jul 2011, 07:22 AM
Hello,

 Please send us an example application via support ticket demonstrating the issue.

All the best,
Vlad
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Carson
Top achievements
Rank 1
answered on 03 Aug 2011, 06:16 PM
I have not had the time to create the custom project to display the issue for you, but I have found another little thing about it. Everything appears to work just fine if I set autogeneratecolunms= true. I don't know if that can help or not. If I can get the time to send it in I will, if not then I will have to pull out the grid.
Tags
GridView
Asked by
Carson
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Carson
Top achievements
Rank 1
Share this question
or