1
Answer

How To Disable Textboxes in EditItemTamplate of Gridview

Danish Habib

Danish Habib

10y
747
1
Dear I have a gridview and i have 7 columns all have edit item template in which i have placed a textbox for each one on gridview edit i have to update some of the values from all these seven textboxes but based on some other value condidtion i have  a count template field and based on the value of that count i have to disable and enable any of the textboxes based on condition ,I wrote an example of Row_Databound as well as in Gridview perrender it is  not doing the right job.
Answers (1)
2
Nitin Sontakke

Nitin Sontakke

NA 11.7k 2.2k 8y
Separate table is a good idea. But about "creating records in it as soon as product request is created", I am not so sure about.
 
My suggestion:
 
t1 - product request : insert record as soon as product request is created. 
 
t2 - product request approvals : a set of 10 records which indicate which approvals must be obtained. Note that this table DOES NOT have record for actual approval received.
 
t3 - product request approvals received : again a set of 10 records which indicate that approvals actually received. There may be 0 records at the beginning but insert each record as approval is received. This has who approved, when approved, comments, etc.
 
t4 - Optional - auditing of t3 table. In this log each change in t3 (insert update delete of t3) Who gave approval and then revoked it, etc. 
 
The benefit of above approach is you can select records from  t2 left outer join with t3 and know pending approvals. I am sure you will need it some time. Note that t2 is just a template table. This approach protects you from increase / decrease in number of approvals.
 
 
Accepted
0
Nitin Sontakke

Nitin Sontakke

NA 11.7k 2.2k 8y
Thanks!
 
Feel free to ping for any other question(s) you have face in the process. 
0
Bennie

Bennie

NA 6 0 8y
Thank you Nitin.  The missing link for me was the Left Outer Join and inserting after approval.  You have cleared things up.  
 
9 years ago I was just getting started as an independent consultant and was hopeful to pick up as a programmer.  Consulting opportunities directed me in other areas, BA and Systems admin.  I now have the fortune to implement small projects that are mostly data capture and reporting.  A great opportunity to learn.
 
Thanks again
 
 
0
Nitin Sontakke

Nitin Sontakke

NA 11.7k 2.2k 8y
Somehow it surprises me that you ask your first question after full 9 years after becoming member of this forum.