How TO COLLECT THE ROWS CHECKED IN CHECK BOX IN THE DATASELECTED TO ANOTHER GRID VIEW ON CLICKING BUTTON(This happens the new gridview is displayed......but no selected data)
I NEED TO COLLECT FROM THE GRIDVIEW(DATASELECTED) IN TO A NEW TABLE SelectedPayments and display these on another grid view in same multi view
The Question is???
How do I Create Temp table to store data in Web User Interface.
I have one main page FinancePayment.aspx(basicaly a multiview, stats view, Detail View and Review data) all as DATAGRID VIEW
all this in One main view " Data View Listing".... on stats view i have all count of ID numbers....
on clicking on numbers i get all details as name last name etc.....for all the ID of persons this is on "Detail view page" THIS IS A DATAGRID with check box selection.......then i check the Record i want and click the process payment button......so the checked data from Dataview Listing has to come to the next view that is Review data......Here i need help to get the data..how can i get the data when i have no connection with server ...and i only want to checked data on the Review data page where i finally approve and records gets inserted to database
I am having datagrids to collect data for the first page and in C# coding I have given query and now I get these data on first page.
I need help to get the selected data on Detail View to appear on the next page Review Data.
This is code i am using to get data for first page...and i HAVE THE ROWS THAT I CHECK...
// Not_Paid_BTM
protected void Cick_Detail_Enrollment(object sender, EventArgs e)
{
//EnrollNotPaidBTM
WebLibraryClass ConnectionFinanceDB;
ConnectionFinanceDB = new WebLibraryClass();
Button ObjectClick = (Button)sender;
string ConditionValue;
SessionValues ValueSelected = null;
ProcPaymBTM.Visible = true;
if (Session[Session_UserSPersonalData] == null)
{
ValueSelected = new SessionValues();
Session.Add(Session_UserSPersonalData, ValueSelected);
}
else
{
ValueSelected = (SessionValues)(Session[Session_UserSPersonalData]);
}
ConditionValue = ValueSelected.CONDITION;
ValueSelected.PaymentSelected = ObjectClick.ID.ToString();
if (ObjectClick.ID.ToString() == "EnrollNotPaidBTM")
{
DbDataReader CollectingDataSelected = null;
Dataviewlisting.ActiveViewIndex += 1;
try
{
CollectingDataSelected = ConnectionFinanceDB.CollectedFinaceData("SELECT DISTINCT ID, [FIRST NAME],[LAST NAME],Project_ID as [PROJECT ID],[PROJ START DT]AS ENROLLMENT,[PROJ END DT] AS TERMINATION,TERM AS [TERM CODE] FROM dbo.V_1st_Enrollment_Agency_Payment_List " + ConditionValue);
}
catch
{
}
DataTable TableSet = new DataTable();
TableSet.Load(CollectingDataSelected, LoadOption.OverwriteChanges);
DetailDataList.DataSource = TableSet.DefaultView;
DetailDataList.DataBind();
}
}
This is where the Button function is...THAT SHOULD BRING THE SELECTED DATA ROWS AND COLUMNS FROM EARLIER GRID VIEW TO NEXT GRID VIEW WHAT EVER SELECTED ON THAT PAGE
protected void ProcPaymBTM_Click(object sender, EventArgs e)
{
Dataviewlisting.ActiveViewIndex += 1;
int IndexCount = 0;
String ProcessingPayment;
SessionValues ValueSelected = null;
DataTable SelectedPayment = new DataTable();
if (Session[Session_UserSPersonalData] == null)
{
ValueSelected = new SessionValues();
Session.Add(Session_UserSPersonalData, ValueSelected);
}
else
{
ValueSelected = (SessionValues)(Session[Session_UserSPersonalData]);
}
ProcessingPayment = ValueSelected.PaymentSelected;
switch (ProcessingPayment)
{
case "EnollNotPaidBTM":
break;
case "PlacNotPaidBTM":
break;
case "Ret1NotPaidBTM":
break;
case "Ret3NotPaidBTM":
break;
case "Ret6NotPaidBTM":
break;
case "Place2ndNotPaidBTM":
break;
case "EnrollBonusNotPaidBTM":
break;
case "WPRNotPaidBTM":
break;
case "SatisCompleteNotPaidBTM":
break;
default:
break;
}
foreach (GridViewRow DataSelected in this.DetailDataList.Rows)
{
if (((CheckBox)DataSelected.FindControl("ApprovalCk") ).Checked)
{
IndexCount += 1;
// DataTable SelectedPayment = new DataTable();
// HERE I NEED HAVE TO COLLECT THE ROWS CHECK IN THE DATASELECTED
// HOW TO COLLECT FROM THE GRIDVIEW(DATASELECTED) IN TO A TABLE(SelectedPayment)
}
}
Titlelb.Text = "Number Check is " + IndexCount.ToString() + " payment Selected " + ProcessingPayment;
}
Please suggest...OR ANYBODY KNOW BETTER HOW TO MAKE THIS WORK...AWAITING REPLY......
Thanks
Santosh George