16,004,761 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Zain -Ul- Arifeen (Top 24 by date)
Zain -Ul- Arifeen
10-Aug-17 9:40am
View
Deleted
Can you tell me, my webservice is ok or not. return data of this service is <string>[{"ProductName":"BD-1","PurchasePrice":165.00}]</string> how to handle this data android
Zain -Ul- Arifeen
10-Aug-17 9:40am
View
Deleted
Can you tell me, my webservice is ok or not. return data of this service is <string>[{"ProductName":"BD-1","PurchasePrice":165.00}]</string> how to handle this data android
Zain -Ul- Arifeen
10-Aug-17 9:31am
View
Can you tell me, my webservice is ok or not. return data of this service is <string>[{"ProductName":"BD-1","PurchasePrice":165.00}]</string> how to handle this data android
Zain -Ul- Arifeen
24-Mar-15 11:41am
View
thanx
Zain -Ul- Arifeen
24-Mar-15 2:54am
View
sir
i have checked everything in the os is ok
my application is working three days (whole day and night continuouly) on the machine atfer three day my application get hang as well as os
plz, plz, help me
Zain -Ul- Arifeen
24-Mar-15 1:33am
View
Sir
i have installed time the fresh windows 8.1 in this computer in this current month but this machine get hang after three days or two days. i am using in this machine desktop base application.
desktop application details
C# language
.net framework 4.5
Digitalpersona SDK
Plz plz plz plz help me
Zain -Ul- Arifeen
13-Sep-13 10:15am
View
if i take loop on it then duplicate value insert in the datagridview.
like my code
For example:
for(int i=0; i
Zain -Ul- Arifeen
17-Jun-13 13:52pm
View
try this code.....
sql.AppendLine("SELECT * FROM WP_advUploads");
sql.AppendLine("WHERE imageID='"+textbox1.Text+"'");
Zain -Ul- Arifeen
2-Mar-13 2:20am
View
dear sir the database contains valid values.but I m getting error again and again. there is no row at position 8 or 2 or 4 etc
Zain -Ul- Arifeen
13-Feb-13 11:07am
View
dear sir,
if u will guid me on this question with code or demo.
that is better for me.
thanx
Zain -Ul- Arifeen
31-Jan-13 13:04pm
View
Deleted
You can check if a connection string is valid, or indeed build a valid connection string that you can copy, by using the SQL/Database Connection utility that ships with VS2010. In VS2010 goto Tools, Connect to database. This will launch the connection dialog; here you can build and test connection strings. For advance connection features, once in the dialog click Advanced. From the advance dialog you can copy and paste connection strings.
Zain -Ul- Arifeen
31-Jan-13 13:02pm
View
Dear Sir,
my Sql Server Services and Sql Browser services is correctly running.but still give me this types of error. and the following is my connection string
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.SqlClient;
namespace ADMSV1
{
class ConnectionString
{
public static SqlConnection cnn = new SqlConnection("Data Source=zain\\sqlexpress;Initial Catalog=ADMSV01;Integrated Security=True");
}
}
Zain -Ul- Arifeen
8-Dec-12 21:01pm
View
R/Sir,
i want don't load my gridview from the old data(old records present in the table).so i want to load or show the current record when i entered from the text box.
like this
Zain -Ul- Arifeen
3-Dec-12 4:46am
View
give the same types of Error
Zain -Ul- Arifeen
3-Dec-12 4:45am
View
textbox for the date
Zain -Ul- Arifeen
23-Nov-12 4:22am
View
Dear Sir,
i use the following code,but it does not pass values to the textbox in the user form fro the datagridview and give me this Error in the folowing statement;
Statement:txtusername.text=dr.Cells[0].Value.ToString();
Error:
"An unhandled exception of type 'System.NullReferenceException' occurred in Company Accounts.exe
Additional information: Object reference not set to an instance of an object."
///this is my formuserslection code.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace Company_Accounts
{
public partial class FrmUserSelection : Form
{
DataSet ds = null; // Set null here
public FrmUserSelection()
{
InitializeComponent();
}
private void FrmUserSelection_Load(object sender, EventArgs e)
{
fillgrid();
ControlBox = false;
usdgv.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable;
txtwildsearch.Focus();
//this.usdgv.Columns["Password"].Visible = false;
}
private void fillgrid()
{
ds=new DataSet(); //Create new obj here
ConnectionString.cnn.Open();
SqlDataAdapter da = new SqlDataAdapter("select username as [User Name],Password,Title, userrole,logincomputer as [Login Computer] ,logindate as [Login Date] ,Logintime as [Login Time] from login", ConnectionString.cnn);
da.Fill(ds, "tbl_login");
usdgv.DataSource = ds.Tables["tbl_login"];
ConnectionString.cnn.Close();
}
private void usdgv_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
{
FrmUser.dr = usdgv.CurrentRow;
fillgrid();
this.Close();
}
private void btnwildsearch_Click(object sender, EventArgs e)
{
FrmUser.dr = usdgv.CurrentRow;
this.Close();
}
private void usdgv_CellClick(object sender, DataGridViewCellEventArgs e)
{
label1.Text ="" +usdgv.Columns[usdgv.CurrentCell.ColumnIndex].HeaderText + " ";
s1.Text = "" + usdgv.Columns[usdgv.CurrentCell.ColumnIndex].HeaderText + " ";
s2.Text = "" + usdgv.Columns[usdgv.CurrentCell.ColumnIndex].HeaderText + " ";
s3.Text = "" + usdgv.Columns[usdgv.CurrentCell.ColumnIndex].HeaderText + " ";
}
private void txtwildsearch_TextChanged(object sender, EventArgs e)
{
DataView dt = ds.Tables[0].DefaultView;
string tbcolumn;
try
{
tbcolumn = usdgv.Columns[usdgv.CurrentCell.ColumnIndex].HeaderText.ToString();
dt.RowFilter = string.Format("" + tbcolumn + " ='{0}'", txtwildsearch.Text);
if (dt.Count > 0)
{
usdgv.DataSource = dt;
}
else
{
usdgv.DataSource = 0;
}
if (usdgv.RowCount == 0)
{
usdgv.DataSource = ds.Tables[0].DefaultView;
}
}
catch (Exception)
{
}
}
}
}
////and this is the user form code.
public static DataGridViewRow dr;
FrmUserSelection fus = new FrmUserSelection();
private void btnsearch_Click(object sender, EventArgs e)
{
DataCollection();
}
private void DataCollection()
{
fus.ShowDialog();
txtusername.Text = dr.Cells[0].Value.ToString();
txtpassword.Text = dr.Cells[1].Value.ToString();
txttitle.Text = dr.Cells[2].Value.ToString(
Zain -Ul- Arifeen
21-Nov-12 6:39am
View
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Company_Accounts
{
public partial class MyMessageBox : Form
{
static MyMessageBox newMessageBox;
static string Button_id;
public static DataGridViewRow dr;
public Timer msgTimer;
int disposeFormTimer;
public MyMessageBox()
{
InitializeComponent();
}
private void MyMessageBox_Load(object sender, EventArgs e)
{
ControlBox = false;
disposeFormTimer = 30;
newMessageBox.lblTimer.Text = disposeFormTimer.ToString();
msgTimer = new Timer();
msgTimer.Interval = 1000;
msgTimer.Enabled = true;
msgTimer.Start();
msgTimer.Tick += new System.EventHandler(this.timer1_Tick );
}
public static string ShowBox(string txtMessage, string txtTitle)
{
newMessageBox = new MyMessageBox();
newMessageBox.label3.Text = txtTitle;
newMessageBox.label1.Text = txtMessage;
newMessageBox.ShowDialog();
return Button_id;
}
private void btnlist_Click(object sender, EventArgs e)
{
newMessageBox.msgTimer.Stop();
Button_id = "3";
this.Hide();
this.Close();
}
private void btnrenter_Click(object sender, EventArgs e)
{
newMessageBox.msgTimer.Stop();
Button_id = "1";
this.Close();
}
private void btnadd_Click(object sender, EventArgs e)
{
newMessageBox.msgTimer.Stop();
Button_id = "2";
this.Close();
}
private void timer1_Tick(object sender, EventArgs e)
{
disposeFormTimer--;
if (disposeFormTimer >= 0)
{
newMessageBox.lblTimer.Text = disposeFormTimer.ToString();
}
else
{
newMessageBox.msgTimer.Stop();
newMessageBox.msgTimer.Dispose();
newMessageBox.Dispose();
}
}
}
}
this my form code.
Zain -Ul- Arifeen
19-Nov-12 4:57am
View
how to specify table or dataset in which you fatch data from database server in th datasource.
sir, i am the beginner of this language.
plz,plz,plz, help me
Zain -Ul- Arifeen
3-Nov-12 0:30am
View
sir I want to complete remove the exit button from the title bar in windows form.
plz,plz,
Zain -Ul- Arifeen
2-Nov-12 8:57am
View
Deleted
thank you so much;
Zain -Ul- Arifeen
31-Oct-12 9:49am
View
thank you so much
Zain -Ul- Arifeen
30-Oct-12 12:46pm
View
plz, plz, sir ,can you explain me this in the form picture with code. plz, plz, plz, plz, plz,.....
Zain -Ul- Arifeen
30-Oct-12 12:43pm
View
plz,plz,plz,plz,plz sir write the complete code .or put statement in my code.Dn't mind it,because i am beginner..
Zain -Ul- Arifeen
30-Oct-12 5:20am
View
This is My the First Form(Form1) Code.
private void btnsearch_Click(object sender, EventArgs e)
{
Form2 f2 = new Form2();
f2.Show();
}
And this is my second From(Form2 (datagridview)) Code.
public partial class form_userselection : Form
{
FrmUsers fpc = new FrmUsers();
DataSet ds = new DataSet();
public form_userselection()
{
InitializeComponent();
}
private void form_userselection_Load(object sender, EventArgs e)
{
try
{
SqlDataAdapter da = new SqlDataAdapter("select * from login", ConnectionString.cnn);
da.Fill(ds, "auth_table");
dataGridView1.DataSource = ds.Tables["auth_table"];
}
catch (Exception)
{
//throw;
}
}
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
{
FrmUsers fu = new FrmUsers();
fu.txtpassword.Text = dataGridView1.CurrentRow.Cells[0].Value.ToString();
fu.txttitle.Text = dataGridView1.CurrentRow.Cells[1].Value.ToString();
fu.txtuserrole.Text = dataGridView1.CurrentRow.Cells[2].Value.ToString();
fu.txtlogincmpt.Text = dataGridView1.CurrentRow.Cells[3].Value.ToString();
fu.txtlogindate.Text = dataGridView1.CurrentRow.Cells[4].Value.ToString();
fu.txtlogintime.Text = dataGridView1.CurrentRow.Cells[5].Value.ToString();
}
}
}
when i select one row from the datagridview ,the datagridview form disappear and does not set record to the text box in the form1.
Show More