So, I have been working on my hyperlink problem (searched and continued a post here http://forums.infragistics.com/forums/t/1393.aspx)
I was trying to figure out what was wrong, and found a setting on my column "Allow Update" and set it to yes...it WORKED! it built the targeturl and redirected me. However, when I left that page, I got a null reference error on the e.Row within my InitializeRow
I turned off the "Allow update" and restarted debugging, still had the error.
I then tried this
protected void uwg_NoFutureApts_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e) { if (e.Row == null) { e.Row.Cells.FromKey("Reschedule").TargetURL = "RescheduleAttempt.aspx?id=" + e.Row.Cells[7].Value.ToString(); e.Row.Cells.FromKey("Reschedule").Value = "Reschedule2"; } }
this just passed right by without trying to set my TargetURL
AND
protected void uwg_NoFutureApts_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e) { if (e.Row != null) { e.Row.Cells.FromKey("Reschedule").TargetURL = "RescheduleAttempt.aspx?id=" + e.Row.Cells[7].Value.ToString(); e.Row.Cells.FromKey("Reschedule").Value = "Reschedule2"; } }
This throws the Null error?????
nothing has changed in my application other than the allow update, which has been set back.
I am in desperate need of help on this one. I have no clue what is going on. How does the row initialize if there isn't a row? and why is there suddenly not a row? I have checked repeatedly..and my grid has rows..if I use the first InitializeRow, basically, skipping the event, I get everything working fine.
Hi,
The actual row is probably not null, but the result of : e.Row.Cells.FromKey("Reschedule"). Could you make sure that "Reschedule" is the proper column name in the database? Thanks
Angel