csharp 一些devexpress代码块在视图中

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了csharp 一些devexpress代码块在视图中相关的知识,希望对你有一定的参考价值。

// this code run when inserting button is clicked on      
 .OnInitNewRow(
                    @<text>
                        function(e) {
                        var value = $('[id *= "_MethodId"]').val();
                        alert(e.element.attr("id"));
                        }</text>)*      


//this function run when the dropbox is changed
var element;
    function GetIt() {
        element = $('[id *= "_MethodId"]');
        element.click(function () {
            alert("that changed!");       
        });
    }

OnContentReady works when the page is loaded
@(Html.DevExtreme().DataGrid<Order>()
    .ID("gridContainer")
    .OnContentReady(@<text>
        function(e) {
            alert(e.element.attr("id"));
        }</text>)

//this is the working version of method field
c.AddFor(x =>  x.MethodId).Visible(true).AllowFiltering(true).Caption("Method").ValidationRules(x => x.AddRequired())
.Lookup(lookup => lookup.DataSource(d =>  d.WebApi().Controller("ServiceMethod").LoadAction("Get").LoadParams(new  JS("getServiceId")).Key("MethodId"))
.ValueExpr("MethodId").DisplayExpr("MethodName")).FormItem(f =>  f.Visible(true));

//This transform a value to JSON format
data: "{service:'" + JSON.stringify(deger) + "'}",

以上是关于csharp 一些devexpress代码块在视图中的主要内容,如果未能解决你的问题,请参考以下文章

csharp devexpress布局#xaf #layout

csharp devexpress cellDoubleClick事件

csharp excel报告#spreadsheet #devexpress#c#

csharp 传递连接到报告#devexpress #reports #connection

csharp DevExpress - ReportDesigner - XRPivotGrid - BeforePrint - SelectedValues

ExtJS 滑块在视图中不可见