Jul 14, 2009, 11:17 PM
PropertyGrid Big Issue.
Dear Support Team,
I currently use version 0.8 to develop applications. I was interested in so powerful GridPanel that Coolite team has created.
Recently, I intended to use Property grid instead for some small input, but I was in a lot of troubles. Would you give me an advice?
1. The sorting.
The PropertyGridParameter only has "Name" as identification or displaying. This is so confused. The result is when I develop on another language (not English):
The PropertyGrid automatically sort ASC its properties. So I have difficulties to set the value for it. Currently, I have only found two way:
2. The grouping
I currently have found no way to group my property, I tried to search on Coolite community and Ext JS forum but found no result.
Here is my code
Thanks a lot.
I currently use version 0.8 to develop applications. I was interested in so powerful GridPanel that Coolite team has created.
Recently, I intended to use Property grid instead for some small input, but I was in a lot of troubles. Would you give me an advice?
1. The sorting.
The PropertyGridParameter only has "Name" as identification or displaying. This is so confused. The result is when I develop on another language (not English):
The PropertyGrid automatically sort ASC its properties. So I have difficulties to set the value for it. Currently, I have only found two way:
PropertyGrid1.propStore.setValue(PropertyGrid1.propStore.getProperty(0).id, value);
or this:PropertyGrid1.propStore.setValue('PROPERTYNAME', value);
The problem is the first way is useless because of sorting (automaticaly or user click on column title), the second way is inconsistent because PROPERTYNAME can be a series of unicode characters.I have to search and find the solution:<Listeners>
<Render Handler="function() {
this.getStore().sortInfo = undefined;
this.getColumnModel().config[0].sortable = false;
}" />
<SortChange Handler="this.getStore().sortInfo = undefined;" />
</Listeners>
This work well but it lock the property grid. And the sorting arrow is still there, can I remove it? I want to enable sorting but the value must be set to the right property. Can you help me? Is there another way to set it?2. The grouping
I currently have found no way to group my property, I tried to search on Coolite community and Ext JS forum but found no result.
Here is my code
<script type="text/javascript">
function setProperty() {
/*This code is useless when sorting is enabled.*/
PropertyGrid1.propStore.setValue(PropertyGrid1.propStore.getProperty(0).id, 'my sample value 1');
PropertyGrid1.propStore.setValue(PropertyGrid1.propStore.getProperty(1).id, 'my sample value 2');
PropertyGrid1.propStore.setValue(PropertyGrid1.propStore.getProperty(2).id, 'my sample value 3');
/*This code is inconsistent when Name is another language (a series of unicode characters).*/
/*PropertyGrid1.propStore.setValue('Tên ti?n t?', 'my sample value 1');
PropertyGrid1.propStore.setValue('Kí hi?u', 'my sample value 2');
PropertyGrid1.propStore.setValue('Ghi chú', 'my sample value 3');*/
}
</script>
<ext:PropertyGrid ID="PropertyGrid1" runat="server" Title="Test Property Grid" Frame="true" Height="300" Width="300">
<Source>
<ext:PropertyGridParameter Name="Tên ti?n t?"></ext:PropertyGridParameter>
<ext:PropertyGridParameter Name="Kí hi?u"></ext:PropertyGridParameter>
<ext:PropertyGridParameter Name="Ghi chú"></ext:PropertyGridParameter>
</Source>
<Buttons>
<ext:Button ID="btnSave" Text="Luu" runat="server">
<AjaxEvents>
<Click OnEvent="btnSave_Click"></Click>
</AjaxEvents>
</ext:Button>
</Buttons>
</ext:PropertyGrid>
Thanks a lot.