15,892,072 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 Member 12245539 (Top 125 by date)
Member 12245539
22-Jul-21 14:08pm
View
Asp.net with C#
Member 12245539
22-Jul-21 3:29am
View
karthik Sir,
You have helped me a lot. Sir can you solve my one more question
the code is here..
private void button1_Click(object sender, EventArgs e)
{
int amount = Convert.ToInt32(textBox1.Text.Trim());
for (int i = 1; i < dgv.Columns.Count; i++)
{
foreach (DataGridViewRow row in dgv.Rows)
{
int value = Convert.ToInt32(row.Cells[i].Value);
if (amount >= value)
amount = amount - value;
else if (amount == 0)
row.Cells[i].Value = amount;
else
{
row.Cells[i].Value = amount;
amount = 0;
}
}
}
}
I want to covert this window to web and the same should work through javascrip
Member 12245539
19-Nov-19 12:32pm
View
5 star
Member 12245539
20-Apr-19 12:13pm
View
for this I am rating 5..
Member 12245539
20-Apr-19 10:20am
View
Only want to change in UI..
Member 12245539
20-Apr-19 9:54am
View
This data comes from SQL server
Member 12245539
20-Apr-19 9:52am
View
SQL Server
Member 12245539
20-Apr-19 9:47am
View
Yes
Member 12245539
20-Apr-19 9:36am
View
For EMPID 1, in same date it has three entries such as 07.30, 12.30 and 13.00. Now I want keep only 1 entry and last entry...
Member 12245539
8-Feb-19 12:22pm
View
plz help I have already gone through this link...
Member 12245539
8-Feb-19 12:11pm
View
It shows.
Msg 156, Level 15, State 1, Line 2
Incorrect syntax near the keyword 'unpivot'.
Member 12245539
1-Feb-19 11:49am
View
Yes, please help
Member 12245539
22-Dec-17 11:29am
View
select t.*, std_id,sub_id, t.term_I + t.term_2,
case when t.term_I + t.term_2 >= 50 then 'pass' else 'fail' end as status,
case when t.term_I + t.term_2 = 100 then 'PRMOTED' else 'REAPEATER' end as promotion_status
from tbl_marks t
I have run this query but in all sub_id showing Repeater... I want to group by Std_Id...
Member 12245539
22-Dec-17 11:27am
View
Deleted
select t.*, std_id,sub_id, t.term_I + t.term_2,
case when t.term_I + t.term_2 >= 50 then 'pass' else 'fail' end as status,
case when t.term_I + t.term_2 = 100 then 'PRMOTED' else 'REAPEATER' end as promotion_status
from tbl_marks t
Member 12245539
22-Dec-17 10:46am
View
thanks..
Member 12245539
22-Dec-17 10:46am
View
It is only request not force.....
Member 12245539
5-Oct-17 2:18am
View
Thanks
Member 12245539
3-Oct-17 12:08pm
View
Boss
I you don't mind then may I ask a little bit??
I want to show col1, col2 & col3 also like
ID COL1 COL2 COL3 TOTAL
1 20 25 50 95
2 30 35 60 125
3 AB AB 50 50
Member 12245539
28-Sep-17 4:47am
View
5 star
Member 12245539
3-Jul-17 15:21pm
View
Now its working fine.
But if you don't mind then I would like to know how can be cleared all rows after getting result...
I mean I want clear "resultset" so that data will not repeat..
Member 12245539
3-Jul-17 4:31am
View
Thanks
5 stars
Member 12245539
3-Jul-17 4:19am
View
but my gridcontrol is binded with ado.net.....
Member 12245539
9-May-17 3:46am
View
5
Member 12245539
29-Apr-17 22:29pm
View
My question is something else .
Member 12245539
1-Mar-17 22:45pm
View
5
Member 12245539
4-Dec-16 23:22pm
View
ok
thanks
Member 12245539
4-Dec-16 23:04pm
View
Fee_Receipt_Students is view only not a table.....
Member 12245539
2-Dec-16 2:27am
View
Please look into question closer. The question is very sharp..
Member 12245539
1-Dec-16 10:49am
View
Could you help???
Member 12245539
1-Dec-16 10:47am
View
I want result like
S_Adm_No| Student | FheadId |FHead | Apr | May | Jun | Q1 |R_Amt|Bal |
1001 | Ramesh | 1 | Admission Fee | 25000 | 0 | 25000 |50000|63200|5700 |
1001 | Ramesh | 2 | Annual Fee | 6600 | 0 | 6600 |13200|63200|5700 |
1001 | Ramesh | 3 | Tuition Fee | 1900 |1900 | 1900 | 5700|63200|5700 |
Member 12245539
5-Oct-16 1:35am
View
compiler jumps from
if (FileUpload1.HasFile) to end of closeline "}"
Member 12245539
5-Oct-16 1:35am
View
Sir I tried this but nothing happens....
Member 12245539
5-Oct-16 1:03am
View
No file I have to select.......
Member 12245539
5-Oct-16 0:58am
View
string filename = Path.GetFileName(FileUpload1.PostedFile.FileName);
Member 12245539
9-Sep-16 2:09am
View
okz....
Thanks......
Member 12245539
9-Sep-16 0:50am
View
Ok Sir...
As per your recommendation I have done. And sum of all rows is working.But Fine scheme it has to be implemented...
Member 12245539
8-Sep-16 0:39am
View
Sir is it done???
Member 12245539
7-Sep-16 12:07pm
View
6618
Member 12245539
7-Sep-16 12:01pm
View
185 888 701
2330
Member 12245539
7-Sep-16 11:59am
View
okShould I tell ID and Pass??
Member 12245539
7-Sep-16 9:33am
View
Boss I am Back........
Member 12245539
7-Sep-16 0:08am
View
Yes
India
New delhi
Member 12245539
7-Sep-16 0:06am
View
OK
Member 12245539
7-Sep-16 0:02am
View
Yes I have........
Member 12245539
2-Sep-16 8:25am
View
This is a DataGridView Control. The values come from sql table.
S_Id | Apr | May | Jun | Fine | Total
1001 | 100 | 100 | 100 | 0 | 0
1002 | 0 | 200 | 200 | 0 | 0
1003 | 300 | 200 | 200 | 0 | 0
Besides this,
There are three checkboxes also available in right side of DataGridView in the name of Apr_CheckBox, May_CheckBox & Jun_CheckBox.
Now, my question if I click on Apr_CheckBox then the value of DataGridView Apr column should display in last column i.e. Total of all rows like
S_Id | Apr | May | Jun | Fine | Total
1001 | 100 | 100 | 100 | 0 | 100
1002 | 0 | 200 | 200 | 0 | 0
1003 | 300 | 200 | 200 | 0 | 100
besides this.
One formula should be there for fine column. If PC's(System) date is 20.04.2016 then it should count the days between 15.04.2016 to 20.04.2016 and multiply with 5. After multiplication it should show the multiplication values in fine column. like
Assume that between 16.04.2016 to 20.04.2016 days is 5.
S_Id | Apr | May | Jun | Fine | Total
1001 | 100 | 100 | 100 | 25 | 100
1002 | 200 | 200 | 200 | 0 | 100
1003 | 300 | 200 | 200 | 25 | 100
similar for two more columns May and June.
Perhaps it is understandable.......
Sir Plz see.......
Member 12245539
2-Sep-16 4:46am
View
No sir I am still waiting.......
Member 12245539
1-Sep-16 4:28am
View
No sir!
Actually I don't get idea. Plz help sir I highly obliged you..
Member 12245539
1-Sep-16 0:49am
View
Ok Sir....
Sorry..........
Member 12245539
30-Aug-16 6:08am
View
In which table will you store the values?????????
Member 12245539
30-Aug-16 6:06am
View
Send your sql table so that datatype can be known....
Member 12245539
30-Aug-16 5:56am
View
SEND YOUR SQL DATATYPE QUERRY...........
Member 12245539
30-Aug-16 1:13am
View
Boss I need your help plz see this link.....
http://www.codeproject.com/Questions/1121364/How-to-subtract-one-table-to-another-table-in-sqls
Member 12245539
29-Aug-16 23:22pm
View
OK THANKS
Member 12245539
29-Aug-16 22:44pm
View
Mr.Kartika plz do help plz!!!!!!!
The link is below.
http://www.codeproject.com/Questions/1121112/How-to-sum-datagridview-column-in-last-column-thro
Member 12245539
27-Aug-16 6:12am
View
Send your SQL_Table querry of all columns...
Member 12245539
27-Aug-16 6:02am
View
Ok
Thanks for your support.
Member 12245539
27-Aug-16 1:06am
View
Boss!
There are some changes occurred. FheadId is not specified.It will be increased as per requirement. So plz see and help............
Member 12245539
26-Aug-16 2:09am
View
thank you!
it is working ...
Member 12245539
26-Aug-16 1:32am
View
Boss!
The amount would be
cls_SecId S_Adm_No Installment Amount Payable_Date
1 1001 Q1 900 15.04.2015
1 1001 Q2 900 15.07.2015
1 1001 Q3 900 15.10.2015
1 1001 Q4 900 15.01.2015
instead of
cls_SecId S_Adm_No Installment Amount Payable_Date
1 1001 Q1 300 15.04.2015
1 1001 Q2 300 15.07.2015
1 1001 Q3 300 15.10.2015
1 1001 Q4 300 15.01.2015
I you look closer into you answer then there are three rows. So
3 rows * 100=300 * 3 columns (Apr + May + Jun)= 900
Row will be increased as per requirements...
Please see it and clarify .....
Member 12245539
24-Aug-16 3:43am
View
Ok thank you!
Member 12245539
24-Aug-16 3:32am
View
Deleted
Boss! Sorry to say..
little changes are there. I want subtract instead of sum of both tables.
**Fee_Assign_to_Students (-) Fee_Assign_Waiver_to_Students** requires
**Fee_Assign_to_Students (+) Fee_Assign_Waiver_to_Students** no need
Member 12245539
24-Aug-16 3:20am
View
Cannot find either column "T" or the user-defined function or aggregate "T.SUM", or the name is ambiguous.
Member 12245539
22-Aug-16 3:56am
View
Sir
Through declare is it working fine.
But If I get value from table Fee_Assign_to_Students then the values come like
1 2016/001 Q1 600 15.04.2015
1 2016/001 Q1 1500 15.04.2015
1 2016/001 Q1 15000 15.04.2015
1 2016/001 Q2 0 15.07.2015
1 2016/001 Q3 0 15.10.2015
1 2016/001 Q4 0 15.01.2015
1 2016/018 Q1 600 15.04.2015
1 2016/018 Q1 1500 15.04.2015
1 2016/018 Q1 15000 15.04.2015
1 2016/018 Q2 0 15.07.2015
1 2016/018 Q3 0 15.10.2015
1 2016/018 Q4 0 15.01.2015
Member 12245539
19-Aug-16 1:14am
View
Rows will be increased as per requirement. like
Transport Fee
Annual Fee
Admission Fee
and so on so ..........
Member 12245539
19-Aug-16 1:12am
View
Boss if I increase more rows in FeeAssigned then result is remains same.
StudentId APR MAY JUN JUL AUG SEP OCT NOV DEC JAN FEB MAR
STUD01 150 150 150 150 150 150 150 150 150 150 150 150
Member 12245539
17-Aug-16 3:54am
View
try
{
//FeeReport
PreviewPage Page = new PreviewPage();
string str = "select ReceiptNo, S_Adm_No, paid_date, S_Adm_No, Class, S_Name, S_F_Name, Mode_Payment,ChqNo,ChqDated, For_the_Month , FHeadId, FHead, TotalAmount, SUM (Apr + May+Jun+Jul+Aug+Sep+Oct+Nov+[Dec]+Jan+Feb+Mar) as FEE from View_Fee_Receipt_Students where ReceiptNo='" + txt_Recp.Text + "' group by ReceiptNo, S_Adm_No, paid_date, S_Adm_No, Class, S_Name, S_F_Name, Mode_Payment,ChqNo,ChqDated, For_the_Month , TotalAmount, FHeadId, FHead ";
FeeReceipt FEE = new FeeReceipt();
SqlDataAdapter sda = new SqlDataAdapter(str, con);
DataSet ds = new DataSet();
sda.Fill(ds, "Receipt");
if (ds.Tables[0].Rows.Count == 0)
{
MessageBox.Show("No data found plz check", "Information", MessageBoxButtons.OK);
return;
}
FEE.SetDataSource(ds);
Page.crystalReportViewer1.ReportSource = FEE;
Page.MdiParent = Form1.ActiveForm;
Page.Show();
this.Hide();
}
catch (ApplicationException ex)
{
MessageBox.Show(ex.Message);
}
Member 12245539
17-Aug-16 1:07am
View
On which PC I am developing. Crystal reporting showing fine. But If I take crystal report from another computer then It is error showing.
The type initializer for 'CrystalDecisions.Shared.SharedUtils' threw an exception
Member 12245539
17-Aug-16 0:18am
View
Sir, I want to display below mentioned code like
Month Amount
Apr + May + Jun its sum Amount
Jul + Aug + Sep its Sum Amount
Oct + Nov + Dec its sum amount
Jan + feb + Mar its sum amount
Sir please help.......
CREATE PROC GetFeeStructureForStud(@StudentId NVARCHAR(50))
AS
BEGIN
SELECT FA.StudentId,FA.[FEE HEAD],
FA.APR - ISNULL(FET.APR,0) AS APR,
FA.MAY - ISNULL(FET.MAY,0) AS MAY,
FA.JUN - ISNULL(FET.JUN,0) AS JUN,
FA.JUL - ISNULL(FET.JUL,0) AS JUL,
FA.AUG - ISNULL(FET.AUG,0) AS AUG,
FA.SEP - ISNULL(FET.SEP,0) AS SEP,
FA.OCT - ISNULL(FET.OCT,0) AS OCT,
FA.NOV - ISNULL(FET.NOV,0) AS NOV,
FA.DEC - ISNULL(FET.DEC,0) AS DEC,
FA.JAN - ISNULL(FET.JAN,0) AS JAN,
FA.FEB - ISNULL(FET.FEB,0) AS FEB,
FA.MAR - ISNULL(FET.MAR,0) AS MAR
FROM FeeAssigned FA LEFT JOIN
(SELECT FE.StudentId,FE.[FEE HEAD],
SUM(FE.APR) AS APR,
SUM(FE.MAY) AS MAY,
SUM(FE.JUN) AS JUN,
SUM(FE.JUL) AS JUL,
SUM(FE.AUG) AS AUG,
SUM(FE.SEP) AS SEP,
SUM(FE.OCT) AS OCT,
SUM(FE.NOV) AS NOV,
SUM(FE.DEC) AS DEC,
SUM(FE.JAN) AS JAN,
SUM(FE.FEB) AS FEB,
SUM(FE.MAR) AS MAR
FROM FeeExemption FE
GROUP BY FE.StudentId,FE.[FEE HEAD]) AS FET ON (FA.StudentId=FET.StudentId) AND (FA.[FEE HEAD]=FET.[FEE HEAD])
WHERE FA.StudentId=@StudentId
END
Member 12245539
8-Aug-16 0:00am
View
Thanks a lot!!!!!!
Member 12245539
7-Aug-16 23:16pm
View
If if all columns sum is 10000 and I enter 10100 in textbox then it should show a message (Plz chech your entry).
Member 12245539
7-Aug-16 23:08pm
View
I got for ignoring column NameId
I can do
"for (int i = 2; i < dgv.Columns.Count; i++)"
instead of
for (int i = 1; i < dgv.Columns.Count; i++)
But message I need... for increasing amount......
Member 12245539
7-Aug-16 22:55pm
View
It is perfectly working and sorry for telling you late that. There is one more column is available before name e.i NameId and NameId is hidden. Without NameId column it is working perfectly but if I add nameId column then I get an error
"Input string was not in a correct perfomat"
Besides this If all columns sum is 10000 and I enter 10100 in textbox then it should show a message (Plz chech your entry).
Member 12245539
7-Aug-16 9:26am
View
yes
Member 12245539
7-Aug-16 3:35am
View
No it will increase as per requirement
Member 12245539
7-Aug-16 3:13am
View
No it will increase as per requirement
Member 12245539
4-Aug-16 4:29am
View
Is is posible to pass value to Gridview?????????
Member 12245539
4-Aug-16 3:24am
View
DataSet ds = new DataSet();
private void Form1_Load(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection("Data Source=.;Initial Catalog=TOOOOOO;Integrated Security=True");
SqlDataAdapter sda = new SqlDataAdapter("select * from Table_Sale",con);
sda.Fill(ds);
dataGridView1.DataSource = ds.Tables[0];
}
Member 12245539
4-Aug-16 3:04am
View
Through DataSet.....
Member 12245539
4-Aug-16 2:47am
View
DataGridview is displaying at the time of FormLoad Event and Fruitname is empty at this time.
FruitId | FruitPrice | FruitName
1 | 100 |
2 | 200 |
3 | 300 |
After form loading I want to fill FruitName from another table who's Id is already present in Datagridivew. If I click on a button.
Member 12245539
4-Aug-16 1:30am
View
Ok Sir
Member 12245539
4-Aug-16 0:48am
View
Boss could you plz help me??
There is one Datagridview. It has three columns like
FruitId | FruitPrice | FruitName
1 | 100 |
2 | 200 |
3 | 300 |
these value comes from table_FruitPrice
Now finally I want to display in third column FruitName by its FruitId that is presenting in column one and FruitName will come from Table_FruitName.
joining method can work and it is working. But I want to display Fruitname in third column if I click on a button.
Plz sir help...
Member 12245539
4-Aug-16 0:42am
View
how to sorting by RecieptNo and s_adm_No in below querry........
SELECT RecieptNo, s_adm_No, FHeadID, sum(Apr + May + Jun + Jul + Aug + Sep) as Fee FROM tblPivotTest group by RecieptNo, s_adm_No, FHeadID
union all
SELECT RecieptNo, s_adm_No, 'Total' as FHeadID, sum(Apr + May + Jun + Jul + Aug + Sep) as Annual FROM tblPivotTest group by RecieptNo, s_adm_No)
Member 12245539
4-Aug-16 0:29am
View
Thanks
Finally it is working
Member 12245539
3-Aug-16 23:08pm
View
yes it was my mistake FheadId and FHead is same and data type is int. And month data is numeric (18,2) but s_adm_No is varchar.
Member 12245539
3-Aug-16 21:11pm
View
Boss This error occurs in both querry.....
Msg 245, Level 16, State 1, Line 2
Conversion failed when converting the varchar value 'Total' to data type int.
Member 12245539
3-Aug-16 4:38am
View
because
Two more table are there in name of Storate_Table & Sale_Table. Storage_table has a fixed quantity. And Sale_table is containing only the products have been sold out.
Datagridview showing the remaining quantities and for this I have fixed a subtract formula to subtract.
Member 12245539
3-Aug-16 2:42am
View
Yes exactly
But I want a different this values work form laod event
FruitId | FruitPrice | FruitName
1 | 100 |
2 | 200 |
3 | 300 |
And I want to display by hitting on button
FruitId | FruitPrice | FruitName
1 | 100 | Banana
2 | 200 | Tomato
3 | 300 | Orange
Member 12245539
3-Aug-16 1:55am
View
Send your SQL Table Script show that I can be verified the DataType......
Member 12245539
28-Jul-16 4:09am
View
These values come from SQL Table. Actually, these values are fee demand. And displaying installment wise. If candidate want to pay 1st Installment then the total amount of Inst1 Rs. 1700/- (if you see above that I mentioned in Datagridview cell2) and candidate wants to pay only Rs. 1500. There is one TextBox control is also available on same form. Now If I fill 1500 in textbox and click on Button then It should be adjustment with Rs.1500 rest amount should be displayed zero. As I mentioned below.
Fee | Inst1 | Inst2 | Inst3 | Inst4
Tuition Fee | 1000 | 1000 | 0 | 0
Transport Fee | 500 | 0 | 0 | 0
Science Fee | 0 | 0 | 0 | 0
perhaps It is understandable...
Member 12245539
28-Jul-16 3:06am
View
I could't get any idea that why I asked sir.....
Member 12245539
28-Jul-16 1:28am
View
Sir I have SMS API for sending bulk sms.
Now, my question is how can I send bulk sms. The number is present Datagridview cell[2] and message is present cell[3] as I mentioned above. I need the code.
Please held Sir!!
Member 12245539
20-Jul-16 5:36am
View
Sir could you please help me? Below is my question.
I have one Datagridview and it has three columns i.e.
==============================================
Name | Number | Message
==============================================
Rakesh | 0000000000 | Dear, Rakesh you are absent today.
Dinesh 5555555555 | Dear, Dinesh you are absent today.
Srikant | 1111111111 | Dear, Srikant you fee is not paid till date.
==============================================
I want to know that how to send multiple numbers with different messages at one time.
Please helm me!!
Thank you..
Member 12245539
19-Jul-16 23:54pm
View
Yes I have written this code but it is workable only for one mobile number. But I want to send to multiple numbers at one time. If you see above in my raised question. like
Name | Number | Message
==============================================
Rakesh | 0000000000 | Dear, Rakesh you are absent today.
Dinesh |5555555555 | Dear, Dinesh you are absent today.
Srikant| 1111111111 | Dear, Srikant you fee is not paid till date.
==============================================
This has been bounded with datagridview. If you see then one number for One message and another number for another message is showing. Now, I want to send at one time to all this number with their messages.
Please help!!!!!
Member 12245539
19-Jul-16 5:33am
View
Sir could you please help me? Below is my question.
I have one Datagridview and it has three columns i.e.
==============================================
Name | Number | Message
==============================================
Rakesh | 0000000000 | Dear, Rakesh you are absent today.
Dinesh 5555555555 | Dear, Dinesh you are absent today.
Srikant | 1111111111 | Dear, Srikant you fee is not paid till date.
==============================================
I want to know that how to send multiple numbers with different messages at one time.
Please helm me!!
Thank you..
Member 12245539
19-Jul-16 3:39am
View
Yes I have taken login authentication, but I don't get any idea to write the code for sending SMS from DatataGridView.
Member 12245539
18-Jul-16 0:50am
View
thank you so much
now it is workable.....
Member 12245539
17-Jul-16 7:27am
View
An error occurred. Object reference not set to an instance of an object
the code is below.
foreach (DataGridViewRow item in DataGridview_AfterSelect.Rows)
{
string value = item.Cells[0].Value.ToString();
foreach (DataGridViewRow row in DataGridview_toSelect.Rows)
{
var cell = row.Cells[0] as DataGridViewCheckBoxCell;
if (Convert.ToString(row.Cells[1].Value) + "" == value) cell.Value = true;
}
}
Member 12245539
17-Jul-16 6:43am
View
Boss Leave this. You read only this...
I have to update little bit in my question. There is two Datagridview on same winform first in name of DataGridview_toSelect and Second in name of DataGridview_AfterSelect
DataGridview_toSelect has two column i.e. ToCheck & Items and in DataGridview_AfterSelect only one comlumn i.e. Items
I want to mark check in DataGridview_toSelect only those that is appearing in DataGridview_AfterSelect
Member 12245539
17-Jul-16 6:29am
View
button click means!
The code will run on button1_click_event... because there is one button control also present.
Member 12245539
17-Jul-16 2:51am
View
Dear Karthik, it is working perfectly. Due to my mistake, I have to update little bit in my question. There is two Datagridview on same winform first in name of DataGridview_toSelect and Second in name of DataGridview_AfterSelect
DataGridview_toSelect has two column i.e. ToCheck & Items and in DataGridview_AfterSelect only one comlumn i.e. Items
I want to mark check in DataGridview_toSelect only those that is appearing in DataGridview_AfterSelect on clicking a button. Please tell me!!
Member 12245539
16-Jul-16 23:36pm
View
It is not working.
Member 12245539
16-Jul-16 4:32am
View
Basically, my database is on local (my pc) and on server (online). The main purpose to generate this script to replace over online day. The work is done on local server and after completion and want to update it on online too. I think this is the right way to manage data through online and offline.
Member 12245539
16-Jul-16 3:36am
View
No there are number of tables and views within the database.
Member 12245539
16-Jul-16 3:25am
View
ok
thanks
Member 12245539
16-Jul-16 3:11am
View
Mr. Karthik could you tell me one more question?
How I can generate SQL Database script with its all table values through C# programming??
Member 12245539
16-Jul-16 2:22am
View
No boss!
Thanks
Member 12245539
11-Jun-16 22:42pm
View
DataTable dtStatusColor = new DataTable();
string selectQuerry1 = "select ShortName, color from PayRoll_AttendanceStatus";
sda = new SqlDataAdapter(selectQuerry1,con);
sda.Fill(dtStatusColor);
Dictionary<string, string=""> dictColors = new Dictionary<string, string="">();
foreach (DataRow row in dtStatusColor.Rows)
dictColors.Add(row["ShortName"].ToString(), row["color"].ToString());
string Querry2 = "SELECT * FROM(SELECT [EMPLOYEENAME] ,[EMPLOYEE_CODE] ,[ShortName] ,DATENAME(M, [DateTime])as [Month] ,DAY([DateTime]) as [DayValue] FROM [View_PayRollMarkAttendance]) as Composite PIVOT (MAX([ShortName]) FOR [DayValue] IN ([1], [2], [3], [4],[5], [6], [7], [8], [9],[10], [11], [12], [13], [14],[15], [16], [17], [18], [19],[20], [21], [22], [23], [24],[25], [26], [27], [28], [29],[30],[31])) AS PivotTable";
DataTable dtStatus = new DataTable();
sda = new SqlDataAdapter(Querry2, con);
sda.Fill(dtStatus);
dataGridView1.DataSource = dtStatus;
int columnIndex = 5; // index value for the status column ( zero based index )
foreach (DataGridViewRow row in dataGridView1.Rows)
{
if (row.Index > -1 && row.Index < dataGridView1.Rows.Count - 1)
{
string status = row.Cells[columnIndex].Value.ToString();
row.Cells[columnIndex].Style.BackColor = System.Drawing.Color.FromName(dictColors[status]);
}
}
Member 12245539
11-Jun-16 3:16am
View
I have updated the codes. But The there is no changes in color. Previously, that I updated was effected with color but with helop of dataGridView1_CellFormatting event.
Kindly see the issue.
Member 12245539
11-Jun-16 1:43am
View
Yes it has color value.
the code that I am using is
try
{
string Querry = "SELECT * FROM(SELECT [EMPLOYEENAME] ,[EMPLOYEE_CODE] ,[ShortName] ,DATENAME(M, [DateTime])as [Month] ,DAY([DateTime]) as [DayValue] FROM [View_PayRollMarkAttendance]) as Composite PIVOT (MAX([ShortName]) FOR [DayValue] IN ([1], [2], [3], [4],[5], [6], [7], [8], [9],[10], [11], [12], [13], [14],[15], [16], [17], [18], [19],[20], [21], [22], [23], [24],[25], [26], [27], [28], [29],[30],[31])) AS PivotTable";
SqlDataAdapter sda = new SqlDataAdapter(Querry, con);
DataSet ds = new DataSet();
sda.Fill(ds);
DataGridView.DataSource = ds.Tables[0];
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
Member 12245539
11-Jun-16 1:25am
View
Thanks Mr Karthik,
But there is little bit issue.
The color I want to pick from my First table (PayRoll_AttendanceStatus) that I have mentioned above. I you see, there is one column for color only. I want pick from color column only. Please see.
Member 12245539
11-Jun-16 1:01am
View
Ok
Member 12245539
11-Jun-16 0:31am
View
Windows Form C# and DatagridView
Member 12245539
11-Jun-16 0:27am
View
Gridview
Member 12245539
11-Jun-16 0:21am
View
Windows Form with C#
Member 12245539
10-Jun-16 17:21pm
View
Windows Form C# and Gridview
Member 12245539
13-May-16 13:19pm
View
Sir RDBurmon,
I need you help please help.
"How could I get selected Row ID data from GridView into another Gridview??"
I have 1 table for studentclass and 1 table for student registration form. I want to select studentclass from gridview to display its correspondence data into another gridview.
My code are like
try
{
DataGridViewStudent.Columns.Clear();
int i = 0;
List<int> checkedRow = new List<int>();
for (i = 0; i < Class_DataGridView.Rows.Count; i++)
{
if (Convert.ToBoolean(Class_DataGridView.Rows[i].Cells["ckbx"].Value) == true)
{
checkedRow.Add(i);
}
}
if (checkedRow.Count == 0)
{
MessageBox.Show("Please select atleast one of them");
return;
}
foreach (int j in checkedRow)
{
string str = "select Class, cls_secId, S_Adm_No, S_Name, S_F_Name, S_F_Ph_No from View_Fee_Student_Registration where cls_secId=" + Class_DataGridView.Rows[j].Cells["cls_secId"].Value.ToString() + "";
SqlDataAdapter sda = new SqlDataAdapter(str, con);
con.Open();
DataSet ds = new DataSet();
sda.Fill(ds);
DataGridViewStudent.DataSource = ds.Tables[0];
con.Close();
}
}
catch (Exception err)
{
MessageBox.Show(err.Message);
}
}
Sir please help me and obliged.
Member 12245539
1-Feb-16 3:44am
View
Thank you so much it is running. Finally you have done this you are the great. Once again thanks..
Member 12245539
30-Jan-16 2:55am
View
Again this error occured
---------------------------------------------------------------------------------------
Msg 4104, Level 16, State 1, Procedure _GetFeeStructureForStud, Line 4
The multi-part identifier "FE.APR" could not be bound.
Msg 4104, Level 16, State 1, Procedure _GetFeeStructureForStud, Line 4
The multi-part identifier "FE.MAY" could not be bound.
Msg 4104, Level 16, State 1, Procedure _GetFeeStructureForStud, Line 4
The multi-part identifier "FE.JUN" could not be bound.
Msg 4104, Level 16, State 1, Procedure _GetFeeStructureForStud, Line 4
The multi-part identifier "FE.JUL" could not be bound.
Msg 4104, Level 16, State 1, Procedure _GetFeeStructureForStud, Line 4
The multi-part identifier "FE.AUG" could not be bound.
Msg 4104, Level 16, State 1, Procedure _GetFeeStructureForStud, Line 4
The multi-part identifier "FE.SEP" could not be bound.
Msg 4104, Level 16, State 1, Procedure _GetFeeStructureForStud, Line 4
The multi-part identifier "FE.OCT" could not be bound.
Msg 4104, Level 16, State 1, Procedure _GetFeeStructureForStud, Line 4
The multi-part identifier "FE.NOV" could not be bound.
Msg 4104, Level 16, State 1, Procedure _GetFeeStructureForStud, Line 4
The multi-part identifier "FE.DEC" could not be bound.
Msg 4104, Level 16, State 1, Procedure _GetFeeStructureForStud, Line 4
The multi-part identifier "FE.JAN" could not be bound.
Msg 4104, Level 16, State 1, Procedure _GetFeeStructureForStud, Line 4
The multi-part identifier "FE.FEB" could not be bound.
Msg 4104, Level 16, State 1, Procedure _GetFeeStructureForStud, Line 4
The multi-part identifier "FE.MAR" could not be bound.
Member 12245539
29-Jan-16 23:13pm
View
I got few updation in Store procedure but while altering or creating store proc occurs an error like
--------------------------------------------------------------------------
Msg 1087, Level 15, State 2, Procedure __GetFeeStructureForStud, Line 17
Must declare the table variable "@FeeAssigned".
Msg 1087, Level 15, State 2, Procedure __GetFeeStructureForStud, Line 17
Must declare the table variable "@FeeExemption".
Member 12245539
29-Jan-16 4:21am
View
FeeAssigned
====================================================================================
Student Id | FEE_HEAD |APR |MAY |JUN |JUL |AUG |SEP |OCT |NOV |DEC |JAN |FEB |MAR
====================================================================================
Stud_01 | 1 |1500 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0
Stud_01 | 2 |250 |250 |250 |250 |250 |250 |250 |250 |250 |250 |250 |250
Stud_01 | 3 |350 |350 |350 |350 |350 |350 |350 |350 |350 |350 |350 |350
Stud_01 | 4 |150 |150 |150 |150 |150 |150 |150 |150 |150 |150 |150 |150
====================================================================================
FeeExemption
Student Id | FEE_HEAD |APR |MAY |JUN |JUL |AUG |SEP |OCT |NOV |DEC |JAN |FEB |MAR
====================================================================================
Stud_01 | 1 |700 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0
Stud_01 | 1 |100 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0 |0
Stud_01 | 3 |50 |50 |50 |50 |50 |50 |50 |50 |50 |50 |50 |50
Stud_01 | 3 |50 |50 |50 |50 |50 |50 |50 |50 |50 |50 |50 |50
====================================================================================
Member 12245539
27-Jan-16 23:15pm
View
There is something error in this if I exempt 100 Rs in two times as 50 & 50 then it shows like
'TUITION FEE',50,50,50,50,50,50,50,50,50,50,50,50,'STUD01'
'TUITION FEE',50,50,50,50,50,50,50,50,50,50,50,50,'STUD01'
where as it should be
'TUITION FEE',100,100,100,100,100,100,100,100,100,100,100,100,'STUD01'
in sum
Member 12245539
25-Jan-16 3:20am
View
Deleted
My table is like this
FeeAssigned
=========================================================================
FEE HEAD |APR |MAY |JUN |JUL |AUG |SEP |OCT |NOV |DEC |JAN |FEB |MAR |
========================================================================
TUITION FEE |120 |120 |120 |120 |120 |120 |120 |120 |120 |120 |120 |120 |
TRAN FEE |50 |50 |50 |50 |50 |50 |50 |50 |50 |50 |50 |50 |
=========================================================================
FeeExemption
=========================================================================
FEE HEAD |APR |MAY |JUN |JUL |AUG |SEP |OCT |NOV |DEC |JAN |FEB |MAR |
=========================================================================
TUITION FEE |10 |10 |10 |10 |10 |10 |10 |10 |10 |10 |10 |10 |
TRAN FEE |10 |10 |10 |10 |10 |10 |10 |10 |10 |10 |10 |10 |
=========================================================================
After subtract I want like this in gridview
FEEPayable
=========================================================================
FEE HEAD |APR |MAY |JUN |JUL |AUG |SEP |OCT |NOV |DEC |JAN |FEB |MAR |
=========================================================================
TUITION FEE |110 |110 |110 |110 |110 |110 |110 |110 |110 |110 |110 |110 |
TRAN FEE |40 |40 |40 |40 |40 |40 |40 |40 |40 |40 |40 |40 |
=========================================================================
Member 12245539
25-Jan-16 3:14am
View
Deleted
Actually I don't get any idea for this please help...Only I have inserted values into SQLDatabase as I mentioned above.
Member 12245539
25-Jan-16 3:13am
View
Deleted
Only I have inserted values into SQLDatabase
Member 12245539
25-Jan-16 3:10am
View
Actually I don't get any idea for this please help...Only I have inserted values into SQLDatabase as I mentioned above.
Show More