A very odd problem...

Hey Clay, This is going to be a nice and juicy on for you. I am using a non databound grid. Essentially, the crux of my problem is this.... The following line returns no data when there is data in the control: this.grdAppointments[range.Top, 4].CellValue.ToString() Now when I step past this code in the debugger and the form desplays, there is a data value in the cell. The value in the cell is a dollar amount. This column is of type Currency. The code that checks this column is in a cells_changed event handler. I can keep reproducing this behavior fine. I have attached the event handler in snippet.cs. Basically when column 3 is changed, I have to update column 4. If you have an questions about the snippet let me know. JF

2 Replies

December 19, 2003 08:41 PM UTC

Clay, Can you try n see if this.grdAppointments[range.Top, 4].CellText.ToString() works for you ? I think it should. Supriya Thakur >Hey Clay, > >This is going to be a nice and juicy on for you. I am using a non databound grid. Essentially, the crux of my problem is this.... > >The following line returns no data when there is data in the control: > >this.grdAppointments[range.Top, 4].CellValue.ToString() > >Now when I step past this code in the debugger and the form desplays, there is a data value in the cell. > >The value in the cell is a dollar amount. This column is of type Currency. The code that checks this column is in a cells_changed event handler. I can keep reproducing this behavior fine. > >I have attached the event handler in snippet.cs. Basically when column 3 is changed, I have to update column 4. If you have an questions about the snippet let me know. > >JF


JF Jim Frapper December 20, 2003 02:49 AM UTC

Hey Clay and Supriya Thakur, Thats whats so odd, it does work for me! Only when I first add a row to the grid. Here is how I reproduce it. - Add fresh row to grid. - Change column 3 to a new price. Everything works fine. - Change price to $12. Everything works fine. - Change price to $10. The code referred to previously now brings back nothing. No matter what I cange column 3 to, column 4 never returns any value even though I can see a value there. Note: If there are other rows in the grid, they have the same pattern of failure. Very odd indeed... I do have the source version of the codebase if you care to point me on where to look.... Cheers, JF

Loader.
Up arrow icon