[置顶] Ext.Net 1.x_Ext.Net.GridPanel嵌套COMBOX

[置顶] Ext.Net 1.x_Ext.Net.GridPanel嵌套COMBOX_第1张图片

前台:

                <ext:Column DataIndex="State" Header="出勤状况">
                        <Editor>
                             <ext:ComboBox ID="StateCombo" runat="server">
                             <Items >
                             <ext:ListItem Text="正常" />
                             <ext:ListItem Text="缺席" />
                             <ext:ListItem Text="迟到" />
                             <ext:ListItem Text="早退" />
                             
                             </Items> 

                            </ext:ComboBox>
                        </Editor>
                    </ext:Column>
             <Listeners>
                <BeforeEdit Fn="beforeEdit" />
            </Listeners>
            <DirectEvents>
                <AfterEdit OnEvent="AfterEdit">
                    <EventMask ShowMask="true" Target="This" />
                    <ExtraParams>
                        <ext:Parameter Name="field" Value="e.field" Mode="Raw" />
                        <ext:Parameter Name="id" Value="e.record.id" Mode="Raw" />
                        <ext:Parameter Name="record" Value="e.record.data" Mode="Raw" Encode="true" />
                    </ExtraParams>
                </AfterEdit>
            </DirectEvents>


后台:

    protected void AfterEdit(object sender, DirectEventArgs e)
    {
        List<string> fields = new List<string> { "id", "name", "department", "Course", "ScheduledDate", "State" };
        int startIndex = fields.IndexOf(e.ExtraParams["field"]);
        JsonObject data = JSON.Deserialize<JsonObject>(e.ExtraParams["record"]);
        string id = data["id"].ToString();
        string State = data["State"].ToString();

        Xuanke xk = new Xuanke();
        xk.Id = int.Parse(id);
        xk.State = data["State"].ToString();
        xk.UpdateStatus();

        GridPanelWaitUserBind();
        

    }

你可能感兴趣的:(String,object,server,header,ext)