Advertisement

06.15.2007 at 07:49AM PDT, ID: 22636470
[x]
Attachment Details

Datagridview sorting issue

Asked by m_renaud in Microsoft Visual Basic.Net, VB Controls, VB Database Programming

Tags: ,

Hi there!

I'm using VB2005, and i got a problem with sorting in a bound datagridview. Every column is readonly except one checkboxcolumn. this column has some cells readonly which i populate programmatically depending on another value in the datasource.
When a user checks/unchecks a cell, i change its backcolor, and add a value in the cell.tag property. Everything works fine until the user sort a column (all the columns are sortable - automatic). After sorting, every cell in the checkboxcolumn is back to .readonly=false and the .tag and .backcolor property is cleared.

Is there a way to prevent this behavior ?

thanks in advance...Start Free Trial
[+][-]06.15.2007 at 08:33AM PDT, ID: 19292759

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.15.2007 at 08:35AM PDT, ID: 19292774

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.15.2007 at 03:58PM PDT, ID: 19296108

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.18.2007 at 06:10AM PDT, ID: 19306618

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.18.2007 at 06:59AM PDT, ID: 19307066

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Visual Basic.Net, VB Controls, VB Database Programming
Tags: datagridview, sort
Sign Up Now!
Solution Provided By: Sancler
Participating Experts: 2
Solution Grade: A
 
 
[+][-]06.18.2007 at 08:20AM PDT, ID: 19307834

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32