|
-
Nov 20th, 2006, 10:06 AM
#1
Thread Starter
Fanatic Member
Validaion Controls
I generate a table on the fly in my page. For each row i have a radiobutton so the user can select an item on the table to view.
How can i add a validation control to check whether the user has selected a row in my table.
Currently i validate the control when the user hits the view button but when the button is click the tables data is not reloaded cos of the postback, maybe i should cache that?
VB Code:
While (l_e.MoveNext = True)
l_order = CType(l_e.Current, Order)
Dim detailsRow As TableRow = New TableRow
Dim l_cellSelect As New TableCell
Dim l_selector As New RadioButton
l_selector.ID = l_order.OrderHeader.OrderHeaderId.ToString
l_selector.GroupName = ORDER_SELECTION
l_cellSelect.Controls.Add(l_selector)
detailsRow.Cells.Add(l_cellSelect)
Dim l_nameCell As TableCell = New TableCell
l_nameCell.Text = l_order.Customer.CustomerName
detailsRow.Cells.Add(l_nameCell)
Dim l_dispatchCell As TableCell = New TableCell
l_dispatchCell.Text = l_order.OrderHeader.DispatchNo.ToString
detailsRow.Cells.Add(l_dispatchCell)
Dim l_poNoCell As TableCell = New TableCell
l_poNoCell.Text = l_order.OrderHeader.CustPONo
detailsRow.Cells.Add(l_poNoCell)
Dim l_poDateCell As TableCell = New TableCell
l_poDateCell.Text = l_order.OrderHeader.CustPODate.ToString("dd/MM/yyyy")
detailsRow.Cells.Add(l_poDateCell)
'Add the new row to the table.
tblOrders.Rows.Add(detailsRow)
End While
Barry
Visual Studio .NET 2008/Visual Studio .NET 2005/Visual Studio .NET 2003
.NET Framework 3.0 2.0 1.1/ASP.Net 3.0 2.0 1.1/Compact Framework 1.0
SQL Server 2005/2000/SQL Server CE 2.0
If you like, rate this post
Compact Framework for Beginners
-
Nov 20th, 2006, 11:11 AM
#2
Fanatic Member
Re: Validaion Controls
could you not store the DataTable in a session variable?
 Life is one big rock tune 
-
Nov 20th, 2006, 11:26 AM
#3
Thread Starter
Fanatic Member
Re: Validaion Controls
yes i could store the array of order objects in a session, but for performance reasons im trying to keep sessions to a minimum...
but if i could get the validation field working for the selection it would be less overhead
can you add a validator on the fly to the selection or is what im trying to do hard
Barry
Visual Studio .NET 2008/Visual Studio .NET 2005/Visual Studio .NET 2003
.NET Framework 3.0 2.0 1.1/ASP.Net 3.0 2.0 1.1/Compact Framework 1.0
SQL Server 2005/2000/SQL Server CE 2.0
If you like, rate this post
Compact Framework for Beginners
-
Nov 21st, 2006, 03:20 AM
#4
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|