listview control problem
-
Hi, I ahve a listview control ( detailview with one column ). Say I have A .B and C items in the list. Say when form loads A is selected by default. Now user clicks on B. How can I know which item was selected before B got focus( or got selected ). Is there a even which is fired before click event of B would be fired? This might clarify a bit. When A is clicked , i populate a corressponding grid with some data. Now user edits this data and dosn't hit save or anything. He clicks on B, now what I want to do is before the grid loads data for B ( the code for which is on click event ), i wanna read what's int eh grid for item A and save it, but how do i know which was the last selcted itedm before user switched? Please help This is visual studio 2003, vb.net, framework 1.1 :(
-
Hi, I ahve a listview control ( detailview with one column ). Say I have A .B and C items in the list. Say when form loads A is selected by default. Now user clicks on B. How can I know which item was selected before B got focus( or got selected ). Is there a even which is fired before click event of B would be fired? This might clarify a bit. When A is clicked , i populate a corressponding grid with some data. Now user edits this data and dosn't hit save or anything. He clicks on B, now what I want to do is before the grid loads data for B ( the code for which is on click event ), i wanna read what's int eh grid for item A and save it, but how do i know which was the last selcted itedm before user switched? Please help This is visual studio 2003, vb.net, framework 1.1 :(
You'd have to store this info seperately, because what comes back in viewstate is the current selection and before viewstate is loaded, there is no state at all. Christian Graus - Microsoft MVP - C++
-
You'd have to store this info seperately, because what comes back in viewstate is the current selection and before viewstate is loaded, there is no state at all. Christian Graus - Microsoft MVP - C++
-
Yeah this is what am doign currently, I thought there could be soemthing better. Thank You thou.
OK, no worries. There isn't AFAIK any other way to do this. Christian Graus - Microsoft MVP - C++