小编Uth*_*raj的帖子

在DataGridView中以编程方式选择行

我希望在某些事件之后选择之前选定行的行,我的代码如下所示.

int currentRow = dgvIcbSubsInfo.CurrentCell.RowIndex;
//code to execute
dgvIcbSubsInfo.Rows[currentRow].Selected = true;
Run Code Online (Sandbox Code Playgroud)

执行代码后,预览将如下所示.但我需要>在id = 1272741(蓝色选择)中获取符号,而不是在1272737中

在此输入图像描述

.net c# datagridview visual-studio-2010

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

TypeScript错误TS5014:位于0的JSON中出现意外的标记u

我正在尝试将.ts编译为.js

我有tsconfig.json如下

{
"compilerOptions": {
    "target": "es5",
    "module": "commonjs",
    "sourceMap": true,
    "outFile": "build/test.js"
},
"exclude": [
    "node_modules"
]
}
Run Code Online (Sandbox Code Playgroud)

下面是我的 package.json

{
"name": "test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"tsc": "^1.20150623.0",
"typescript": "^2.4.2"
}
}
Run Code Online (Sandbox Code Playgroud)

并且自动生成的内容tasks.json如下所示

{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
    {
        "type": "typescript",
        "tsconfig": "tsconfig.json", …
Run Code Online (Sandbox Code Playgroud)

javascript json typescript typescript-compiler-api

8
推荐指数
3
解决办法
6968
查看次数

欧元符号未在Windows窗体中查看

我试图使用以下代码在我的Windows窗体应用程序中打印欧元符号.它适用于所有其他字符和符号,但不显示欧元(€).

string input = ((char)128).ToString();
Font f = new System.Drawing.Font("Arial", 12f);
Graphics gr = this.CreateGraphics();
gr.DrawString(input, f, Brushes.Black, new PointF(0, 0));
Run Code Online (Sandbox Code Playgroud)

128 - 是欧元符号的小数可以有人帮忙吗?

.net c# winforms euro

0
推荐指数
1
解决办法
2628
查看次数

将数据从datagridview保存到sql c#

尝试使用存储过程将行保存datagridviewSQL Server表时出现问题。

这是 C# 代码:

SqlConnection con = new SqlConnection("server= localhost;Database = Vehiculum ;integrated Security = true");
con.Open();

SqlCommand cmd = new SqlCommand("inserproducts", con);
cmd.CommandType = CommandType.StoredProcedure;

  SqlConnection con = new SqlConnection("server= localhost;Database = Vehiculum ;integrated Security = true");
        con.Open();
        SqlCommand cmd = new SqlCommand("insertservisi", con);
        cmd.CommandType = CommandType.StoredProcedure;

        for (int i = 0; i < dtgservisimi.Rows.Count; i++)
        {

            cmd.Parameters.AddWithValue("@kategoria", dtgservisimi.Rows[i].Cells[0].Value);
            cmd.Parameters.AddWithValue("@servisimi", dtgservisimi.Rows[i].Cells[1].Value);
            cmd.Parameters.AddWithValue("@barkodi", dtgservisimi.Rows[i].Cells[2].Value);
            cmd.Parameters.AddWithValue("@emertimi", dtgservisimi.Rows[i].Cells[3].Value);
            cmd.Parameters.AddWithValue("@sasia", dtgservisimi.Rows[i].Cells[4].Value);
            cmd.Parameters.AddWithValue("@garancioni", dtgservisimi.Rows[i].Cells[5].Value);



            cmd.Parameters.AddWithValue("@emri", txtemri.Text);
            cmd.Parameters.AddWithValue("@mbiemri", txtmbiemri.Text);
            cmd.Parameters.AddWithValue("@telefoniI", …
Run Code Online (Sandbox Code Playgroud)

c# sql sql-server stored-procedures

0
推荐指数
1
解决办法
182
查看次数