Posted on: 4/7/2011 7:29:17 AM | Views : 413

 I'm upgrading an old ASP.net 1 application to 2.0 and am having a few problems with a datagrid. I decided to keep it as a datagrid for the sake of ease. I know it works!!
I need to make each row selectable upon clicking taking the user to a "more details" view this works fine except it appears my 2.0 version is appending a zero onto single digit control id's.
In the datagrid ItemDataBound I have a line as follows:
e.Item.Attributes.Add(
"onclick", "javascript:__doPostBack('DtrgDocuments$ctl" & ((Convert.ToInt32(e.Item.ItemIndex)) + 3) & "$ctl03',''))

This allows the row to be clickable and does everything except if the e.Item.ItemIndex is bel ...

Go to the complete details ...