Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
220
Copy of webgrid row with checkbox column not working
posted

Hi, I've edited my original message to make it easier to read and updated it to my current situation so please ignore my 2 subsequent posts.

 

I've added a checkbox column with select all checkbox header to my webgrid as per this forum post http://forums.labs.infragistics.com/forums/p/1156/11700.aspx#11700   

A copy and paste method which moves the selected rows to another grid is now exhibiting very strange behaviour.

Initially when I did grid.copy() after using the select all checkbox to select all the rows the copy was failing. If I checked all the rows manually it worked fine.  I resolved this issue by adding a line to activate the row before selecting it and copying it.

Now if I just use the select all button and then copy it all works fine.

However if I first manually check and copy the first row (which works fine), then use select all and copy to copy the rest of the rows the first row of the rest of the rows doesn't get copied correctly and only the checkbox value gets copied but all the subsequent rows copy correctly.

Similarly, if I've only got 2 rows in the grid and I manually copy the last row then the checkbox value only will be copied for the first row if I use the select all and copy. However if there are more than 2 rows and I copy the last row first, then select all and copy the rest they all copy correctly.

Any suggestions or help would be much appreciated.

Thanks,

Colette 

Parents
No Data
Reply
  • 220
    posted

    The plot thickens. Here are some more details on the problem that I've come across during testing.

    I'm using the grid to enter search terms and then display the results.  So the user enters a value in a particular column, hits Search and then a search is run for that value using the column name and the results are returned and bound to the grid.

    If I enter some text, don't search, click the Select All checkbox and then click the copy button everything works fine, the row is copied to the clipboard.

    However, if I enter some text, do click Search, click Select All and then copy the checkboxes are set but the copy is failing.

    And as I mentioned before, if I've run the search and then manually click the checkboxes for the rows I want, then hit copy again each row is copied to the clipboard correctly.

    So it's only after I've run the search and used the select all checkbox that the copy is failing. 

    Could it be something to do with the way the data is bound to the page? It doesn't seem to be doing a postback and the search data certainly remains visible after clicking the Select All checkbox.

    I need a solution to this quite urgently so any help is much appreciated.

    Thanks,

    Colette

Children