15,905,420 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 Python 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 Peter M. Adeeb (Top 23 by date)
Peter M. Adeeb
4-Jan-16 10:53am
View
that's it
now you got me
can you give me sample code to trace last row and then draw subtotal label ??
Peter M. Adeeb
4-Jan-16 10:45am
View
thanks @ryandev for respond
i want to draw subtotal label in print document after drawing dgv rows
the problem i can't give subtotal label fixed value like
new point (100,100)
because dgv rows changeable size dependes in number of rows
i hope you understood me
i'm sorry for my bad english
Peter M. Adeeb
4-Jan-16 10:27am
View
i'm asking how ???
Peter M. Adeeb
4-Jan-16 10:13am
View
e.Graphics.FillRectangle(Brushes.Yellow, new Rectangle(30, height, 60, dataGridView5.Rows[0].Height));
e.Graphics.DrawRectangle(p, new Rectangle(30, height, 60, dataGridView5.Rows[0].Height));
e.Graphics.DrawString(dataGridView5.Columns[9].HeaderText.ToString(), new Font("Arial", 10, FontStyle.Bold), Brushes.Black, new Rectangle(30, height, 60, dataGridView5.Rows[0].Height), stringFormat);
int Height1 = 0;
Height1 = 150;
while (i < dataGridView5.Rows.Count)
{
if (Height1 > e.MarginBounds.Height)
{
Height1 = 150;
e.HasMorePages = true;
return;
}
Height1 += dataGridView5.Rows[i].Height;
e.Graphics.DrawRectangle(p, new Rectangle(30, Height1, 60, dataGridView5.Rows[0].Height));
e.Graphics.DrawString(dataGridView5.Rows[i].Cells[9].FormattedValue.ToString(), new Font("Arial", 10, FontStyle.Bold), Brushes.Black, new Rectangle(30, Height1, 60, dataGridView5.Rows[0].Height), stringFormat);
i++;
}
i = 0;
}
Peter M. Adeeb
4-Jan-16 10:07am
View
the problem is here
i can't give label fixed location in print document like that(( new Point(100, 100) ))
because dgv hasn't fixed number of rows
i want to add subtotal label after last row of dgv in print document
Peter M. Adeeb
4-Jan-16 10:01am
View
please review the improve
thanks
Peter M. Adeeb
4-Jan-16 9:49am
View
i'm using code like that
e.Graphics.DrawString(label51.Text.ToString(), new Font("Arial", 10, FontStyle.Bold), Brushes.Black, new Point(100, 100), format);
now i want to add sub_total after dgv rows @ last print page only
Peter M. Adeeb
4-Jan-16 9:46am
View
Deleted
Peter M. Adeeb
4-Jan-16 9:43am
View
Deleted
i want to add total row to print page after dgv tabels (total column)
in winforms applications
Peter M. Adeeb
4-Jan-16 9:43am
View
i want to add total row to print page after dgv tabels
in winforms applications
Peter M. Adeeb
25-Feb-15 15:21pm
View
the rows added dynamically .
each row has two combobox (combo1 , combo2 )
the problem (if i select an item from combo1 in any row all combo1 in other rows display the same item) the same thing for combo2 .
i want each row doesn't effected by other rows .
sorry for bad English , :D thanks in advance
Peter M. Adeeb
26-Jan-15 11:33am
View
i tried many simple but doesn't give the required result ,
could you give me an example code and i'll try it ,
many thanks for you and for your response sir ,,,, .
Peter M. Adeeb
26-Jan-15 11:27am
View
no , each id has one name
Peter M. Adeeb
24-Jan-15 11:38am
View
thanks for response . it works thanks ,
but why when selecting an item from combo1 , combo2 dosen't show the value member ,
any ideas ??
Peter M. Adeeb
13-Dec-14 6:31am
View
No , i hope to find a perfect code
Peter M. Adeeb
11-Dec-14 7:41am
View
i tried to use this code but the result combobox is cleared
i don't know where is the drop ??
Peter M. Adeeb
11-Dec-14 7:39am
View
i privent duplicates using this code for each combobox :
List<object> list = new List<object>();
{
foreach (object o in customer_txt.Items)
{
if (!list.Contains(o))
{
list.Add(o);
}
}
customer_txt.Items.Clear();
customer_txt.Items.AddRange(list.ToArray());
Peter M. Adeeb
11-Dec-14 7:34am
View
i know praveen i put this code in Add button ,
i just want any body write just a perfect code as i mention ,thanks
Peter M. Adeeb
11-Dec-14 7:15am
View
i don't use data binding on combobox , my code to add combobox items is:
connection.Open();
OleDbCommand cmd = new OleDbCommand();
cmd.Connection = connection;
string query = "select * from client_details";
cmd.CommandText = query;
OleDbDataReader reader = cmd.ExecuteReader();
while (reader.Read())
{
country_txt.Items.Add(reader["country_name"].ToString());
customer_txt.Items.Add(reader["customer_name"].ToString());
}
Peter M. Adeeb
18-Aug-14 9:46am
View
an error happened
(( alarm_test.Form1.button1_Click(object, System.EventArgs)' is inaccessible due to its protection level ))
note: button1 in form1 modifier in public
Peter M. Adeeb
18-Aug-14 8:00am
View
i mean the second one
Peter M. Adeeb
18-Aug-14 7:39am
View
I think you didn't define (sndplayer)
the miss code is
soundplay snplayer= new soundplay (alarm_test.properties.resources.alarm);
thanks for the replay ,
Peter M. Adeeb
18-Aug-14 7:36am
View
great, when i put the code in form1_load it doesn't work well but, when i put it in time tick it's working well , thanks
Show More