求助啊,为什么gridview上显示不出数据-
一步一步调试都没有报错,怎么就是显示不出来,我是菜鸟,求大神解答啊!
private void simpleButton1_Click(object sender, EventArgs e)
{
UserInfo user = new UserInfo();
user.Name = textEdit1.Text;
UserInfoArgs uia = new UserInfoArgs(user);
if (OnSearchUserInfoHander != null)
{
OnSearchUserInfoHander(this,uia);
}
}
public void SearchUserInfoFun(object sender, UserInfoArgs e) //未使用的参数会显示灰色
{
Users u = new Users();
UserInfo user = Users.userList.Find(
delegate(UserInfo ui)
{
return ui.Name == e.Userinfo.Name;
});
List<UserInfo> listuserinfo = new List<UserInfo>();
listuserinfo.Add(user);
gridControl1.DataSource = listuserinfo;
gridControl1.Refresh();
}
绑定数据是在FieldName那一栏里绑定的。不知道哪里错了