Jun 06, 2012, 9:06 PM
[CLOSED] PropertyGrid and Store - does that work?
Hey,
my initial problem was that I was trying to stop a PropertyGrid from being sorted. Now, there are a few posts here on that issue, and I have myself commented on one solution:
http://forums.ext.net/showthread.php...d-disable-sort
In that thread I say that using
Since I am adding properties using the .SetSource(...)-method I thought that using the above Handler won't work since I am not actually using a Store. So I try to add a store and populate the Store, but I cannot get any properties shown when using the following code:
In code-behind I populate the store like this:
my initial problem was that I was trying to stop a PropertyGrid from being sorted. Now, there are a few posts here on that issue, and I have myself commented on one solution:
http://forums.ext.net/showthread.php...d-disable-sort
In that thread I say that using
<Render Handler="this.getStore().sortInfo = undefined;" />
works like a charm, but now when I get back to it (1 year later) I see that it doesnt stop sorting at all.Since I am adding properties using the .SetSource(...)-method I thought that using the above Handler won't work since I am not actually using a Store. So I try to add a store and populate the Store, but I cannot get any properties shown when using the following code:
<ext:PropertyGrid runat="server" ID="executionPropertyGrid1" AutoHeight="true">
<Store>
<ext:Store runat="server" ID="StoreExecutionProperty">
<Reader>
<ext:JsonReader>
<Fields>
<ext:RecordField Name="Name" SortType="None"></ext:RecordField>
<ext:RecordField Name="Value" SortType="None"></ext:RecordField>
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
</Store>
<View>
<ext:GridView ID="GridView3" runat="server" ScrollOffset="0" ForceFit="true">
<GetRowClass Handler="return record.data.value == ' ' ? 'my-class' : '';" />
</ext:GridView>
</View>
<Listeners>
<Render Handler="this.getStore().sortInfo = undefined;" />
</Listeners>
</ext:PropertyGrid>
I have also tried with ArrayReader instead o JsonReader.In code-behind I populate the store like this:
PropertyGridParameterCollection executionList = new PropertyGridParameterCollection();
executionList.Add(new PropertyGridParameter("SomeProperty1", "Somevalue1"));
executionList.Add(new PropertyGridParameter("SomeProperty2", "Somevalue2"));
StoreExecutionProperty.DataSource = executionList;
StoreExecutionProperty.DataBind();
Any help is appreciated =)
Last edited by Daniil; Jun 07, 2012 at 10:13 AM.
Reason: Please use [CODE] tags for all code, [CLOSED]