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
355
InitializeRow bug
posted

Hi there,

I am having a strange bug with the IntializeRow event handler arguments.

I have a grid with custom sorting. In one of the cells of the grid, I put an image with an associated javascript in which one of the parameters is the e.Row.Index property of the RowEventArgs e. I use this to know on the browser javascript in which row the click was done.

This works fine except in one case: when the column I use for sorting has repeated elements. In this case, the InitializeRow fires for every row as expected, but the row number 0, for example, is not shown on the 0 position of the grid, but later. This breaks my program because when I click on the image of the cell, the javascript receives a row number of another row, and the results are completely unexpected.

I know it is hard to explain, let me know if I didn not made myself clear.

Any ideas on how to resolve this?

Parents
No Data
Reply
  • 355
    posted

    I made an example you can use too see what I mean.

    You can download the web project here www.carrere.cat/GridTest.zip

    To see how this is not working, open the web, click on the info images of every row to see that the rows are indexed correctly. After that, sort by status column and click on the info images to see that the row indexes are not corresponding to the actual row.

    Pleas,e help us with this because this is completely breaking our sorting algorithm, since we sort correctly, but then the control renders every row where it wants.

Children