Silverlight DataGrid中的只读行 [英] ReadOnly Rows in Silverlight DataGrid
本文介绍了Silverlight DataGrid中的只读行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,专家,
我有一个Silverlight DataGrid,它与一个dataSource绑定.
Hi Experts,
I have a Silverlight DataGrid and, it is binded with a dataSource.
<data:DataGrid x:Name="SLDataGrid" RowStyle="{StaticResource MyDataGridRowStyle}"
</data:DataGrid>
在代码中
In code
SLDataGrid.ItemsSource=List<data></data>
很好.现在基于"Data.IsReadOnly"(IsReadOnly是一个布尔字段)的值,如何在Silverlight DataGrid中将那些特定的行设置为ReadOnly.
谢谢与问候
ArunKumar
Fine.. Now based on the value of "Data.IsReadOnly"(IsReadOnly is a Boolean Field), How I can set those particular Rows as ReadOnly in Silverlight DataGrid.
Thanks and Regards
ArunKumar
推荐答案
不可能在数据网格中将整个行设置为只读.但是,您可以将包含您的数据值的控件设置为只读;只需将ReadOnly属性绑定到rowvalue的readonly属性即可.
嗯,我似乎无法附加包含解决方案的zip文件,可以从这里下载它吗?
http://dl.dropbox.com/u/3693471/DataGridExample.rar [ ^ ]
It is not possible to set entire rows to readonly in a datagrid. You can however set the control containing your datavalue to readonly; just bind the ReadOnly property to your rowvalue''s readonly property.
[edit] hmm, I do not seem to be able to attach the zip file with the solution in it, can you download it from here?
http://dl.dropbox.com/u/3693471/DataGridExample.rar[^]
<u></u>this is for gridview, I need to do this for datagrid
there is no gv.Columns
Perry Bruins
我尝试下载,但无法下载.
可以通过我的邮件ID(ajayk@middlepathit.com)发送给我吗?
谢谢
阿杰·辛格(Ajay singh)
hi Perry Bruins
i tried to download but i am not be able to download it.
can you send me in my mail id(ajayk@middlepathit.com)
thanks
ajay singh
这篇关于Silverlight DataGrid中的只读行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文