Silverlight3中的datagrid [英] datagrid in silverlight3
问题描述
我是wcf的新手...我正在silverlight3中创建数据网格..我希望此网格的数据应在运行时出现
我的编码是这个
< usercontrol
xmlns ="http:schemas.microsoft.com =""winfx =""2006 =""xaml ="演示文稿" ="
xmlns:x ="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d ="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc ="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:ignorable ="d"
xmlns:data ="clr-namespace:System.Windows.Controls; assembly = System.Windows.Controls.Data"
x:class ="ourproject.MainPage"
d:designwidth ="640" d:designheight ="480">
< grid x:name ="LayoutRoot" background ="white">
< data:datagrid x:name ="firstgrid" autogeneratecolumns ="False" margin ="72,98,65,188">
< data:datagrid.columns>
< data:datagridtextcolumn标头=员工名称" width ="150" binding ="{绑定名称}">
< data:datagridtextcolumn标头=工资" width ="150" binding ="{装订工资}">
< data:datagridtextcolumn标头="Post" width ="150" binding ="{装订后}">
但是错误正在显示
c:\ documents and settings \ sag \ desktop \ ourproject \ ourproject \ obj \ debug \ mainpage.g.cs 40 42 ourproject"
PLz帮助我
I am new in wcf...I am making the datagrid in silverlight3..I want that the data of this grid should come at run time
my coding is this
<usercontrol
xmlns="http: schemas.microsoft.com="" winfx="" 2006="" xaml="" presentation"=""
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:ignorable="d"
xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"
x:class="ourproject.MainPage"
d:designwidth="640" d:designheight="480">
<grid x:name="LayoutRoot" background="white">
<data:datagrid x:name="firstgrid" autogeneratecolumns="False" margin="72,98,65,188">
<data:datagrid.columns>
<data:datagridtextcolumn header="Employee Name" width="150" binding="{Binding name}">
<data:datagridtextcolumn header="Salary" width="150" binding="{Binding salary}">
<data:datagridtextcolumn header="Post" width="150" binding="{Binding post}">
but the error is showing
"The type or namespace name ''DataGrid'' does not exist in the namespace ''System.Windows.Controls'' (are you missing an assembly reference?) c:\documents and settings\sag\desktop\ourproject\ourproject\obj\debug\mainpage.g.cs 40 42 ourproject"
PLz help me
推荐答案
我是wcf的新手...我在silverlight3中制作数据网格
I am new in wcf...I am making the datagrid in silverlight3
Silverlight还是WPF?而且您的代码没有粘贴到该问题中.
Silverlight or WPF? And your code did not got pasted in this question.
这篇关于Silverlight3中的datagrid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!