Posted - 06/27/2013 : 00:35:34
Urgent Requirement related to gridview.....
Test Name Doctor_Name Sample_Id Sample_Date Select
Blood Test AAA 0 26/06/2013
Urine Test BBB 0 26/06/2013
Lipid Profile CCC 0 26/06/2013
Sugar Test DDD 0 26/06/2013
Above shown the gridview with lab tests, and other detail
In this webform i have button say "Generate Sample ID"
In the above gridview the last column is select column ie;checkbox column.
(Eg patient name :Abhishek)
For First visit of patient(Abhishek) for lab test
The lab assistant will collect the sample and select the tests,which can be done by the collected samples,for those many tests i need to generate a unique sample id Eg:1(ONE),and the remaining tests Sample id should be zero.
For Second Visit of same patient(Abhishek)
The gridview should display only the remaining tests for which samples need to be collected,Now lab assistant will collect the sample and select the tests, which can be done by the collected samples, for those many tests i need to generate a unique sample id Eg:2(TWO) and i should not show the previously generated sample id's ie:1(one).
All these auto-generating of sample id's Should reflect in gridview.
Note:I have button "Generate Sample ID" control in the gridview page, once i clicked the button, sample id value should be generated only for the checked rows(for example if i check first 2 rows in grid then i click the button for those first 2 records only sample id should be Generated as 1 because my last generated sample id is 0) for the next time when i reopen the same page the previously checked rows should not be displayed in the grid whose sample id is 1, and when i check the remaining unchecked rows of grid this time the previously generated number should be incremented by 1 and the number 2 should be generated as a sample Id.
How to fix this?
SOLUTIONS WITH CODE or SMALL EXAMPLES WILL BE APPRECIATED.