on 04-17-2007 4:09 AM
Hi
I'm developing some screens to display data from a SQL Server database with the .Net PDK 2.0 and Visual Studio .Net 2003, I have a table and this have enabled the SelectionMode property set to Multi, so when the screen fills the table the user can select some rows, also I have configured three columns to sort the table and I have configured an ID field as the table key, well, the row selection works fine, also the sorting, but when I sort first the table by some other column than the original and try to select some row then the row selected is not the one that I select either is the one that was in the position selected originally.
Somebody know why this is happening? or most important, what can I do to solve this issue? the Developer's guide and some other documentation didn't helps to much.
Thanks
Hi Jorge,
how are you doing ?
the sorting function is as per the original key, so a simple way is to reassign the key in the sort function server side event
what you could try is keep the data table object in memory / in a hidden field on the page, and upon sort event fire, change the key of the table and then rebind the table view, and save the table locally again
with respect,
amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Thanks for your answer, it was solved, actually it was a problem with the programming logic because I was iterating over the DataTable validating a field that indicates if the row was selected (to preserve state in database for future references), but I was executing this routine in the Page_load, so in every post back the routine validates the field and selects the rows corresponding to the DataTable position, what I do was extract this routine from the PageLoad and call it from the Search Button Event Handler.
10 points for your help
Jorge - would you be willing to post your code for this table example. It seems that you have done all the things that users are looking for in one table (sorting, selecting), etc...?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jorge,
how are you doing ?
thank you for the 'solved problem' solution points
with respect,
amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.