473,401 Members | 2,127 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

I NEED TO COLLECT FROM THE GRIDVIEW(DATASELECTED) IN TO A TABLE(SelectedPayment)

I NEED TO COLLECT FROM THE GRIDVIEW(DATASELECTED) IN TO A TABLE(SelectedPayment)

--------------------------------------------------------------------------------

How TO COLLECT THE ROWS CHECKED IN CHECK BOX IN THE DATASELECTED TO ANOTHER GRID VIEW ON CLICLING BUTTON

I NEED TO COLLECT FROM THE GRIDVIEW(DATASELECTED) IN TO A TABLE(SelectedPayment)

SIMILLAR TO HOTMAIL MODEL.....CHECK THE MAILS AND BRING THE CHECKED DATA TO ANOTHER PAGE

Please help
Aug 30 '07 #1
4 1950
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
Aug 31 '07 #2
kenobewan
4,871 Expert 4TB
Suggest you do not overuse allcaps, its like shouting. My next suggestion is to search the site for other related threads. A datatable may met your temporary storage needs.
Aug 31 '07 #3
kenobewan
4,871 Expert 4TB
Please stop posting multiple times. Thanks.

MODERATOR
Aug 31 '07 #4
This is what i did ....adding a creating a table.......and getting the cols and rows from previoud grid view.....but it does not work.....
protected void ProcPaymBTM_Click(object sender, EventArgs e)
{
Dataviewlisting.ActiveViewIndex += 1;
int IndexCount = 0;
int colindex, rowindex;
String ProcessingPayment;
SessionValues ValueSelected = null;
DataTable SelectedPayment = new DataTable("SelectedPayment");

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;
{
if (this.DetailDataList.DataSelected.IndexCount > 0)
{
DataTable SelectedPayment = new DataTable("SelectedPayment");
int columns = DetailDataList.ColumnCount;
int i = 0;
for (i = 0; i < columns; i++)
{
SelectedPayment.Columns.Add(DetailDataList.Columns[i].Name.ToString());
}

DataRow dr = null;

foreach (DataGridViewCell cell in DetailDataList.SelectedCells)
{
colindex = cell.ColumnIndex;
rowindex = cell.RowIndex;
textBox1.Text = this.DetailDataList.Rows[rowindex].Cells[colindex].Value.ToString();

if (colindex == 0)
{
dr = SelectedPayment.NewRow();
}

dr[colindex] = textBox1.Text;

if (colindex == (columns - 1))
{
SelectedPayment.Rows.Add(dr);
SelectedPayment.AcceptChanges();
}
}
DataTable ds = new DataTable("table");
ds.Tables.Add(SelectedPayment);
sendParameters(SelectedPayment, 1);
ReviewSelectionGD.DataSource = ds.DefaultView;
ReviewSelectionGD.DataBind();

}
}
}
Titlelb.Text = "Number Check is " + IndexCount.ToString() + " payment Selected " + ProcessingPayment;
}
}
Aug 31 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: svgeorge | last post by:
I need help in C Sharp Web Interface , I have web pages for making several 9 type of payments. The data gets loaded on web page from SQL server 2005 database. Then I have Process payment...
0
by: svgeorge | last post by:
I have web pages for making several 9 type of payments. The data gets loaded on web page from SQL server 2005 database. Then I have Process payment button(ProcPaymBTM_Click) on the web page(Detail...
3
by: svgeorge | last post by:
Please tell me how to Insert Web Interface records to SQL database table on Button click I have several records for approving payment and these records needs to be inserted into a table Payment...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.