PDA

View Full Version : [CLOSED] PropertyGrid



Bernard Jourdain
Oct 06, 2008, 10:41 AM
Hello everybody,


I'm beginning in coolite and I'm looking for an example using propertygrid in cohebehind. Do you have an example?

Thx

Best regards

Bernard Jourdain
Oct 06, 2008, 12:41 PM
Hi

After reading ExtJs documentation, my soluce is like this :

<ext:PropertyGrid ID="PropertyGrid" runat="server" >

<!-- Define the grid column --!>

<ColumnModel>
<Columns>
<ext:Column Width="100" Align="Left" Header="Property" Sortable="true" Resizable="true" ></ext:Column>
<ext:Column Width="300" Align="Left" Header="Value" Sortable="true" Resizable="true" ></ext:Column>
</Columns>
</ColumnModel>
</ext:PropertyGrid>


protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack) InitializePropertyGrid();
}

/// <summary>
///
/// </summary>
private void InitializePropertyGrid()
{
PropertyGridParameter oPropertyGridParameter = null;
for (int i=0; i < 10; i++) {
oPropertyGridParameter = new PropertyGridParameter();
oPropertyGridParameter.Name = "PropertyGridName" + i;
oPropertyGridParameter.Value = "PropertyGridValue" + i;
oPropertyGridParameter.Mode = ParameterMode.Value;
PropertyGrid.Source.Add(oPropertyGridParameter);
}
}


Best regards

geoffrey.mcgill
Oct 06, 2008, 1:58 PM
Hi Bernard,

The Examples Explorer contains a basic sample demonstrating the use of the <ext:PropertyGrid>, see https://examples1.ext.net/#/PropertyGrid/Basic/Save_Data/

Hope this helps.