Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Professional
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 22nd, 2006, 05:49 AM
Authorized User
Join Date: Jan 2006
Location: gangtok, Sikkim, India.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default retaining values of controls inside a datagrid

   i wanted to know how to retain the values of the web controls inside a datagrid.....there are a number of web controls inside a datagrid....if a put the method bindToGrid() inside the if(!Page.IsPostBack) then the values are being lost...
I have done this:
ProjectDetails projectdetail=new ProjectDetails();
DataTable[] datatable=new DataTable[5];
int i=0;
foreach(DataGridItem dgItem in grdProjectDetails.Items)
releasedate[i]=(Aztec.Web.UI.WebControl.DatePicker.DatePickerCon trol)dgItem.FindControl("releaseDate");
cboIfAvailable[i]=(DropDownList)dgItem.FindControl("cboAllAvailable ");
Rolloverdate[i]=(Aztec.Web.UI.WebControl.DatePicker.DatePickerCon trol)dgItem.FindControl("rollOverDate");
DataRow rows=datatable[0].Rows[i];
 cboProjectName[i].DataTextField= "projectName";
 cboProjectName[i].DataValueField= "projectId";
  cboManagerName[i].DataTextField= "empName";
  cboManagerName[i].DataValueField= "empId";

Now what happens is that when a press a button and the page is refreshed all the values of the arrays are lost. I have declared these arrays globally and initialized them on page load...


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
User COntrol Datagrid inside datagrid rodmcleay ASP.NET 1.0 and 1.1 Professional 3 April 14th, 2007 10:11 AM
How to get to controls inside DataList? rsearing ASP.NET 2.0 Basics 1 March 1st, 2007 09:14 AM
find all the controls inside any table amartya_mandal ASP.NET 1.0 and 1.1 Professional 10 October 24th, 2006 08:35 AM
my session variables not retaining values nidhimittal Beginning PHP 4 July 7th, 2006 12:33 AM
my session variables not retaining values nidhimittal PHP How-To 5 June 22nd, 2006 12:35 AM

All times are GMT -4. The time now is 02:25 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.