سؤال

I have a GridView where the ItemTemplates are just Eval("ColumnName"), how can I access this field after the data has been bound?

I tried gv.Rows[0].Cells[0] etc. but there is nothing there.

Is this because of late binding? or is it just because the Eval is not in a control?

هل كانت مفيدة؟

المحلول 2

I worked it out:

((DataBoundLiteralControl)gv.Rows[0].Cells[0].Controls[0]).Text

نصائح أخرى

You want to get the data in the event 'RowCommand' or 'RowDataBind'?

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top