Sep 19, 2012, 1:32 PM
[CLOSED] problem with pagingtoolbar of combobox
hi,
I create my class implementer combobox faster with options
but I encounter the following problem in the display:
How to say pagingtoolbar take the size of the combobox?
Code
Class
I create my class implementer combobox faster with options
but I encounter the following problem in the display:
How to say pagingtoolbar take the size of the combobox?
Code
Class
public class DDSComboboxSearch : ComboBox
base.LoadingText = "Searching...";
Unit myUnit = new Unit(150);
base.Width = myUnit;
base.ItemSelector = "tr.list-item";
base.MinChars = 1;
base.PageSize = 10;
base.HideTrigger = true;
base.ItemCls = "mandatory-label";
base.EnableKeyEvents = true;
base.Mode = DataLoadMode.Remote;
base.ValueField = "Code";
base.DisplayField = "Code";
Store Store myStore = new Store();
myStore.ID = base.ID + "store";
myStore.AutoLoad = false;
Ext.Net.Parameter myParameterStart = new Ext.Net.Parameter();
myParameterStart.Name = "start";
myParameterStart.Value = "0";
myParameterStart.Mode = ParameterMode.Raw;
myStore.AutoLoadParams.Add(myParameterStart);
Ext.Net.Parameter myParameterLimit = new Ext.Net.Parameter();
myParameterLimit.Name = "limit";
myParameterLimit.Value = "10";
myParameterLimit.Mode = ParameterMode.Raw;
myStore.AutoLoadParams.Add(myParameterLimit);
Reader
JsonReader myJsonReader = new JsonReader();
myJsonReader.Root = "Code";
myJsonReader.TotalProperty = "total";
RecordField myRecordFieldCode = new RecordField();
myRecordFieldCode.Name = "Code";
myJsonReader.Fields.Add(myRecordFieldCode);
RecordField myRecordFieldLabel = new RecordField();
myRecordFieldLabel.Name = "Label";
myJsonReader.Fields.Add(myRecordFieldLabel);
Proxy proxy = new HttpProxy
{
Method = HttpMethod.POST,
Url = "~/Common/WebServices/CityServices.asmx/jsonForwader"
};
Templatebase.Template.Html = @" <Html>
<tpl for=""."">
<tpl if=""[xindex] == 1"">
<table class=""cbStates-list"">
<tr>
<th>Label</th>
<th>Code</th>
</tr>
</tpl>
<tr class=""list-item"">
<td>{Label}</td>
<td>{Code}</td>
</tr>
<tpl if=""[xcount-xindex]==0"">
</table>
</tpl>
</tpl>
</Html>";
this is part of the code, add all store etc are in the code
Last edited by Daniil; Sep 21, 2012 at 7:31 AM.
Reason: [CLOSED]