This is a migrated thread and some comments may be shown as answers.

Missing operand after 'a' operator error for master/detail

1 Answer 165 Views
This is a migrated thread and some comments may be shown as answers.
Tuan Huynh
Top achievements
Rank 1
Tuan Huynh asked on 19 Sep 2008, 03:10 PM
I am getting the error "Missing operand after 'a' operator" when I have master/detail views of RadGrid for AJAX.Net. This error happens when user attempts to drill into detail table and value of the DataKeyNames of the parent table has a single quote '.  I found one thread that someone had shared similar error.

However, he had to resort to an alternative to use two grids instead of master/detail. I'd rather use master/detail. Can you help? Thanks.

Here is my snippet of my master/detail relation. City has single quote in value


DetailTables><telerik:GridTableView DataKeyNames="City" Name="ITContact"  GridLines="None" Width="100%" BorderStyle="None" GroupLoadMode="Client">
<telerik:GridRelationFields DetailKeyField="City" MasterKeyField="City" />

In debugging, I have no problem in retrieving the detail table of City with single quote in value. The statements of below in DetailTableDataBind event handler executes with no error.

switch (e.DetailTableView.Name) {

case "ITContact":
string City = dataItem.GetDataKeyValue("City").ToString();
DataSet dsResult = new WorkflowParticipant().GetITContactsByCity(City);
e.DetailTableView.DataSource = dsResult;


Stack trace shows that the error happens at System.Data.ExpressionParser.Parse()
System.Data.ExpressionParser.Parse() +442
   System.Data.DataExpression..ctor(DataTable table, String expression, Type type) +154
   System.Data.DataExpression..ctor(DataTable table, String expression) +35
   System.Data.DataView.set_RowFilter(String value) +192

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 23 Sep 2008, 11:20 AM

It seems that you are using both ParentTableRelation and DetailTableDataBind event? If this is the case, please remove the ParentTableRelation and use only DetailTableDataBind event.

Please give it a try and see if this helps.

Sincerely yours,
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Asked by
Tuan Huynh
Top achievements
Rank 1
Answers by
Telerik team
Share this question