我想在表中设置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) 我有以下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) 我在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
值栏时,请帮助我.谢谢所有
我是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) 我想要一种我使用的控制形式.但是字段的数量太高了.如何显示网格,但只有表格中的一些字段添加/编辑弹出面板显示所有字段???
我是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) 我想编写一个使用地图的Windows应用程序,当用户点击地图中的某个位置时,应用程序会显示一些有关保存在数据库文件中的位置的信息.
我该如何为地图编写代码?我可以使用什么组件?我可以使用哪个库?任何信息都可以帮助我......
我是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) 我想像这样创建 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)
我是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# ×4
asp.net-mvc ×3
jqgrid ×3
kendo-grid ×3
kendo-ui ×3
linq ×2
.net ×1
itextsharp ×1
javascript ×1
jquery ×1
map ×1
pdfptable ×1
winforms ×1