问题描述
private void btnUpdate_Click(object sender,RoutedEventArgs e)
{
IsUpdated = true;
Button btn =((Button)e .OriginalSource);
var gh = btn.DataContext as Employee;
foreach(dgCustomer.Columns中的DataGridColumn col)
{
if(Convert.ToString(col.Header).Contains(Combo))
{
//在这里我需要获得组合框名称
}
}
btn.Content =Update;
dgCustomer.Columns [1] .IsReadOnly = false;
dgCustomer.Columns [2] .IsReadOnly = false;
dgCustomer.Columns [ 3] .IsReadOnly = false;
dgCustomer.Columns [4] .IsReadOnly = false;
}
当数据网格中的更新按钮单击时,我需要更改组合框IshittextVisible属性。
我无法找到网格行在selectionchanged事件或keydown事件中。
private void btnUpdate_Click(object sender, RoutedEventArgs e)
{
IsUpdated = true;
Button btn = ((Button)e.OriginalSource);
var gh=btn.DataContext as Employee;
foreach (DataGridColumn col in dgCustomer.Columns)
{
if (Convert.ToString(col.Header).Contains("Combo"))
{
//here i need to get the combobox name
}
}
btn.Content = "Update";
dgCustomer.Columns[1].IsReadOnly = false;
dgCustomer.Columns[2].IsReadOnly = false;
dgCustomer.Columns[3].IsReadOnly = false;
dgCustomer.Columns[4].IsReadOnly = false;
}
I need to change the combobox IshittextVisible property when update button click in datagrid.
I'm not able to find the grid row in selectionchanged event or keydown event.
推荐答案
这篇关于访问选定的行组合框Silverlight按钮单击事件中的datagrid的名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!