msflexgrid sorting and unlinking 
Author Message
 msflexgrid sorting and unlinking

Thanks for your time.

I have a msflex grid that displays linked contacts.  When you click a
button, it unlinks the msflexgrid selected contact.  The problem,  when I
sort the grid, and unlink, it unlinks more than the selected contact,
corrupting the parent contact entry.

This is the code I'm using for sorting:
    ctlContactGrid.Col = 2
    ctlContactGrid.Sort = 1
Where column 2 is 'FileAs'

This is the code I'm using for unlinking the child from the parent
    Item.Links.Remove(ctlContactGrid.Row)

Like I said, the two work by themseleves but not together.

Can you help?
Is there a better way to unlink, or sort?



Fri, 02 May 2003 03:00:00 GMT  
 msflexgrid sorting and unlinking
Brian,
Add another column to your flex grid, set the column width to zero, if you
like (Don't remember if flex grid disallows this or not)

When you fill the grid, set this new column to the row number, which is
really your index number.

Then when you unlink, use the value in this new column

Hope this helps
Jay


Quote:
> Thanks for your time.

> I have a msflex grid that displays linked contacts.  When you click a
> button, it unlinks the msflexgrid selected contact.  The problem,  when I
> sort the grid, and unlink, it unlinks more than the selected contact,
> corrupting the parent contact entry.

> This is the code I'm using for sorting:
>     ctlContactGrid.Col = 2
>     ctlContactGrid.Sort = 1
> Where column 2 is 'FileAs'

> This is the code I'm using for unlinking the child from the parent
>     Item.Links.Remove(ctlContactGrid.Row)

> Like I said, the two work by themseleves but not together.

> Can you help?
> Is there a better way to unlink, or sort?



Wed, 07 May 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Sorting by Date within MSFlexGrid

2. Sorting by Date within MSFlexGrid

3. Sorting by Date within MSFlexGrid

4. Sorting by Date within MSFlexGrid

5. MSFlexGrid printing and sorting?

6. MSFlexGrid sort

7. Sorting the MSflexgrid

8. Sorting MSFlexgrid (VB5.0pro)

9. MSFlexGrid : how to un-sort rows ???

10. MSFlexGrid column sort

11. msflexgrid sort number and date

12. MSFlexGrid Control - Sorting Question

 

 
Powered by phpBB® Forum Software