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

Checkbox headers duplicated on horizontal scroll

3 Answers 131 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Matthew
Top achievements
Rank 1
Matthew asked on 21 Oct 2010, 06:28 AM
Hi,

I have a winforms radgridview on a form with it's dockstyle set to Fill so that i can scroll horizontally to see all the columns.

I am using custom checkbox columns with a 'select all' checkbox in the header as described in the knowledge base article here: http://www.telerik.com/support/kb/winforms/gridview/add-check-uncheck-all-check-box-in-the-header-cell.aspx

Now, if i drag the resize handle on the right hand edge of the form back and forth to resize the form, the header checkboxes shift around and sometimes get duplicated.

I have attached screen shots to demostrate.

Does anyone have any idea why this is happening and how to fix it ?

Thanks,
Matt

3 Answers, 1 is accepted

Sort by
0
Accepted
Emanuel Varga
Top achievements
Rank 1
answered on 21 Oct 2010, 08:13 AM
Hello Matthew,

I think you forgot to override this method,
DataName is the name of the column,
public override bool IsCompatible(GridViewColumn data, object context)
{
    return data.Name == "Select" && context is GridTableHeaderRowElement
        && base.IsCompatible(data, context);
}

For more information please see this updated KB article

Hope this helps, if you have any other questions or comments, please let me know,

Best Regards,
Emanuel Varga
0
Matthew
Top achievements
Rank 1
answered on 22 Oct 2010, 12:50 AM
That did it!

thank you for your help Emanuel!

Matt
0
Emanuel Varga
Top achievements
Rank 1
answered on 22 Oct 2010, 01:37 AM
Hello Matthew, glad to be able to help, if you hany more questions please do not hesitate to say so, and if your question has been answered please mark it as so, so that others will be able to find answers to their questions faster. Best Regards, Emanuel Varga
Tags
GridView
Asked by
Matthew
Top achievements
Rank 1
Answers by
Emanuel Varga
Top achievements
Rank 1
Matthew
Top achievements
Rank 1
Share this question
or