Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Web Form Binding?
Message
De
11/06/2004 14:20:48
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00908254
Message ID:
00912841
Vues:
12
Kevin,

I have tried to use the form’s BindControl method but could not get it to work. First, I followed your suggestion to bind to the datarow property and have written the code to navigate my table and set this property. The problem, is a call to the web forms Bindcontrol method will only work if the BindingSource is a biz object, if this.GetBizObj(bindingSource) is Null it immediately exits. If a biz Object, there is a call to the mmWebDataHelper.ControlBindData if the GetCurrentDataSet returns NULL.

I'm sure I could design an edit-in-place grid control that would edit one row at a time without calling SaveData so the data could be saved with a call the primary biz object, if I could only solve the bind / bindback issues. As a last resort I can write the code myself but I bought MM.Net framework so I wouldn't need to do this simple chore.

Please let me know if you have any other idea, I will be glad to give it a try. I need both bind and bindback to work on a postback. If the framework was not designed to do this, please let me know.

I have not tried your suggestion on how to use the grid, my main problem is binding to other form controls on postback.

Terry Carroll


>Terry,
>
>>I have worked long and hard trying to get MM to bind and bindback on demand. On initial page load I can control binding but on a postbacks none of the binding methods work. They all check for IsPostBack and if true exit the code. It would seem very strange to me if I’m the only one who has encountered this road block, so I wonder how they handled it!
>
>Typically you don't want a control to rebind during postback because it already contains the correct value (and rebinding would obliterate the value the user has entered)...that's why the checks are in there. That said, there are situations where you DO want this to occur, so you can simply call the form's BindControl method instead.
>
>Regards,
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform