RowFilter问题 [英] Problem with RowFilter

查看:54
本文介绍了RowFilter问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试更改行值时,出现无法对System.String和System.Int32执行="="的操作.错误.
字符串接收者= Common.GetReceipientType(Convert.ToInt32(row [ReceipientType]));

row [ReceipientType" =收件人; -在这里抛出错误

只有在我执行以下语句时才会发生这种情况
dvGenericNotifications.RowFilter = String.Format("receipientType = {0}",ddlType.SelectedValue);

when i try to change row value i am getting "Cannot perform ''='' operation on System.String and System.Int32. " Error.
string receipient = Common.GetReceipientType(Convert.ToInt32(row[ReceipientType]));

row[ReceipientType"] = receipient; -- here throwing error

This is only happens when i execute following statement
dvGenericNotifications.RowFilter = String.Format("receipientType={0}", ddlType.SelectedValue);

推荐答案

尝试更改为;

dvGenericNotifications.RowFilter = "receipientType=''" + ddlType.SelectedValue.tostring() + "''";
Try changing to;

dvGenericNotifications.RowFilter = "receipientType=''" + ddlType.SelectedValue.tostring() + "''";


这篇关于RowFilter问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆