I am working with a datasource that uses a 5 character code as the fileid & PK. This code can contain any printable character, so I have some fileid(s) that shape up like this: AAA/>, AAA:/, etc.
In RadGrid, I have added this field to the DataKeyFields and access it in grid_itemCreated() to build a javascript link used in a button column.
Here is the problem, the FileID is 'AAA/>' but the code below extracts the fileid from the keyvalue as 'AAA//>'
and causes a "no records found" since the primary key has an extra / in it.
I cannot locate the place where this / is being added nor eliminate it on extract, any ideas?
In RadGrid, I have added this field to the DataKeyFields and access it in grid_itemCreated() to build a javascript link used in a button column.
Here is the problem, the FileID is 'AAA/>' but the code below extracts the fileid from the keyvalue as 'AAA//>'
and causes a "no records found" since the primary key has an extra / in it.
I cannot locate the place where this / is being added nor eliminate it on extract, any ideas?
protected
void
dg_results_ItemCreated(
object
sender, GridItemEventArgs e)
{
if
(e.Item
is
GridDataItem)
{
HyperLink editLink = (HyperLink)e.Item.FindControl(
"EditLink"
);
editLink.Attributes[
"href"
] =
"#"
;
editLink.Attributes[
"onclick"
] = String.Format(
"return ShowEditForm('{0}','{1}');"
, e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex][
"FileId"
], e.Item.ItemIndex);
}
}