C# ASP.NET Post Values Not Setting

Hello all,
I am not exactly new to .net and C# web apps.  However, I am experiencing an odd situation. I have a ComponentArt grid that has a list of records.  It is very similar to the asp.net grid but it has more built in functions.  
I have a code for each row with the following
<a href="javascript:DoGridPostPack('## DataItem.GetMember('ID').Value ##');">Details</a> <br />
This is a link that will call a javascrip function as below
                     function DoGridPostPack(iID) {
                         __doPostBack('<%=cmdGridDetailsPostBack.ClientID%>', iID);
                     }
I am using "cmdGridDetailsPostBack" as my hidden button to rais the post back with.  The process fires and the server get a record and populates a form in a ajax modal popup for the user to edit details etc.
Here is my challenge.
all of this works fine outside of the grid.  But if i click on the grid link (same exact link and code) the modal popup form comes up but only the read only textboxes keep their value that was set via the server.  All the editable textboxes and comboboxes don't keep the values.
I don't get any errors, or exceptions.  
I am kinda stupped.  Any help would be great.
 
paiman01Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SriVaddadiCommented:
Before postback you wld have store the values and restore after the postback
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
paiman01Author Commented:
Ok,
So there is no value in the form as of the postback. The form is populated based on the record you want to see from the grid.  The trouble is that if i create a javascript postback out side of the grid it works. From the grid it does not.  I can't see any difference between the 2 in code.  Only difference is that the grid replicates the "<a " tag for each item in the grid.  
The values are populated from the server side code, and then the ajax popup is shown.  From out side the grid the "copy and paste" of the javascript postback works.  From inside the grid it does not.
0
SriVaddadiCommented:
As I understand, your grid has a Details link and when clicked it is supposed to pop up aa AJAX form with values for the selected record and some of those values should be editable.  Sounds right?
Where are you populating the records into form? I mean you are making an AJAX call to fetch the details and after fetch is complete you get a call back where your code pitchs in and populates the controls with the relevant data. sound right?
It might help if you could please post that snippet of code




0
Amazon Web Services

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

paiman01Author Commented:
Hello,
I love to copy the code here, but it's so many functions and events that fill different parts of the request it would be too confusing for all of us.
So the sequence is this (and please keep in mind it all works 100% out side of the grid):
1. Hyper link clicked with a call to javascript function
                     function DoGridPostPack(iID) {
                         __doPostBack('<%=cmdGridDetailsPostBack.ClientID%>', iID);
                     }
iID is the record ID to get the info for and to fill in the forms values.  The server functions work perfectly the get the correct data and fill in the form.
2. The server functions pull the record for that id and fill in the form that is inside a ajax popup.
3. After filling in the values the server functions do a popup.show();

Now all of this works perfectly out side of the grid.  But if i take the link and put it into the grid, it fires the events, the server get the correct values, fills the forms, but when it shows the popup the textboxes that are not set to ReadOnly don't keep the values assiged by the server, they are blank.

This is why it's odd to me.  Why do the readonly text boxes get values, but not the normal state textboxes.  
Hope this gives you a better picture.
Here is the link that is inside the grid
<a href="javascript:DoGridPostPack('## DataItem.GetMember('ID').Value ##');">Details</a> <br /> and I have tried it this way as well
<a href="#" onclick="DoGridPostPack('## DataItem.GetMember('ID').Value ##');">Details</a> <br />  both do the same thing and i get the same behavior.
Thanks
0
SriVaddadiCommented:
As it seems to me It could be that the values populated are being overwritten some where in the code with empty values.
Please find the references to one of those text boxes and check all the places where the value is being modified.
0
paiman01Author Commented:
Hi,
Thanks, i actually did that.  I stped through the code several time watching the value of each text box.  Keep in mind it all works 100% out side of the grid.  Other controls on the same screen make calls to the same function set, and it work perfectly from there.  The link it self works 100% as well out side of the grid.  But once placed inside the grids list, the behavior happens. Its odd.   I have step through the prerender, the unload, every phase of the pages lifecycle, i can't see why the setting of the values would only stick for the readonly controls and not the normal state controls.  If i switch the state of the textboxes to readonly then the values come through.  I don't have any javascript functions that clear or set values to them, it's all done from the server side.
0
paiman01Author Commented:
I am wondering is there a behavior in .NET that i am not aware of that doing a  __doPostBack requires more handeling than simply calling functions when you do it in a grid.
0
paiman01Author Commented:
The issue was that ComponentArt control was out-dated.
0
paiman01Author Commented:
thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.