R
rote
I can get my webpart working When i uncomment the below but it doesn't
pass parameter values btw webparts
But still got some question though below:
I get error :'IWebPartField.GetFieldValue' in explicit interface
declaration is not a member of interface
object IWebPartField.GetFieldValue --on this line
{
get
{
return _view.SelectedValue;
}
}
So i tried : - I know something has to be dome using FieldbackCallback but
how
public void GetFieldValue(FieldCallback callback)
{
callback.Invoke(_view.SelectedValue);
}
But when i try and retrieve my value on Prerender to my second Gridview like
so
if (_authorField != null)
{
if (_ds.SelectParameters.Count == 0)
{
_ds.SelectCommand = selectStatement + " INNER JOIN
titleauthor ON titleauthor.title_id = titles.title_id WHERE
(titleauthor.au_id = @au_id)";
//_ds.SelectParameters.Add(new Parameter("au_id",
TypeCode.String, _authorField.GetFieldValue)); -- problem is here
}
else
{
//_ds.SelectParameters["au_id"].DefaultValue =
(string)_authorField.GetFieldValue; -- problem is here
}
}
I get error : cannot convert from 'method group' to 'string
and
Cannot convert method group 'GetFieldValue' to non-delegate type 'string'.
Did you intend to invoke the method?
Thanks in advance
pass parameter values btw webparts
But still got some question though below:
I get error :'IWebPartField.GetFieldValue' in explicit interface
declaration is not a member of interface
object IWebPartField.GetFieldValue --on this line
{
get
{
return _view.SelectedValue;
}
}
So i tried : - I know something has to be dome using FieldbackCallback but
how
public void GetFieldValue(FieldCallback callback)
{
callback.Invoke(_view.SelectedValue);
}
But when i try and retrieve my value on Prerender to my second Gridview like
so
if (_authorField != null)
{
if (_ds.SelectParameters.Count == 0)
{
_ds.SelectCommand = selectStatement + " INNER JOIN
titleauthor ON titleauthor.title_id = titles.title_id WHERE
(titleauthor.au_id = @au_id)";
//_ds.SelectParameters.Add(new Parameter("au_id",
TypeCode.String, _authorField.GetFieldValue)); -- problem is here
}
else
{
//_ds.SelectParameters["au_id"].DefaultValue =
(string)_authorField.GetFieldValue; -- problem is here
}
}
I get error : cannot convert from 'method group' to 'string
and
Cannot convert method group 'GetFieldValue' to non-delegate type 'string'.
Did you intend to invoke the method?
Thanks in advance