2013-07-22 28 views
0

是否有將屬性網格綁定到商店的方法。 我在這裏找到一個樣本,這是將數據綁定到propertgrid的唯一途徑?我想綁定的數據等,作爲GridView控件綁定謝謝Ext:net:屬性網格綁定它來存儲

<script runat="server"> 
    protected void Populate(object sender, DirectEventArgs e) 
    { 
     PropertyGridParameter p = new PropertyGridParameter(); 
     p.Name = "dynamic"; 
     p.Value = "property"; 
     p.Editor.Add(new ComboBox()); 

     this.PropertyGrid1.SetSource(new PropertyGridParameterCollection() { p }, true); 
    } 
</script> 

<!DOCTYPE html> 

<html> 
<head runat="server"> 
    <title>Ext.NET v2 Example</title> 
</head> 
<body> 
    <form runat="server"> 
     <ext:ResourceManager runat="server" /> 

     <ext:Button runat="server" Text="Populate" OnDirectClick="Populate" /> 
     <ext:PropertyGrid ID="PropertyGrid1" runat="server"> 
      <Source> 
       <ext:PropertyGridParameter Name="initial" Value="property" /> 
      </Source> 
     </ext:PropertyGrid> 
    </form> 
</body> 
</html> 

回答

1

PropertyGrid的內部使用其自己的商店和它的不可用數據綁定到就像你可以用GridPanel一樣。

我認爲如果你有這樣的需求,沒有什麼能阻止你使用一個通用的GridPanel。

+0

嗯,好吧,我明白了。謝謝你的迴應。 – sakir