Ashish M Bhonkiya wrote:
Yes I know, the problem is that the databinder returns an error if I
specify that name with a dot in it. My fields are named
"blabla.theotherthing" which throws an exception at runtime, like this:
DataBinder.Eval: 'System.Data.DataRowView' does not contain a property
with the name GeneralInfo.
Notice ths dot at the end of the exception, the field is actually named
GeneralInfo.logon_name. It seems to me that the databinder stops
processing when it reaches the dot even though there's more of the name
left? Kinda weird.
Also I am able to bind the data to the DataGrid if I AutoGenerate the
columns of the DataGrid but that's really not what I am looking for.
text='<%#DataBinder.Eval(Container.DataItem, "Desc")%>'
you need to give the name of the field.
I am trying to bind a DataGrid with some data from a DataSet which
contains fields in the form "group.fieldname". I am certain that my
data source contains the field but I cannot get my head around which
syntax to use when specifying which field to bind to the DataGrid.
I have tried
<%# DataBinder.Eval( Container.DataItem, "Group.FieldName" ) %>
and
<%# DataBinder.Eval( Container.DataItem, "[Group.FieldName]" %>
which is just plain old wrong :)
Can any one help me out here?
--
Med venlig hilsen,
Søren Lund
http://www.publicvoid.dk