Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Web form question: binding mmTextBox to a DataRow
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01265734
Message ID:
01265772
Views:
9
This message has been marked as a message which has helped to the initial question of the thread.
>A web form contains three controls: mmGridView, mmTextBox and mmButton. The GridView is binded to mm business object oOrderDetails.
>
>How the following could be achieved:
>On the grid's SelectedIndexChanged the textbox is binded to the selected DataRow. So the Text property displays the current value. And the modification of the Text property results in the modification of the selected DataRow.

If you're only doing binding with a couple of controls, this is probably easier to do "manually" instead of trying to get the framework to do it for you. What I mean by that is when the row is selected, just set the .Text property of the textbox from the row value. When you save, load the original record via the PK in your business object and update it from the .Text of the textbox again.

If there are a bunch of controls, load your dataset with two tables: one of all of the records for the grid, the other for the selected record. Bind the grid to the table w/all of the records and the edit controls to the table w/the single record.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform