+ -
当前位置:首页 → 问答吧 → ext.net 读取数据问题

ext.net 读取数据问题

时间:2011-09-05

来源:互联网

代码如下:
<ext:Store ID="StoreCatL3" runat="server" AutoLoad="true" OnRefreshData="StoreCatL3_RefreshData" >
  <Reader>
  <ext:JsonReader IDProperty="Value">
  <Fields>
  <ext:RecordField Name="Name" Type="String" />
  <ext:RecordField Name="Value" Type="String" />
  </Fields>
  </ext:JsonReader>  
  </Reader>
   
  <Proxy>
  <ext:PageProxy>
  </ext:PageProxy>
  </Proxy> 
  </ext:Store>
请问怎么在cs页面读取到 value的值啊?
上面的StoreCatL3对应的是ddlCatL3 的Store。
<ext:ComboBox runat="server" ID="ddlCatL3" Width="150px" DisplayField="Name" ValueField="Value" EmptyText="请选择" StoreID="StoreCatL3">
  </ext:ComboBox>

Combox 的后台数据是这样绑定的:
List<CorpCategory> list = corpCategoryService.GetCorpCategory(this.corporation.CategoryID_L1, cityId, 0);
  List<object> dataList = new List<object>();
  dataList.Add(new { Name = "三级分类", Value = "三级分类" });
  foreach (CorpCategory c in list)
  {
  dataList.Add(new { Name = c.Name, Value = c.Id.ToString() });
  }
  this.StoreCatL3.DataSource = dataList;
  this.StoreCatL3.DataBind();

作者: czciou   发布时间: 2011-09-05

也就是说,我想拿到 三级分类对应的 Id 值!

作者: czciou   发布时间: 2011-09-05

急啊~~望高人指点。

作者: czciou   发布时间: 2011-09-05