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

CheckBox in CellTemplate gets unchecked on scrolling

11 Answers 744 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Ramya
Top achievements
Rank 1
Ramya asked on 27 Aug 2011, 11:58 AM
Hi,
I have a GridViewDataColumn and I have put a checkbox in its CellTemplate. The problem is that when I check this checkbox and scroll down, the checBox gets unchecked. Though the uncheck event is not fired, it looks unchecked. I have not applied any style to the checkbox. What can be the reason? How can I fix this.
Thanks,
Ramya

11 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 29 Aug 2011, 07:55 AM
Hi Ramya,

This behavior may be caused in the case the IsChecked property of the CheckBox is not bound. May you post some more information about the definition of the column ?
 

Kind regards,
Maya
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Mario Priebe
Top achievements
Rank 1
answered on 19 Sep 2011, 10:10 AM
We have also this problem. The checkbox elements are bound:

<telerik:GridViewDataColumn DataMemberBinding="{Binding Exkl}">
    <telerik:GridViewDataColumn.Header>
        <TextBlock Text="ausschl." />
    </telerik:GridViewDataColumn.Header>
    <telerik:GridViewDataColumn.CellTemplate>
        <DataTemplate>
            <CheckBox IsChecked="{Binding Exkl}" HorizontalAlignment="Center" />
        </DataTemplate>
    </telerik:GridViewDataColumn.CellTemplate>
</telerik:GridViewDataColumn>

If I scroll the grid, loosed the checkbox the state and the grid select any other checkbox.
0
Maya
Telerik team
answered on 19 Sep 2011, 12:10 PM
Hello Mario,

I have tried to reproduce the issue, but still without any success. May you take a look at the sample attached to verify whether I am testing it correctly ? Can you get the same behavior on this project ?

Regards,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Mario Priebe
Top achievements
Rank 1
answered on 19 Sep 2011, 12:39 PM
Thanks for your fast reply.
 
Your example works fine. But the same code in my solution still give the issue.
Our hierarchy look like:
 
controls:ChildWindow
    telerik:RadTabControl
        telerik:RadTabItem

the grid has follow attributes

<telerik:RadGridView ShowGroupPanel="False" telerik:StyleManager.Theme="Transparent"
 ItemsSource="{Binding Source={StaticResource ourSource}}" SelectionMode="Multiple" AutoGenerateColumns="False">

I dont know, what seems the difference.
0
Maya
Telerik team
answered on 19 Sep 2011, 01:31 PM
Hi Mario,

Even after changing the project so that it uses the structure you mentioned, I am not able to reproduce the issue. I am attaching the updated sample. May you take a look and try to reproduce the behavior on this application ? 

All the best,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Kevin
Top achievements
Rank 1
answered on 20 Oct 2011, 05:08 PM
We are having a similair issue in Winforms.  As we scroll around our grid, we see green-checked checkboxes (which are properly checked) AND black-checked ones that seemingly randomly check and uncheck themselves as we scroll up and down.  Any ideas?
Kevin D
0
Maya
Telerik team
answered on 21 Oct 2011, 06:56 AM
Hi Kevin,

This forum targets only RadControls for Silverlight. I will encourage you to post your question on the appropriate forum for WinForms.
Thank you for your understanding.

 

Kind regards,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Abílio
Top achievements
Rank 1
answered on 21 Mar 2013, 11:47 AM
HI there.

We´re catching the same problem. Didi anyone find the solution or the reason for this problem to happen?

Thanks in advanced.
0
Maya
Telerik team
answered on 21 Mar 2013, 12:59 PM
Hello Abilio,

Will it be possible to clarify which controls you work with - for WPF or WinForms ? If it is the first case, could you reproduce the behavior in the sample attached ? 

Kind regards,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Aaron
Top achievements
Rank 1
answered on 09 Apr 2019, 07:55 PM
I'm still getting the behaviour using WPF. Any update on this?
0
Vladimir Stoyanov
Telerik team
answered on 12 Apr 2019, 01:37 PM
Hello Aaron,

May I kindly ask you to open a separate thread in the WPF section since this topic is for Silverlight and share some sample code demonstrating how the RadGridView is defined on your end? Can you also make sure that the property is databound? 

Thank you in advance for your understanding.

Regards,
Vladimir Stoyanov
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
GridView
Asked by
Ramya
Top achievements
Rank 1
Answers by
Maya
Telerik team
Mario Priebe
Top achievements
Rank 1
Kevin
Top achievements
Rank 1
Abílio
Top achievements
Rank 1
Aaron
Top achievements
Rank 1
Vladimir Stoyanov
Telerik team
Share this question
or