我有html表并在运行时添加表行.我想添加到新的tr(动态tr)添加ClickEvent 我写这个代码,但它不起作用
$("#GridView1 tbody tr").click(function(e){
var id = $(this).find(".lbl").text();
workOrderId = id;
// $("#gridtbl tr").remove();
$.ajax({
url: "PublicHandler.ashx",
contentType: "application/json; charset=utf-8",
data: { workOrderId: id },
success: function (data) {
var grd = $("#gridtbl");
$.each(data, function (i, b) {
var str = "<tr>";
str += "<td style='display: none;'>" + b.WorkId + "</td>";
str += "<td>" + b.WorkName + "</td>";
str += "<td>" + b.SectionName + "</td>";
str += "<td>" + b.SectionSupervisor + "</td>";
if (b.RequestCount == null) {
str …Run Code Online (Sandbox Code Playgroud) 我正在使用Janus GridEx控件.我正在使用计时器每分钟用数据库中的数据更新网格.如果用户在从数据库更新数据时选择了行,那么在更新完成后如何重新选择行?
我在 sqlServer 中有 3 个表,如下所示:
成本_类型
Id COST_NAME
-------------
1 A
2 B
3 C
4 D
5 E
6 F
7 Z
Run Code Online (Sandbox Code Playgroud)
和请求表
Id No
----------
1 100
2 200
3 300
Run Code Online (Sandbox Code Playgroud)
和 Cost_Request(=clearance_cost)
RequestId CostId Amount
-------------------------------
1 2 200
1 3 400
Run Code Online (Sandbox Code Playgroud)
我想得到这个结果
RequestId CostId Amount
-------------------------------
1 2 200
1 3 400
1 1 0
1 4 0
1 5 0
1 6 0
Run Code Online (Sandbox Code Playgroud)
我写了这段代码
var context = new CLEARANCEEntities();
var items = (from c in …Run Code Online (Sandbox Code Playgroud) 我是iTextSharp的首发,我将此代码编写为创建RoundRectangle到PdfPTable并在页面中心对齐表
string pdfpath = Server.MapPath("PDFs");
RoundRectangle rr = new RoundRectangle();
using (Document document = new Document())
{
PdfWriter writer = PdfWriter.GetInstance(document, new FileStream(pdfpath + "/Graphics6.pdf", FileMode.CreateNew));
document.Open();
PdfPTable table = new PdfPTable(1);
float[] f=new float[]{0.5f};
table.SetWidths(f);
PdfPCell cell = new PdfPCell()
{
CellEvent = rr,
Border = PdfPCell.NO_BORDER,
Phrase = new Phrase("test")
};
table.AddCell(cell);
document.Add(table);
Run Code Online (Sandbox Code Playgroud)
我想改变表格宽度我改变代码
string pdfpath = Server.MapPath("PDFs");
RoundRectangle rr = new RoundRectangle();
using (Document document = new Document())
{
PdfWriter writer = PdfWriter.GetInstance(document, new FileStream(pdfpath + "/Graphics6.pdf", …Run Code Online (Sandbox Code Playgroud) 我是asp.net的初学者,我用PdfRpt创建pdf文件.我在课堂上写这段代码
namespace PdfReportSamples.CustomPriceNumber
{
public class CustomPriceNumberPdfReport
{
public IPdfReportData CreatePdfReport()
{
using (var memoryStream = new MemoryStream())
{
var ii= new PdfReport().DocumentPreferences(doc =>
{
doc.RunDirection(PdfRunDirection.LeftToRight);
doc.Orientation(PageOrientation.Portrait);
doc.PageSize(PdfPageSize.A4);
doc.DocumentMetadata(new DocumentMetadata { Author = "Vahid", Application = "PdfRpt", Keywords = "Test", Subject = "Test Rpt", Title = "Test" });
})
.DefaultFonts(fonts =>
{
fonts.Path(Environment.GetEnvironmentVariable("SystemRoot") + "\\fonts\\arial.ttf",
Environment.GetEnvironmentVariable("SystemRoot") + "\\fonts\\verdana.ttf");
})
.PagesFooter(footer =>
{
footer.DefaultFooter(DateTime.Now.ToString("MM/dd/yyyy"));
})
.PagesHeader(header =>
{
header.DefaultHeader(defaultHeader =>
{
defaultHeader.RunDirection(PdfRunDirection.LeftToRight);
});
})
.MainTableTemplate(template =>
{
template.BasicTemplate(BasicTemplate.SilverTemplate);
}) …Run Code Online (Sandbox Code Playgroud) 我想使用ASP.NET创建一个登录页面.我不想使用ASP.NET登录控件.
我该怎么做呢?
我是jQuery验证插件(validationengine)的首发.我写了这段代码
<head runat="server">
<title></title>
<link href="validationEngine.jquery.css" rel="stylesheet" type="text/css" />
<script src="jquery-1.6.min.js" type="text/javascript"></script>
<script src="jquery.validationEngine-fa.js" type="text/javascript"></script>
<script src="jquery.validationEngine.js" type="text/javascript"></script>
<script>
$(function () {
jQuery("#form1").validationEngine();
$("#Button1").click(function () {
alert("hhhhhhhhhhh");
});
});
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<asp:Button ID="Button2" runat="server" Text="Button" onclick="Button2_Click" />
<input id="Text1" type="text" class="validate[required] text-input" />
<input id="Button1" type="button" value="button" />
</div>
</form>
</body>
Run Code Online (Sandbox Code Playgroud)
我想在用户点击Button1时首先验证表单.如果表单在显示中是有效的警报,但是当用户点击button1警告时,通过此代码显示.
我是 kendo ui 的初学者,我想使用 kendoUi 窗口,但我在使用时遇到一些问题,我编写了这段代码来创建窗口
@(Html.Kendo().Window().Name("Details")
.Title("Customer Details")
.Visible(false)
.Modal(true)
.Draggable(true)
.Width(300)
)
Run Code Online (Sandbox Code Playgroud)
LoadContentFrom在页面中我有一些按钮,我希望当用户单击使用 jquery 动态设置的该按钮之一时。但我不知道该怎么做。请帮我。谢谢大家。
c# ×4
asp.net ×3
janus ×2
jquery ×2
asp.net-mvc ×1
c#-4.0 ×1
gridex ×1
itextsharp ×1
join ×1
kendo-ui ×1
linq ×1
pdfptable ×1
security ×1
sql-server ×1
validation ×1