Click here to Skip to main content
15,887,283 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how would i only show only selected row by cardnumber that i logged in with on form1. the cardnumber is passed and called in form3 show.cardnumber.
Posted
Updated 9-Mar-12 19:39pm
v2
Comments
Uday P.Singh 9-Mar-12 14:17pm    
and the issue is?
[no name] 9-Mar-12 14:23pm    
That makes no sense at all.
stefanere2k9 9-Mar-12 14:54pm    
on the table i got ID, cardNumber, amount, date. i only want to display the cardnumber that i have passed from form1. am not sure how to do this as i havent worked with datagrid before
El_Codero 9-Mar-12 15:04pm    
Why not google for "c# datagrid" or "c# fill datagrid"?There's no real problem. What do you tried so far?

Well, if it is ASP you can send the cardNumber as a Parameter and in your SQL statement for the filling of the datagrid you add something like:
Where cardNumber=' +Parameter_you_send+'
Or for C# Windows App. You can send the cardnumber value to a Textbox or Label in the datagrid Form, and apply the same 'Where' Statement...
 
Share this answer
 
Hi there..

Send your card number from the first form to second form..

If you are using datatable to display the data then use this code:

C#
DataRow[] dr=dataTable.Select("ColumName = "+cardNo);


All the best..
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900