小编Pou*_*uya的帖子

如何在ItextSharp中设置PdfPCell的宽度

我想在表中设置PdfpCell的宽度,我想设计一下

在此输入图像描述
我写这段代码

  PdfPCell cell;
            PdfGrid tableHeader;
            PdfGrid tmpTable;
            PdfGrid table = new PdfGrid(numColumns: 1) { WidthPercentage = 100, RunDirection = PdfWriter.RUN_DIRECTION_LTR, ExtendLastRow = false };

            string imagepath2 = HttpRuntime.AppDomainAppPath + "Header.JPG";
            cell = new PdfPCell() { Border = 0, RunDirection = PdfWriter.RUN_DIRECTION_RTL };
            cell.Image = iTextSharp.text.Image.GetInstance(imagepath2);
            table.AddCell(cell);


            tableHeader = new PdfGrid(numColumns: 10);
            tableHeader.RunDirection = PdfWriter.RUN_DIRECTION_LTR;

            tmpTable = new PdfGrid(numColumns: 1);
            tmpTable.TotalWidth = 10f;
            tmpTable.LockedWidth = true;
            cell = new PdfPCell() {Rotation =-90,VerticalAlignment =Element.ALIGN_MIDDLE, HorizontalAlignment =Element.ALIGN_CENTER, BorderWidth = 1};
            cell.Phrase = …
Run Code Online (Sandbox Code Playgroud)

c# itextsharp pdfptable

21
推荐指数
1
解决办法
9万
查看次数

Linq表达式中的Int.Parse

我有以下linq表达式.我想在Nvarchar字段中计算数值的总和.我使用以下代码来执行此操作.但是当我尝试运行它时,我收到一个错误.

var m = new MaterialModelContainer();

var list = 
    (from x in
        (
            from inv in m.INVs
            join l in m.LIBs on inv.MESC equals l.MESC
            join o in m.OUTs on inv.MESC equals o.MESC
            join t in m.TRANs on inv.MESC equals t.MESC
            where t.TYPE == "60"
            select new
            {
                l.MESC,
                l.LINE_NO,
                l.UNIT_LINE,
                Description = l.DES + " " + l.PART_NO,
                inv.NEW_QTY,
                o.PJ,
                o.DATE,
                o.QTY,
                o.QTY_REC,
                TranQty = t.QTY,
                tranDate = t.DATE
            }
        )
        group x by
            new
            {
                x.MESC,
                x.LINE_NO,
                x.UNIT_LINE, …
Run Code Online (Sandbox Code Playgroud)

c# linq entity-framework

12
推荐指数
5
解决办法
2万
查看次数

如何在kendo ui grid中选择关键行

我在asp.net mvc中使用kendo Ui为create Grid编写此代码

  @(Html.Kendo().Grid(Model)
      .Name("Grid")

      .Columns(columns =>
                   {
                       columns.Bound(p => p.Id).Groupable(false).Visible(false);
                       columns.Bound(p => p.BrandName);
                       columns.Bound(p => p.BrandAbbr);
                       columns.Bound(p => p.SrcImage);

                       columns.Command(command => command.Custom("ViewDetails").Click("showDetails"));
                      })

    .ToolBar(toolbar =>
                    {
                        toolbar.Custom().Action("Create","Users").Text("add");                          
                    }
        )
        .Groupable()
        .Pageable()
        .Sortable()
.Scrollable()

        .Filterable()
        .HtmlAttributes(new {style = "height:500px;"})
        .Selectable(selectable => selectable
            .Mode(GridSelectionMode.Multiple)
            .Type(GridSelectionType.Row))  

        .DataSource(dataSource => dataSource
                                    .Server()                           
                                    .Model(model => model.Id(item => item.Id))

      ))   
Run Code Online (Sandbox Code Playgroud)

我想当用户点击ViewDetails警报BrandId值栏时,请帮助我.谢谢所有

asp.net-mvc kendo-ui kendo-grid kendo-asp.net-mvc

9
推荐指数
2
解决办法
2万
查看次数

如何在kendo.ui.grid中创建自定义kendo.ui.Window进行编辑

我是kendo.Ui的首发,我为创建网格编写了这段代码

@(Html.Kendo().Grid<BrandViewModel>(Model)
    .Name("Grid")
    .Columns(columns =>
    {
        columns.Bound(p => p.BrandName);
        columns.Bound(p => p.BrandAbbr);
        columns.Bound(p => p.SrcImage);

        columns.Command(command => command.Custom("Edit").Click("editItem"));

    })

    .DataSource(dataSource => dataSource
        .Ajax()
        .Read(read => read.Action("CustomCommand_Read", "Brand"))
         .Model(model => model.Id(p => p.Id))

               )
)
Run Code Online (Sandbox Code Playgroud)

我想当用户点击在kendo窗口中Edit打开的按钮时Edit view我写这段代码

@(Html.Kendo().Window().Name("Details")
    .Title("Customer Details")
    .Visible(false)
    .Modal(true)
    .Draggable(true)

    .Width(300)
)



<script type="text/x-kendo-template" id="template">
    <div id="details-container"> <!-- this will be the content of the popup -->
        BrandName: <input type='text' value='#= BrandName #' />

    </div>
</script>
Run Code Online (Sandbox Code Playgroud)

和java脚本代码:

<script type="text/javascript">
    var detailsTemplate = kendo.template($("#template").html());

    function …
Run Code Online (Sandbox Code Playgroud)

asp.net-mvc kendo-ui kendo-grid kendo-asp.net-mvc

8
推荐指数
1
解决办法
1万
查看次数

如何在jQgrid中隐藏列,但在"添加/编辑"面板中显示此列

我想要一种我使用的控制形式.但是字段的数量太高了.如何显示网格,但只有表格中的一些字段添加/编辑弹出面板显示所有字段???

javascript jqgrid jqgrid-asp.net jqgrid-formatter

7
推荐指数
1
解决办法
7939
查看次数

为什么`data("kendogrid")`未定义?

我是kendo.ui的首发,我写了这段代码来创建kendo.ui.grid

@(Html.Kendo().Grid<BrandViewModel>(Model)
    .Name("Grid")
    .Columns(columns =>
    {
        columns.Bound(p => p.BrandName);
        columns.Bound(p => p.BrandAbbr);
        columns.Bound(p => p.SrcImage);

        columns.Command(command => command.Custom("Edit").Click("editItem"));

    })

    .DataSource(dataSource => dataSource
        .Ajax()
        .Read(read => read.Action("CustomCommand_Read", "Brand"))
        .Model(model => model.Id(p => p.Id))
    )
)
Run Code Online (Sandbox Code Playgroud)

当用户单击网格中的编辑按钮时,它将在kendo.ui.window中显示编辑视图,用户可以编辑数据.

@(Html.Kendo().Window().Name("Details")
    .Title("Customer Details")
    .Visible(false)
    .Modal(true)
    .Height(400)
    .Draggable(true)
    .Width(300)
    .Events(events => events.Close("onClose"))
)

<script type="text/x-kendo-template" id="template">
    <div id="details-container">
        <!-- this will be the content of the popup -->
        BrandName: <input type='text' value='#= BrandName #' />
    </div>
</script>


<script type="text/javascript">
    var detailsTemplate = kendo.template($("#template").html());
    var windowObject;

    $(document).ready(function …
Run Code Online (Sandbox Code Playgroud)

asp.net-mvc kendo-ui kendo-grid kendo-asp.net-mvc

7
推荐指数
1
解决办法
1万
查看次数

在C#windows应用程序中映射编程

我想编写一个使用地图的Windows应用程序,当用户点击地图中的某个位置时,应用程序会显示一些有关保存在数据库文件中的位置的信息.

我该如何为地图编写代码?我可以使用什么组件?我可以使用哪个库?任何信息都可以帮助我......

.net c# map winforms

5
推荐指数
2
解决办法
5954
查看次数

如何在jqGrid中选择数据行

我是jqGrid的首发,我在页面中有2个jqGrid,在Grid1中我有inCustom和OutCustom我希望用户点击Grid获取Data inCustom和outCustom来编写这段代码

var grid = $('#list');
grid.jqGrid({
    url: 'jQGridHandler.ashx',
    postData: { ActionPage: 'ClearanceRequest', Action: 'Fill' },
    ajaxGridOptions: { cache: false },
    loadonce: true,
    direction: "rtl",
    datatype: 'json',
    height: 600,
    width: 1000,
    colNames: ['', '', '', ' ', '', '', '', '', '',
               '', '', ' ', '', '', '', '', '', '',
               '', ' ', '', '', '', '',
               '', '', '', '', '', '', ' ',
               '', '', '', '', '', ''],
    colModel: [
        { name: 'REQUEST_ID', width: 100, …
Run Code Online (Sandbox Code Playgroud)

jquery jqgrid jqgrid-asp.net jqgrid-formatter

5
推荐指数
1
解决办法
9842
查看次数

如何自定义标题jqgrid

我想像这样创建 jqGrid 在此处输入图片说明
我可以划分身体 jqGrid 我写了这段代码

var data = [[1, 45, "E123", "1/1/11", "Done", 100], [2, 46, "E124", "1/12/11", "Done", 100]];

$("#grid").jqGrid({
    datatype: "local",
    height: 250,
    colNames: ["SNO", "OrderID", "Location", "Date", "Status", "Amount"],
    colModel: [{
        name: 'SNO',
        index: 'SNO',
        width: 60},
    {
        name: 'OrderID',
        index: 'OrderID',
        width: 90,
        formatter:orderFmatter},
    {
        name: 'Location',
        index: 'Location',
        hidden: true},
    {
        name: 'Date',
        index: 'Date',
        width: 80,
        formatter:dateStatusFmatter},
    {
        name: 'Status',
        index: 'Status',
        width: 80,
        hidden: true},
    {
        name: 'Amount',
        index: 'Amount',
        width: 80}
    ], …
Run Code Online (Sandbox Code Playgroud)

jqgrid jqgrid-asp.net jqgrid-formatter

4
推荐指数
1
解决办法
5797
查看次数

如何在linq中加入4个表


我是linq和EF的首发.我有4张桌子

CurrencyUnit

CurrencyUnitID    CurrencyName
-------------------------------
1                    Dolar
2                    Pond
Run Code Online (Sandbox Code Playgroud)

请求

RequestID    WayBillNo
--------------------------
1            10000
2            10001
Run Code Online (Sandbox Code Playgroud)

COSTTYPE

CostTypeID      CostName
-------------------------------
1                 A
2                 B
Run Code Online (Sandbox Code Playgroud)

RequestCost

RequestId    CostId     CurrencyUnitId     Amount   Remark
-----------------------------------------------------------
1              1              1            200
1              2              1            400
2              2              2            1000
Run Code Online (Sandbox Code Playgroud)

我想加入这4个表并得到这个结果

结果(表)

RequestId  WayBillNo  CostId    CostName  CurrencyUnitId   CurrencyUnitName  Amount   Remark
------------------------------------------------------------------------------------------
1           10000        1        A          1                 Dollar       200       
1          10000        2         B          2                 Pond         400
2          10001        1         A          0                               0
2          10001        2         B          2 …
Run Code Online (Sandbox Code Playgroud)

c# linq entity-framework entity-framework-4

3
推荐指数
1
解决办法
5579
查看次数