CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2005
    Posts
    4

    Sorting a Datagrid with a Select Button does not work!!!

    Hi

    I am using an unbound datagrid with a Select Button that was inserted from the Property Builder of the Datagrid.

    This button selects a row of the datagrid and displays the information in another page.

    Everything is working fine. The problem starts when I sort any of the columns of the datagrid (by clicking the column header) and then select a row, the data displayed in the second form will be for another row and not the row I have selected!!!

    It looks as though the Select button in the datagrid is unaware of any changes in the datagrid!!!

    How can I make the Select Button respond to the new status of the datagrid??

    Many thanks

  2. #2
    Join Date
    Aug 2004
    Posts
    191

    Re: Sorting a Datagrid with a Select Button does not work!!!

    Could you maybe post your code for populating the grid, sorting the grid, and clicking the select button? The only thing I can think of off the top of my head is that you might be repopulating the grid in the Page.Load event and handling the button click while it is in a different order.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured