[置顶] Ext.Net 1.x_Ext.Net.Combox动态加载与删除所选择项

前台:

            <ext:ComboBox ID="cbxsalesman" runat="server"  FieldLabel="业务员" Width="150"  DisplayField="UserName"   ValueField="UserId" StoreID="Store3">
              <Triggers>
                <ext:FieldTrigger Icon="Clear" Qtip="移除选项" />
            </Triggers>
            <Listeners>
                <TriggerClick Handler="this.removeByValue(this.getValue());this.clearValue();" />
            </Listeners>
            </ext:ComboBox>


后台;

        string strSql = string.Format("select distinct  [name] as username,users.id from [JobTypeDetail] inner join users on JobTypeDetail.UserId=users.id where 1=1 ");
        strSql += "order by username ASC";
        DataTable table = SqlHelper.ExecuteDataset(SqlHelper.conn, CommandType.Text, strSql).Tables[0];
        List<SalesMan> QList = new List<SalesMan>();
        foreach (DataRow row in table.Rows)
        {
            SalesMan sm= new SalesMan();
            sm.UserName = Convert.ToString(row["username"]);
            sm.UserId = Convert.ToString(row["id"]);
            QList.Add(sm);

        }
        this.Store3.DataSource = QList;
        this.Store3.DataBind();

[置顶] Ext.Net 1.x_Ext.Net.Combox动态加载与删除所选择项_第1张图片
 


你可能感兴趣的:(JOIN,String,server,ext,triggers)