Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
ASP .Net
Invalid cast?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Mark Fitzpatrick, post: 1942272"] You may try to iterate through the collection of cells first and trace the control types to make sure that you have the correct cell. By the looks of this, Cell 0 is a HyperLink column and not a button. Try using Cell 3 instead. You could also dump the cell contents to trace like for(int i = 0; i < e.Item.Cells.Count;i++) { for(int j = 0; j < e.Item.Cells[i].Controls.Count;j++) { Trace.Write("Cell " + i.ToString() + " Control " + j.ToString(),e.Item.Cells[i].Controls[j].GetType().ToString()); } } You may need to edit that as it's just a rough and I haven't run it through the compiler. Hope this helps, Mark Fitzpatrick Microsoft MVP - FrontPage[/i][/i] [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
ASP .Net
Invalid cast?
Top