473,763 Members | 6,149 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with datatable in asp.net page

Hi,

I am working with an 'in session' ado dataset with an asp.net application.
My dataset is comprised of two tables, one of which maintains a few
calculated datacolumns. For some reason these datacolumns do not trigger
their expression when other columns from which the expressions are derived
are updated. Below is a basic example of what I am doing.

User enters values into an asp.net form and clicks a button.
Retrieve dataset from session object.
Dimension a procedure level array (A) of datarows.
Dimension a single datarow (S) as equal to datatable.newro w for the relevant
datatable (T)
Iterate through the values from the webform and add them to the appropriate
datarow.items for the single datarow (S)

(at this stage I believe the expression based columns should trigger their
value - but they are not showing when watched)

Add this new row (S) to the array of datarows (A).

(Depending on values in webform this process might be repeated with further
additions to the array)

Array (A) is passed off to another procedure.
New procedure retrieves dataset from session object.
Array (A) is iterated through with additional datarow.item values being
added.
As iterated, each datarow is added to the relevant datatable as referenced
through the retrieved dataset.

(at this stage when watching the datarows, their expression is not triggered
before or after addition to the datatable)

Procedure then calls acceptchanges on dataset.

(still no expression values - all calculated column items return
system.dbnull - all other values appear as required)

---

I've included the rather extensive code for this below if anyone wants to
wade through it for me :). I belive I am doing something simple
incorrectly, but would greatly appreciate any advice or help.

Cheers

CHris

(you'll notice from the quote that i am not really passing the array from
one procedure to another, but using a readonly property from one of the
forms to access the array)

This form is where the user clicks the Insert button, it then requests the
array of datarows from the second form (a user control), and attempts to add
them to the datatable.

Private Sub InsertNow_Click (ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles InsertNow.Click

Dim InsertRows() As DataRow

Dim insertrow As DataRow

Dim QuoteDS As New quotes(Session, context)

Dim QuoteTable As DataTable = QuoteDS.TablePr od

InsertRows = CType(Me.MainPa nel.Controls(1) , ins_ITQ).Produc tRows

CType(Me.MainPa nel.Controls(1) , ins_ITQ).ClearP anel()

If InsertRows.Leng th > 0 Then

Dim maintable As DataTable = dsQuote.TablePr od

Dim maxorder As Integer

If maintable.Selec t("Groupname = '" & InsertGroup.Sel ectedItem.Text &
"'").Length > 0 Then

MaxOrder = (maintable.Comp ute("max(order) ", "groupname = '" &
InsertGroup.Sel ectedItem.Text & "'")) + 1

Else

MaxOrder = 0

End If

Dim count As Integer

For count = 0 To InsertRows.Leng th - 1

insertrow = InsertRows(coun t)

insertrow.Item( "order") = maxorder

insertrow.Item( "groupname" ) = Me.InsertGroup. SelectedItem.Te xt

QuoteTable.Rows .Add(insertrow)

insertrow.Accep tChanges()

Next

QuoteDS.DS.Acce ptChanges()

Dim lc As New LiteralControl

lc.EnableViewSt ate = False

lc.Text = "<script>window .opener.ForcePo stBack(true);</script>"

Me.Page.Control s.Add(lc)

End If

End Sub

--== This next form is the user control - i've removed uneccessary code, to
primarily show the readonly property that returns the datarow array

Public Class ins_ITQ

Inherits System.Web.UI.U serControl

Private QuoteDS As quotes
Public ReadOnly Property ProductRows() As DataRow()

Get

If Page.IsValid Then

Dim CheckedRows() As Janus.Web.GridE X.GridEXRow

CheckedRows = gdTagged.GetChe ckedRows

If CheckedRows.Len gth > 0 Then

Dim count As Int16

Dim CheckedDataRw As DataRow

Dim TaggedTable As DataTable = RetrieveTagged( )

Dim IFcrm As New crmIF.Custom.cr mIF(Net.Credent ialCache.Defaul tCredentials)

Dim prodRows(Checke dRows.Length - 1) As DataRow

For count = 0 To CheckedRows.Len gth - 1

Dim prodRow As DataRow = CType(QuoteDS.T ableProd, DataTable).NewR ow

CheckedDataRw = TaggedTable.Row s.Find(CheckedR ows(count).Data KeyValue)

prodRow.Item("c ode") = CheckedDataRw.I tem("productCod e")

prodRow.Item("v endorcode") = "" 'CheckedDataRw. item("")

prodRow.Item("d escription") = CheckedDataRw.I tem("productNam e")

prodRow.Item("d etails") = "" 'CheckedDataRw. item("")

prodRow.Item("d etailsfull") = "" 'CheckedDataRw. item("")

prodRow.Item("s howspec") = True

prodRow.Item("i mage") = "" 'CheckedDataRw. item("")

prodRow.Item("t ier1") = "" 'CheckedDataRw. item("")

prodRow.Item("t ier2") = "" 'CheckedDataRw. item("")

prodRow.Item("t ier3") = "" 'CheckedDataRw. item("")

prodRow.Item("t ier4") = "" 'CheckedDataRw. item("")

prodRow.Item("v endor") = "" 'CheckedDataRw. item("")

Dim supID As String

supID = IFcrm.ReturnAcc ountID(CheckedD ataRw.Item("sup plierName"))

If supID <> "" Then

prodRow.Item("s upplier") = supID

Else

prodRow.Item("s upplier") = "Unrecognis ed"

End If

prodRow.Item("s tock") = 0 'CheckedDataRw. item("")

'prodRow.Item(" eta") =

prodRow.Item("o rigcostex") = CheckedDataRw.I tem("costEx")

prodRow.Item("c ostex") = CheckedDataRw.I tem("costEx")

prodRow.Item("c ostinc") = CheckedDataRw.I tem("costEx") * (1 +
System.Configur ation.Configura tionSettings.Ap pSettings("gstr ate"))

prodRow.Item("s ellex") = CheckedDataRw.I tem("sellEx")

prodRow.Item("s ellinc") = CheckedDataRw.I tem("sellEx") * (1 +
System.Configur ation.Configura tionSettings.Ap pSettings("gstr ate"))

prodRow.Item("r rpex") = CheckedDataRw.I tem("rrpEx")

prodRow.Item("r rpinc") = CheckedDataRw.I tem("rrpEx") * (1 +
System.Configur ation.Configura tionSettings.Ap pSettings("gstr ate"))

prodRow.Item("b rochure") = ""

CheckedDataRw.I tem("used") = True

prodRows(count) = prodRow

Next

Return prodRows

End If

End If

End Get

End Property

--== this is the underlying class used to manage the session object dataset
(the calculated columns are prof, grpformatted)

Public Class quotes

Private session As System.Web.Sess ionState.HttpSe ssionState

Private context As HttpContext

Private crmIF1 As crmIF.Custom.cr mIF

Public ReadOnly Property TableGrp() As DataTable

Get

Return RetrieveTable(" Group")

End Get

End Property

Public ReadOnly Property TableProd() As DataTable

Get

Return RetrieveTable(" Product")

End Get

End Property

Public ReadOnly Property DS() As DataSet

Get

If IsNothing(sessi on.Item(context .User.Identity. Name & "DS")) Then

CreateDS()

End If

Return CType(session.I tem(context.Use r.Identity.Name & "DS"), DataSet)

End Get

End Property

Protected WithEvents dsQuoteProducts As System.Data.Dat aSet

Protected WithEvents Groups As System.Data.Dat aTable

Protected WithEvents order As System.Data.Dat aColumn

Protected WithEvents name As System.Data.Dat aColumn

Protected WithEvents explanation As System.Data.Dat aColumn

Protected WithEvents shwnote As System.Data.Dat aColumn

Protected WithEvents shwtotal As System.Data.Dat aColumn

Protected WithEvents pid As System.Data.Dat aColumn

Protected WithEvents Products As System.Data.Dat aTable

Protected WithEvents code As System.Data.Dat aColumn

Protected WithEvents vendorcode As System.Data.Dat aColumn

Protected WithEvents description As System.Data.Dat aColumn

Protected WithEvents qty As System.Data.Dat aColumn

Protected WithEvents details As System.Data.Dat aColumn

Protected WithEvents detailsfull As System.Data.Dat aColumn

Protected WithEvents showspec As System.Data.Dat aColumn

Protected WithEvents image As System.Data.Dat aColumn

Protected WithEvents tier1 As System.Data.Dat aColumn

Protected WithEvents tier2 As System.Data.Dat aColumn

Protected WithEvents tier3 As System.Data.Dat aColumn

Protected WithEvents tier4 As System.Data.Dat aColumn

Protected WithEvents vendor As System.Data.Dat aColumn

Protected WithEvents supplier As System.Data.Dat aColumn

Protected WithEvents stock As System.Data.Dat aColumn

Protected WithEvents eta As System.Data.Dat aColumn

Protected WithEvents origcostex As System.Data.Dat aColumn

Protected WithEvents cstex As System.Data.Dat aColumn

Protected WithEvents cstinc As System.Data.Dat aColumn

Protected WithEvents sllex As System.Data.Dat aColumn

Protected WithEvents sllinc As System.Data.Dat aColumn

Protected WithEvents rrpx As System.Data.Dat aColumn

Protected WithEvents rrpi As System.Data.Dat aColumn

Protected WithEvents ordercol As System.Data.Dat aColumn

Protected WithEvents brochure As System.Data.Dat aColumn

Protected WithEvents grpnamecol As System.Data.Dat aColumn

Protected WithEvents cidcol As System.Data.Dat aColumn

Protected WithEvents colGroupID As System.Data.Dat aColumn

Protected WithEvents groupOrder As System.Data.Dat aColumn

Protected WithEvents colgrpFormatted As System.Data.Dat aColumn

Protected WithEvents DataColumn1 As System.Data.Dat aColumn 'Declare Dataset

Public Sub New(ByVal Sess As SessionState.Ht tpSessionState, ByVal Cont As
HttpContext)

session = Sess

context = Cont

If IsNothing(Sess( Cont.User.Ident ity.Name & "DS")) Then

InitDS()

CreateDS()

End If

End Sub

Public Sub InitDS()

Me.dsQuoteProdu cts = New System.Data.Dat aSet

Me.Groups = New System.Data.Dat aTable

Me.order = New System.Data.Dat aColumn

Me.name = New System.Data.Dat aColumn

Me.explanation = New System.Data.Dat aColumn

Me.shwnote = New System.Data.Dat aColumn

Me.shwtotal = New System.Data.Dat aColumn

Me.pid = New System.Data.Dat aColumn

Me.Products = New System.Data.Dat aTable

Me.code = New System.Data.Dat aColumn

Me.vendorcode = New System.Data.Dat aColumn

Me.description = New System.Data.Dat aColumn

Me.qty = New System.Data.Dat aColumn

Me.details = New System.Data.Dat aColumn

Me.detailsfull = New System.Data.Dat aColumn

Me.showspec = New System.Data.Dat aColumn

Me.image = New System.Data.Dat aColumn

Me.tier1 = New System.Data.Dat aColumn

Me.tier2 = New System.Data.Dat aColumn

Me.tier3 = New System.Data.Dat aColumn

Me.tier4 = New System.Data.Dat aColumn

Me.vendor = New System.Data.Dat aColumn

Me.supplier = New System.Data.Dat aColumn

Me.stock = New System.Data.Dat aColumn

Me.eta = New System.Data.Dat aColumn

Me.origcostex = New System.Data.Dat aColumn

Me.cstex = New System.Data.Dat aColumn

Me.cstinc = New System.Data.Dat aColumn

Me.sllex = New System.Data.Dat aColumn

Me.sllinc = New System.Data.Dat aColumn

Me.rrpx = New System.Data.Dat aColumn

Me.rrpi = New System.Data.Dat aColumn

Me.ordercol = New System.Data.Dat aColumn

Me.grpnamecol = New System.Data.Dat aColumn

Me.cidcol = New System.Data.Dat aColumn

Me.brochure = New System.Data.Dat aColumn

Me.colGroupID = New System.Data.Dat aColumn

Me.groupOrder = New System.Data.Dat aColumn

Me.colgrpFormat ted = New System.Data.Dat aColumn

Me.DataColumn1 = New System.Data.Dat aColumn

Me.brochure = New System.Data.Dat aColumn

CType(Me.dsQuot eProducts,
System.Componen tModel.ISupport Initialize).Beg inInit()

CType(Me.Groups , System.Componen tModel.ISupport Initialize).Beg inInit()

CType(Me.Produc ts, System.Componen tModel.ISupport Initialize).Beg inInit()

'

'dsQuoteProduct s

'

Me.dsQuoteProdu cts.DataSetName = "dsQuoteProduct s"

Me.dsQuoteProdu cts.Locale = New System.Globaliz ation.CultureIn fo("en-AU")

Me.dsQuoteProdu cts.Relations.A ddRange(New System.Data.Dat aRelation() {New
System.Data.Dat aRelation("Rela tion1", "Groups", "Products", New String()
{"name"}, New String() {"groupname" }, False), New
System.Data.Dat aRelation("Rela tion2", "Groups", "Products", New String()
{"id"}, New String() {"groupid"}, False), New
System.Data.Dat aRelation("Rela tion3", "Groups", "Products", New String()
{"order"}, New String() {"groupOrder "}, False)})

Me.dsQuoteProdu cts.Tables.AddR ange(New System.Data.Dat aTable() {Me.Groups,
Me.Products})

'

'Groups

'

Me.Groups.Colum ns.AddRange(New System.Data.Dat aColumn() {Me.order, Me.name,
Me.explanation, Me.shwnote, Me.shwtotal, Me.pid})

Me.Groups.Const raints.AddRange (New System.Data.Con straint() {New
System.Data.Uni queConstraint(" Constraint1", New String() {"order"}, False),
New System.Data.Uni queConstraint(" Constraint2", New String() {"id"}, True),
New System.Data.Uni queConstraint(" Constraint3", New String() {"name"},
False)})

Me.Groups.Prima ryKey = New System.Data.Dat aColumn() {Me.pid}

Me.Groups.Table Name = "Groups"

'

'order

'

Me.order.AllowD BNull = False

Me.order.Captio n = "order"

Me.order.Column Name = "order"

Me.order.DataTy pe = GetType(System. Int32)

'

'name

'

Me.name.AllowDB Null = False

Me.name.Caption = "name"

Me.name.ColumnN ame = "name"

'

'Brochure

Me.brochure.All owDBNull = True

Me.brochure.Cap tion = "brochure"

Me.brochure.Dat aType = GetType(System. String)

'explanation

'

Me.explanation. ColumnName = "explanatio n"

'

'shwnote

'

Me.shwnote.Allo wDBNull = False

Me.shwnote.Colu mnName = "shwnote"

Me.shwnote.Data Type = GetType(System. Boolean)

Me.shwnote.Defa ultValue = False

'

'shwtotal

'

Me.shwtotal.All owDBNull = False

Me.shwtotal.Col umnName = "shwtotal"

Me.shwtotal.Dat aType = GetType(System. Boolean)

Me.shwtotal.Def aultValue = False

'

'id

'

Me.pid.AllowDBN ull = False

Me.pid.AutoIncr ement = True

Me.pid.Caption = "id"

Me.pid.ColumnNa me = "id"

Me.pid.DataType = GetType(System. Int32)

'

'Products

'

Me.Products.Col umns.AddRange(N ew System.Data.Dat aColumn() {Me.code,
Me.vendorcode, Me.description, Me.qty, Me.details, Me.detailsfull,
Me.showspec, Me.image, Me.tier1, Me.tier2, Me.tier3, Me.tier4, Me.vendor,
Me.supplier, Me.stock, Me.eta, Me.origcostex, Me.cstex, Me.cstinc, Me.sllex,
Me.sllinc, Me.rrpx, Me.rrpi, Me.ordercol, Me.grpnamecol, Me.cidcol,
Me.colGroupID, Me.groupOrder, Me.colgrpFormat ted, Me.DataColumn1,
Me.brochure})

Me.Products.Con straints.AddRan ge(New System.Data.Con straint() {New
System.Data.Uni queConstraint(" Constraint1", New String() {"cid"}, True), New
System.Data.For eignKeyConstrai nt("Relation1" , "Groups", New String()
{"name"}, New String() {"groupname" }, System.Data.Acc eptRejectRule.N one,
System.Data.Rul e.Cascade, System.Data.Rul e.Cascade), New
System.Data.For eignKeyConstrai nt("Relation2" , "Groups", New String() {"id"},
New String() {"groupid"}, System.Data.Acc eptRejectRule.N one,
System.Data.Rul e.Cascade, System.Data.Rul e.Cascade), New
System.Data.For eignKeyConstrai nt("Relation3" , "Groups", New String()
{"order"}, New String() {"groupOrder "}, System.Data.Acc eptRejectRule.N one,
System.Data.Rul e.Cascade, System.Data.Rul e.Cascade)})

Me.Products.Pri maryKey = New System.Data.Dat aColumn() {Me.cidcol}

Me.Products.Tab leName = "Products"

'

'type

'

'

'code

Me.brochure.All owDBNull = True

Me.brochure.Col umnName = "brochure"

'

Me.code.AllowDB Null = False

Me.code.ColumnN ame = "code"

'

'vendorcode

'

Me.vendorcode.C olumnName = "vendorcode "

'

'description

'

Me.description. ColumnName = "descriptio n"

'

'qty

'

Me.qty.AllowDBN ull = False

Me.qty.ColumnNa me = "qty"

Me.qty.DataType = GetType(System. Int16)

Me.qty.DefaultV alue = CType(1, Short)

'

'details

'

Me.details.Colu mnName = "details"

'

'detailsfull

'

Me.detailsfull. ColumnName = "detailsful l"

'

'showspec

'

Me.showspec.Col umnName = "showspec"

Me.showspec.Dat aType = GetType(System. Boolean)

'

'image

'

Me.image.Column Name = "image"

'

'tier1

'

Me.tier1.Column Name = "tier1"

'

'tier2

'

Me.tier2.Column Name = "tier2"

'

'tier3

'

Me.tier3.Column Name = "tier3"

'

'tier4

'

Me.tier4.Column Name = "tier4"

'

'vendor

'

Me.vendor.Colum nName = "vendor"

'

'supplier

'

Me.supplier.Col umnName = "supplier"

'

'stock

'

Me.stock.Column Name = "stock"

Me.stock.DataTy pe = GetType(System. Int32)

'

'eta

'

Me.eta.ColumnNa me = "eta"

Me.eta.DataType = GetType(System. DateTime)

Me.eta.AllowDBN ull = True

'

'origcostex

'

Me.origcostex.C olumnName = "origcostex "

Me.origcostex.D ataType = GetType(System. Decimal)

'

'cstex

'

Me.cstex.Column Name = "costex"

Me.cstex.DataTy pe = GetType(System. Decimal)

'

'cstinc

'

Me.cstinc.Capti on = "costinc"

Me.cstinc.Colum nName = "costinc"

Me.cstinc.DataT ype = GetType(System. Decimal)

'

'sllex

'

Me.sllex.Column Name = "sellex"

Me.sllex.DataTy pe = GetType(System. Decimal)

'

'sllinc

'

Me.sllinc.Colum nName = "sellinc"

Me.sllinc.DataT ype = GetType(System. Decimal)

'

'rrpx

'

Me.rrpx.ColumnN ame = "rrpex"

Me.rrpx.DataTyp e = GetType(System. Decimal)

'

'rrpi

'

Me.rrpi.ColumnN ame = "rrpinc"

Me.rrpi.DataTyp e = GetType(System. Decimal)

'

'ordercol

'

Me.ordercol.All owDBNull = False

Me.ordercol.Col umnName = "order"

Me.ordercol.Dat aType = GetType(System. Int32)

'

'grpnamecol

'

Me.grpnamecol.A llowDBNull = False

Me.grpnamecol.C olumnName = "groupname"

'

'cidcol

'

Me.cidcol.Allow DBNull = False

Me.cidcol.AutoI ncrement = True

Me.cidcol.Capti on = "cid"

Me.cidcol.Colum nName = "cid"

Me.cidcol.DataT ype = GetType(System. Int32)

'

'colGroupID

'

Me.colGroupID.C olumnName = "groupid"

Me.colGroupID.D ataType = GetType(System. Int32)

'

'groupOrder

'

Me.groupOrder.C olumnName = "groupOrder "

Me.groupOrder.D ataType = GetType(System. Int32)

'

'colgrpFormatte d

'

Me.colgrpFormat ted.ColumnName = "grpFormatt ed"

Me.colgrpFormat ted.Expression = "'[' + iif(groupOrder > 9, groupOrder, '0' +
groupOrder) + '] ' + groupname"

Me.colgrpFormat ted.ReadOnly = True

'

'DataColumn1

'

Me.DataColumn1. ColumnName = "prof"

Me.DataColumn1. DataType = GetType(System. Decimal)

Me.DataColumn1. Expression = "qty*costex "

Me.DataColumn1. ReadOnly = True

CType(Me.dsQuot eProducts,
System.Componen tModel.ISupport Initialize).End Init()

CType(Me.Groups , System.Componen tModel.ISupport Initialize).End Init()

CType(Me.Produc ts, System.Componen tModel.ISupport Initialize).End Init()

End Sub

Private Sub CreateDS()

If IsNothing(sessi on.Item(context .User.Identity. Name & "DS")) Then

session.Add(con text.User.Ident ity.Name & "DS", Me.dsQuoteProdu cts)

End If

CreateGroupTabl e()

End Sub

Private Sub CreateGroupTabl e()

Dim GroupTable As DataTable

Dim GroupKey(0) As DataColumn

Dim drGroup As DataRow

GroupTable = RetrieveTable(" Group")

drGroup = GroupTable.NewR ow

drGroup.Item(0) = 0

drGroup.Item(1) = "Unassigned "

drGroup.Item(2) = ""

drGroup.Item(3) = False

drGroup.Item(4) = False

GroupTable.Rows .Add(drGroup)

End Sub

Private Function RetrieveTable(B yVal TableName As String) As DataTable

Select Case TableName

Case "Group"

If IsNothing(sessi on.Item(context .User.Identity. Name & "DS")) Then

CreateDS()

End If

Return CType(session.I tem(context.Use r.Identity.Name & "DS"),
DataSet).Tables ("Groups")

Case "Product"

If IsNothing(sessi on.Item(context .User.Identity. Name & "DS")) Then

CreateDS()

End If

Return CType(session.I tem(context.Use r.Identity.Name & "DS"),
DataSet).Tables ("Products")

End Select

End Function

Public Function RetrieveSupplie rs(ByVal UserCred As Net.NetworkCred ential,
ByVal Refresh As Boolean) As DataSet

If IsNothing(sessi on.Item("Suppli ers")) Or Refresh = True Then

crmIF1 = New crmIF.Custom.cr mIF(UserCred)

Dim qResults = crmIF1.ExecuteQ uery("<fetch mapping='logica l'><entity
name='account'> <all-attributes/><filter type='and'><con dition attribute =
'customertypeco de' operator='eq' value='10'/></filter></entity></fetch>")

Dim dsSuppliers As New DataSet

dsSuppliers.Rea dXml(New IO.StringReader (qResults))

session.Add("Su ppliers", dsSuppliers)

End If

Return session.Item("S uppliers")

End Function

Public Function RetrieveSupplie rNames(ByVal UserCred As
Net.NetworkCred ential, ByVal Refresh As Boolean) As DataSet

If IsNothing(sessi on.Item("Suppli ers")) Or Refresh = True Then

crmIF1 = New crmIF.Custom.cr mIF(UserCred)

Dim qResults = crmIF1.ExecuteQ uery("<fetch mapping='logica l'><entity
name='account'> <attribute name ='name'/><attribute name='accountid '
/><filter type='and'><con dition attribute = 'customertypeco de' operator='eq'
value='10'/></filter></entity></fetch>")

Dim dsSuppliers As New DataSet

dsSuppliers.Rea dXml(New IO.StringReader (qResults))

session.Add("Su ppliers", dsSuppliers)

End If

Return session.Item("S uppliers")

End Function

End Class

Nov 18 '05 #1
0 3167

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1383
by: Spooki71 | last post by:
Hi, running .net v1.1 framework win2000 iis5. I've got this random problem that is just driving me crazy and I'm hoping somebody can help. So here goes: I have a .net app that has a login page to authenticate users from a sql database. When the user logs in successfully certain date is then stored in session variables i.e Username=Session("Username") etc. My web.config file is configured as followed: mode="InProc"
8
1957
by: Inigo Jimenez | last post by:
I have an ASP .net web application installed in a Windows 2003 server. This web application has a webform that has a Datagrid. This Datagrid is filled with the data of a SQL table. I have a button that inserts a new row in the SQL table and then refresh the datagrid.
4
2126
by: The Alchemist | last post by:
I am having a problem with a dynamically-generated Datagrid. It is important to point out that this problem does not exist with a design-time created Datagrid, but only with a dynamically generated Datagrid in a Web Custom Control (WCC) : The datagrid has LinkButton Column which has a select LinkButton for each row. When this button is clicked, the Datagrid raises its 'ItemCommand' event which captures the information for that row and...
10
3085
by: Brian Henry | last post by:
Hi, I am having a problem with an attachment system I made... it works with files up to ~3MB in size then after that if you try to upload a file it just goes to a "Page can not be displayed" page like it tried to do it but errored... I thought changeing the max size for the file input box to about 100mb would fix it but nope here is my page code and my code behind code... ===============
2
2122
by: ven | last post by:
Hello i have a dynamic datatable in my page. I wanna to write data to textboxes and after click on button "ADD data" i want to refresh datagrid on page... Here is my code : ' Insert page code here ' Dim wykszt as System.Data.DataTable Dim zatru as System.Data.DataTable Dim row as system.Data.DataRow
0
1648
by: Tim::.. | last post by:
Hi... I'm having a big problem with a datagrid that obtains data from 2 different locations... Active Directory and SQL Database The data is inserted into a datatable and the sorted by a dataview... however due to alphabetic paging and the postback ("I think") the contacts from the SQL Database appear on ever page when you page through the datagrids
5
2615
by: Brad Baker | last post by:
I'm trying to write a simple asp.net page which updates some data in a SQL database. At the top of the page I have the following code: <%@ Page Language="C#" Debug="true" %> <%@ import namespace="System.Data" %> <%@ import namespace="System.Data.SqlClient" %> <script language="c#" runat="server"> public void Page_Load(object sender, EventArgs e) {
0
2090
by: rupalirane07 | last post by:
Both grids displays fine. But the problem is only parent datagrid sorting works fine but when i clik on child datagrid for sorting it gives me error: NullReferenceException error Any help........pls urgent ========================================================= <%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm3.aspx.vb" Inherits="TestDatagrids.WebForm3"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">...
0
1139
by: mimifara | last post by:
Good Morning, I have a problem with my listbox control, and i tried everything i found on the web but maybe i'm still missing something. I have a listbox that i control with a datatable <the data table is populated through a data layer which is a seperate application> and i bind it to the listbox, on selecting an item from that listbox, a second dropdownlistbox should be activated. My problem is that when i do postback to activate the...
0
9563
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9386
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9997
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9937
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9822
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8821
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7366
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5270
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.