datagridview
-
i am using windows aplliction using c#... i have 1000 records in my table.... which has fields CUSTOMER_ID,NAME,CITY,SALARY..... I HAVE TO SEE ONLY THE CUSTOMER WHO ARE LIVING THE CITY CALLED "DOWNTOWN" HOW CAN I SEE THIS IN DATAGRIDVIEW... PLS REPLY... GIVE ME SUGGESTION OR SAMPLE CODING... THNX IN ADVANCE
Assuming the 1000 rows are coming from a data base, you have two options... 1) Query only the data your looking for and not everything, remember "any monkey can
SELECT * FROM
2) Use a DataView to filter out the data you want to displayHarvey Saayman - South Africa Junior Developer .Net, C#, SQL
you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111 -
:wtf: are you insane? I would hate to see crap like that in a program i have to maintain...
Harvey Saayman - South Africa Junior Developer .Net, C#, SQL
you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111 -
are you mental.. go to some hospital..:) bloddy this was just a suggestion if you know something better then me .. did i stop you to answer...
vikas da
tasumisra wrote:
did i stop you to answer
Nope, but there are much easier ways :) see my reply...
Harvey Saayman - South Africa Junior Developer .Net, C#, SQL
you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111 -
tasumisra wrote:
did i stop you to answer
Nope, but there are much easier ways :) see my reply...
Harvey Saayman - South Africa Junior Developer .Net, C#, SQL
you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111I have seen your answer ... but some times we can't hardcode any querry from sql command it will cost more if u need to change your condition. anyway if you have ever used WCF then in services we are binding the reader object with our business object for each row that time we can filter it out more easily...
vikas da
-
I have seen your answer ... but some times we can't hardcode any querry from sql command it will cost more if u need to change your condition. anyway if you have ever used WCF then in services we are binding the reader object with our business object for each row that time we can filter it out more easily...
vikas da
tasumisra wrote:
some times we can't hardcode any querry
In that case, create a stored procedure for SQL and call that in your application... problem solved :) OR Use the DataView object, i use this frequently to filter data dynamically
Harvey Saayman - South Africa Junior Developer .Net, C#, SQL
you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111 -
i am using windows aplliction using c#... i have 1000 records in my table.... which has fields CUSTOMER_ID,NAME,CITY,SALARY..... I HAVE TO SEE ONLY THE CUSTOMER WHO ARE LIVING THE CITY CALLED "DOWNTOWN" HOW CAN I SEE THIS IN DATAGRIDVIEW... PLS REPLY... GIVE ME SUGGESTION OR SAMPLE CODING... THNX IN ADVANCE
as mentioned use the filter option or change the query to have a where clause. but FYI. THE USE OF CAPITALS is considered shouting in forums. :-D
V.
Stop smoking so you can: Enjoy longer the money you save. Moviereview Archive -
tasumisra wrote:
some times we can't hardcode any querry
In that case, create a stored procedure for SQL and call that in your application... problem solved :) OR Use the DataView object, i use this frequently to filter data dynamically
Harvey Saayman - South Africa Junior Developer .Net, C#, SQL
you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111 -
Harvey Saayman wrote:
In that case, create a stored procedure for SQL and call that in your application... problem solved
what if you dont have acess to the stored proc....??? :) its written in COBOL and residing in Mainframe...
vikas da
tasumisra wrote:
COBOL
Then you get your ass out of the C# forum :laugh:
Harvey Saayman - South Africa Junior Developer .Net, C#, SQL
you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111 -
tasumisra wrote:
COBOL
Then you get your ass out of the C# forum :laugh:
Harvey Saayman - South Africa Junior Developer .Net, C#, SQL
you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111 -
do you know ?????? a stored proc can be written in COBOL.. and sorry you can acess these stored proc using your ass..from C# also
vikas da
Calm d0wn dude, i was JOKING... sheesh
Harvey Saayman - South Africa Junior Developer .Net, C#, SQL
you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111