Nick Harrison

Nick Harrison

  • 2k
  • 6
  • 6.2k

.Net 2.0 GridView Bug?

May 5 2011 10:26 AM

I have a web application, one of the forms has a GridView on it. .Net 2.0.
Most of the columns are template and I have textbox controls in the ItemTemplate . Normally the Id and name of the control resolves to something like the following.


All well and good as I expect.

If I add the following code to the RowCreated event.

if (e.Row.RowType == DataControlRowType.DataRow)
TextBox dfDgCustomerSearchWord = (TextBox)e.Row.FindControl("dfCustomerSearchWord");

string sCustomerSearchWord = dfDgCustomerSearchWord.UniqueID;


The control and name attributes resolve to this.


What the hell is that all about, I havnt even tried to assign anything to the UniqueId, only accessed it.

Is this a bug? If not can anybody explain what esoteric reasoning might elicit this sort of behaviour in the GridView?

Brought to you by:

Answers (3)