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
Title:
Web form question: binding mmTextBox to a DataRow
Miscellaneous
Thread ID:
01265734
Message ID:
01265734
Views:
56
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.
Public oOrderDetails As MyBusinessObject

...
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        oOrderDetails = CType(Me.RegisterBizObj(New MyBusinessObject), MyBusinessObject)

        If IsPostBack Then
        Else
            oOrderDetails.GetOrderDetailByOrderNo(Session("SelectedOrderNo"))
            Session("ds_SelectedOrder_detail") = oObject.DataSet
        End If
    End Sub

    Protected Sub gridDetails_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles gridDetails.SelectedIndexChanged

        Dim identity As Integer, ds As DataSet, row As DataRow
        identity = CType(Me.gridDetails.SelectedRow.Cells(0).Text, Integer)
	row = ds.Tables(0).Rows.Find(identity)

	'???
    End Sub

    Protected Sub MmButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles MmButton1.Click
	'???
    End Sub
Next
Reply
Map
View

Click here to load this message in the networking platform