原创

Ext.Net 1.x_Ext.Net.GridPanel嵌套COMBOX

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://david.blog.csdn.net/article/details/6792496

前台:

                <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();
        

    }

文章最后发布于: 2011-09-20 09:37:43
展开阅读全文
0 个人打赏
私信求帮助

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 鲸 设计师: meimeiellie

分享到微信朋友圈

×

扫一扫,手机浏览