|
|
It's to early in the morning to be sarcastic, it's especially to early to read your stupidity.
|
|
|
|
|
Rajdeep.NET wrote: What code should I implement in the Button_Click event handler in order to do so?
MessageBox.Show("Bye. See You");
Application.Exit();
That would be the best code you can write and the most best help that you can offer your users without tormenting them through the numerous coding horrors that I could speculate from you.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!
|
|
|
|
|
code for Autogerate number in a datagrid field
|
|
|
|
|
You should see someone about that stutter.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
And I was just wondering what the question was. Thanks for clarifying!
Henry Minute wrote: stutter
Excellence is doing ordinary things extraordinarily well.
|
|
|
|
|
I used it successfully for grid.fronend-c# , Backend-sql2005.
Using following code u can auto generate no. from database.
1.open command.
2.use data reader.
and write this code
while(dr.read())
{
int c1=c1+1;
}
c1=c1+1;
dgv.rows[no.].cells[0].value=c1.tostring(); //dgv=datagrid view name
|
|
|
|
|
There are so many things wrong with this code it's silly. Thankfully, I will never have to follow you and support/cleanup your code.
Your simple little algorithm does work, though VERY inefficiently, and only when there is but a single user of your database.
When you expand this so more than one user is creating a new record at the same time, your code breaks, so severely, it corrupts the database, puts an enormous load on the SQL server and network carrying the data, and will get slower and slower as the number of records in the table climbs.
Ask youself this. What if a second client ran this same code at nearly the same time? Both clients would get the same last record ID, and both add 1 to it, and both create a new record with the same new ID, but different data. Congratulations! You just corrupted your database to the point where you can't easily recover, if at all!
Your application should never generate it's own sequential record ID's. This should be left up to the database itself, when concurrancy issues like this can be controlled.
|
|
|
|
|
How to add autogenerate number in datagrid
|
|
|
|
|
You can't. The database generates it so you can only display it.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
You need to clarify your question, in order to make us understand the problem clearly. Make your query descriptive dude Check out the links given below:
ClickHere
www.daniweb.com/forums/thread105333.html[^]
P.S. You should have googled for this, before posting it here.
|
|
|
|
|
Rajdeep.NET wrote: P.S. You should have googled for this, before posting it here.
Thats rich, coming from someone who asks how write to a file 5 minutes later
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
So you do know how to use Google then? And here I was thinking that you didn't know how to google.
Excellence is doing ordinary things extraordinarily well.
|
|
|
|
|
How to convert these code to C#? Thanks!
memset(m_bParameterData, 0, sizeof(m_bParameterData));
Float2IEEE((float)EXTERNAL, m_bParameterData);
|
|
|
|
|
The memset is there to clear out the memory that the pointer is pointing to. I believe you should be able to ignore that here.
As for the other function, I have no idea what it is. Where was it being used before? Is it in an external DLL?
My current favourite word is: Delicious!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
Hi all,
In my case, i am getting the datatable(dt1) and then bind to gridview (gv1). And in the gv1 i am already add the TemplateField(checkbox) for each rows.
My question is how can i delete the datarow according the checkbox(if checked) in the gv1 ?
any helps are welcome.
regards
cocoonwls
|
|
|
|
|
Assuming that you are actually using a DataGridView.
Iterate over the Rows collection, and delete those that have the CheckBox checked.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
|
I would like to know how to detect through c# programming if Acrobat Reader or Adobe Acrobat Professional is actually running.
Thanks a lot.
|
|
|
|
|
|
System.Diagnostics.Process[] processes = System.Diagnostics.Process.GetProcessesByName("AcroRd32");
if (processes.Length >= 1)
{
Response.Write("Acrobat Running");
}
else
{
Response.Write("Acrobat Not Running");
}
can we get the reference of the file for which the AcroRd32.exe is applied. If so, How?
|
|
|
|
|
if i want to develop mobile application from where i should start?
|
|
|
|
|
|
|
Hi everibody
I'm trying to make a simple drag and drop of strings between 2 list (or other control wich is appropriate), but I can't succed to realize this. I looking for a tutorial, or a guide wich can explain to me how to implement this simple functionality with events. There some example on the net, and on the CodeProject website, but i can't succeded to run them properly on VS2008.
If anybody can explain me how to realize this simple drag and drog, I'll be very gratefull
best regards.
|
|
|
|