可能重复:
在登录Windows之前如何启动WPF应用程序?
我用C#编写了一个应用程序.我想在登录Windows操作系统之前运行我的应用程序(在Windows操作系统预加载之后).我怎样才能做到这一点?
我有关于C#的问题.如何使用C#中的计算机找到的那些无线网络填充列表框?
我编写了一个在C#中连接到SQL数据库的应用程序.有两种形式.
我有第一种形式的DataGrid.Datagridview中有ID,AD,SOYAD等列.
我有第二种形式的DataGrid(frm4),Datagridview中有ID,AD,SOYAD等列.
我将ContextMenuStrip放在第一个DataGridView中.
我的问题是:我想在第二个DataGridView中添加在第一个DataGridView中选择的那些行.
frm4.dataGridView1.Rows[0].Cells[0].Value = dataGridView1.CurrentRow.Cells[0].Value.ToString();
frm4.dataGridView1.Rows[0].Cells[1].Value = dataGridView1.CurrentRow.Cells[1].Value.ToString();
frm4.dataGridView1.Rows[0].Cells[2].Value = dataGridView1.CurrentRow.Cells[2].Value.ToString();
Run Code Online (Sandbox Code Playgroud)
我只能用上面的代码添加一行.但是,我想添加多行.我正在使用下面的代码.但是,它不起作用.
for (int i = 0; i < length; i++)
{
frm4.dataGridView1.Rows[0].Cells[0].Value = dataGridView1.CurrentRow.Cells[0].Value.ToString();
frm4.dataGridView1.Rows[0].Cells[1].Value = dataGridView1.CurrentRow.Cells[1].Value.ToString();
frm4.dataGridView1.Rows[0].Cells[2].Value = dataGridView1.CurrentRow.Cells[2].Value.ToString();
}
Run Code Online (Sandbox Code Playgroud)