DataGrid没有显示它在WPF中不可见的值 [英] DataGrid not showing the values it is invisible in WPF

查看:73
本文介绍了DataGrid没有显示它在WPF中不可见的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我在categorymaster表中有一些值,当我执行下面的代码时,数据填充到datagrid但是值不可见。



这是我的代码



MySqlConnection con = new MySqlConnection(GlobalClass._ConStr);

con.Open();

string sql = string.Format(select * from categorymaster);

MySqlDataAdapter adp = new MySqlDataAdapter(sql,con);

DataSet ds = new DataSet();

adp.Fill(ds,emp);

con.Close();

DepartmentGridView.ItemsSource = ds.Tables [0] .DefaultView;

DepartmentGridView.SelectedIndex = -1;

Hi,

I have some value in categorymaster table when i execute below code the data is filling to datagrid but the value is not visible.

This is my code

MySqlConnection con = new MySqlConnection(GlobalClass._ConStr);
con.Open();
string sql = string.Format("select * from categorymaster");
MySqlDataAdapter adp = new MySqlDataAdapter(sql, con);
DataSet ds = new DataSet();
adp.Fill(ds, "emp");
con.Close();
DepartmentGridView.ItemsSource = ds.Tables[0].DefaultView;
DepartmentGridView.SelectedIndex = -1;

推荐答案

一次在your.aspx页面查看此属性



RowDetailsVisibilityMode =可见//添加此代码
once check this property in your.aspx page

RowDetailsVisibilityMode="Visible" // add this code


这篇关于DataGrid没有显示它在WPF中不可见的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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