Click here to Skip to main content
15,890,897 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,


I have a grid view in which i have 3 columnns.
First column will have the capacity of seats in bus.
Second column will have entry of number of seats occupied in the bus on a daily basis.
I want that in the third column the number of vacant seats are displayed the moment the second column is filled.
How to do that in a grid view for 'n' number of routes?
Posted

Hi,

First of all you need to store all the possible source and destination routes from the bus. It may be the case when people traveling and leave in between. Depending on the above criteria you need to display data in the greed. If you consider 5 different buses are there to travel from destination 1 to destination 2. Now there are another 2 buses that have the same route from destination 1 to destination 2. If you have stored bus number, From and To area information you can easily capture all your available seat information for given route. Even your route table should also keep the information like number for each route and all subset route of parent route. There will be many to many relation ship in that case. You need to design your database before starting development.

Hope you got my point.

Best luck
-Amit Gajjar
 
Share this answer
 
in textchange event of textbox in 2nd column
C#
((lable)gv.findcontrol("textbox1")).text-((lable)gv.findcontrol("textbox2")).text
((lable)gv.findcontrol("textbox3")).text;

try this.
 
Share this answer
 
v3

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