473,322 Members | 1,398 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

SmartNavigation Datagrid problem in Windows 2003 Server

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.
In windows XP clients this webpage works fine but only in windows 2000
clients doesn't work.

The updates of the database are done but the datagrid doesn't refresh
the data when I insert new rows.
I have rebuilt the web application in the server and it doest'n work.

Before this my ASP net web application was in a Windows 2000 server and the
datagrid
was refreshing in Windows 2000 clients and in Windows XP clients.
What's wrong?
Thanks in advance.

(P.D. The webpage has the smartnavigation property enabled and all the asp
net web pages
are called from a window modal dialog.)
Nov 18 '05 #1
8 1898
Have you tried turning smart navigation off?

--
Regards,
Alvin Bruney
Got Tidbits? Get it here
www.networkip.net/tidbits
"Inigo Jimenez" <in*************@lycos.com> wrote in message
news:eS**************@TK2MSFTNGP10.phx.gbl...
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.
In windows XP clients this webpage works fine but only in windows 2000
clients doesn't work.

The updates of the database are done but the datagrid doesn't refresh
the data when I insert new rows.
I have rebuilt the web application in the server and it doest'n work.

Before this my ASP net web application was in a Windows 2000 server and the datagrid
was refreshing in Windows 2000 clients and in Windows XP clients.
What's wrong?
Thanks in advance.

(P.D. The webpage has the smartnavigation property enabled and all the asp
net web pages
are called from a window modal dialog.)

Nov 18 '05 #2
Yes, I've tried turning smart navigation off but it doesn't work. Somebody
said me that this problem could be because the smart navigation.

"Alvin Bruney" <va******@hotspammailme.com> escribió en el mensaje
news:ut**************@TK2MSFTNGP09.phx.gbl...
Have you tried turning smart navigation off?

--
Regards,
Alvin Bruney
Got Tidbits? Get it here
www.networkip.net/tidbits
"Inigo Jimenez" <in*************@lycos.com> wrote in message
news:eS**************@TK2MSFTNGP10.phx.gbl...
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.
In windows XP clients this webpage works fine but only in windows 2000
clients doesn't work.

The updates of the database are done but the datagrid doesn't refresh
the data when I insert new rows.
I have rebuilt the web application in the server and it doest'n work.

Before this my ASP net web application was in a Windows 2000 server and

the
datagrid
was refreshing in Windows 2000 clients and in Windows XP clients.
What's wrong?
Thanks in advance.

(P.D. The webpage has the smartnavigation property enabled and all the asp net web pages
are called from a window modal dialog.)


Nov 18 '05 #3
Yes, I've tried turning smart navigation off but it doesn't work. Somebody
says me that this problem could be because the smart navigation.

"Alvin Bruney" <va******@hotspammailme.com> escribió en el mensaje
news:ut**************@TK2MSFTNGP09.phx.gbl...
Have you tried turning smart navigation off?

--
Regards,
Alvin Bruney
Got Tidbits? Get it here
www.networkip.net/tidbits
"Inigo Jimenez" <in*************@lycos.com> wrote in message
news:eS**************@TK2MSFTNGP10.phx.gbl...
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.
In windows XP clients this webpage works fine but only in windows 2000
clients doesn't work.

The updates of the database are done but the datagrid doesn't refresh
the data when I insert new rows.
I have rebuilt the web application in the server and it doest'n work.

Before this my ASP net web application was in a Windows 2000 server and

the
datagrid
was refreshing in Windows 2000 clients and in Windows XP clients.
What's wrong?
Thanks in advance.

(P.D. The webpage has the smartnavigation property enabled and all the asp net web pages
are called from a window modal dialog.)


Nov 18 '05 #4
Yes, I've tried turning smart navigation off but it doesn't work. Somebody
said me that this problem could be because the smart navigation.

"Alvin Bruney" <va******@hotspammailme.com> escribió en el mensaje
news:ut**************@TK2MSFTNGP09.phx.gbl...
Have you tried turning smart navigation off?

--
Regards,
Alvin Bruney
Got Tidbits? Get it here
www.networkip.net/tidbits
"Inigo Jimenez" <in*************@lycos.com> wrote in message
news:eS**************@TK2MSFTNGP10.phx.gbl...
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.
In windows XP clients this webpage works fine but only in windows 2000
clients doesn't work.

The updates of the database are done but the datagrid doesn't refresh
the data when I insert new rows.
I have rebuilt the web application in the server and it doest'n work.

Before this my ASP net web application was in a Windows 2000 server and

the
datagrid
was refreshing in Windows 2000 clients and in Windows XP clients.
What's wrong?
Thanks in advance.

(P.D. The webpage has the smartnavigation property enabled and all the asp net web pages
are called from a window modal dialog.)


Nov 18 '05 #5
> > net web pages
are called from a window modal dialog.)
I don't understand this part. Would you care to explain?
Just to be sure here, after writing to the database you requery the
datasource and bind to the datagrid?

Can you post just that part of the code

--
Regards,
Alvin Bruney
Got Tidbits? Get it here
www.networkip.net/tidbits
"Inigo Jimenez" <in*************@lycos.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Yes, I've tried turning smart navigation off but it doesn't work. Somebody
says me that this problem could be because the smart navigation.

"Alvin Bruney" <va******@hotspammailme.com> escribió en el mensaje
news:ut**************@TK2MSFTNGP09.phx.gbl...
Have you tried turning smart navigation off?

--
Regards,
Alvin Bruney
Got Tidbits? Get it here
www.networkip.net/tidbits
"Inigo Jimenez" <in*************@lycos.com> wrote in message
news:eS**************@TK2MSFTNGP10.phx.gbl...
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.
In windows XP clients this webpage works fine but only in windows 2000
clients doesn't work.

The updates of the database are done but the datagrid doesn't refresh
the data when I insert new rows.
I have rebuilt the web application in the server and it doest'n work.

Before this my ASP net web application was in a Windows 2000 server
and the
datagrid
was refreshing in Windows 2000 clients and in Windows XP clients.
What's wrong?
Thanks in advance.

(P.D. The webpage has the smartnavigation property enabled and all the

asp net web pages
are called from a window modal dialog.)



Nov 18 '05 #6
Sorry but I haven't here the code. The code is at work. I'll send it on
Monday.

Thanks for your answers...
"Alvin Bruney" <va******@hotspammailme.com> escribió en el mensaje
news:uF**************@TK2MSFTNGP09.phx.gbl...
net web pages
are called from a window modal dialog.)
I don't understand this part. Would you care to explain?
Just to be sure here, after writing to the database you requery the
datasource and bind to the datagrid?

Can you post just that part of the code

--
Regards,
Alvin Bruney
Got Tidbits? Get it here
www.networkip.net/tidbits
"Inigo Jimenez" <in*************@lycos.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Yes, I've tried turning smart navigation off but it doesn't work. Somebody says me that this problem could be because the smart navigation.

"Alvin Bruney" <va******@hotspammailme.com> escribió en el mensaje
news:ut**************@TK2MSFTNGP09.phx.gbl...
Have you tried turning smart navigation off?

--
Regards,
Alvin Bruney
Got Tidbits? Get it here
www.networkip.net/tidbits
"Inigo Jimenez" <in*************@lycos.com> wrote in message
news:eS**************@TK2MSFTNGP10.phx.gbl...
> 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.
>
>
> In windows XP clients this webpage works fine but only in windows 2000 > clients doesn't work.
>
> The updates of the database are done but the datagrid doesn't refresh > the data when I insert new rows.
>
>
> I have rebuilt the web application in the server and it doest'n work. >
> Before this my ASP net web application was in a Windows 2000 server and the
> datagrid
> was refreshing in Windows 2000 clients and in Windows XP clients.
>
>
> What's wrong?
>
>
> Thanks in advance.
>
> (P.D. The webpage has the smartnavigation property enabled and all

the asp
> net web pages
> are called from a window modal dialog.)
>
>



Nov 18 '05 #7
Well I've copied some code lines so you can help me.

I've captured some windows for explain more detailly the problem.

The images are in the folder Webform at:
http://es.f1.pg.briefcase.yahoo.com/inigo_jimenez
The problem:

- From an ASP page I open a modal dialog (figure_A.JPG)

- If I click one of the buttons (the ! button) another window open so
I can choose one of the options (figure_B.JPG)

- When I've chosen one item, this window is closed and the datatable
is updated with a new row. The datagrid refresh automatically
(figure_C.JPG)

- I can insert a new row directly from the textbox that is down the
datagrid (figure_D.JPG)

- If I click on the button that is on the right of the textbox, the
datatable is updated with a new row and the datagrid is refreshed.
(figure_E.JPG).
Well, if this webpage is on a Windows 2000 server works fine but if
the same webpage is on a Windows 2003 server in Windows 2000 client
doesn't work but in Windows XP works fine. The problem is that the
data is inserted in the datatable but the datagrid doesn't refresh the
data.

What's Wrong?
Thanks in advance.
Here the code:

//----------------------------------------------------------------------
// THIS IS THE WEBPAGE HEADER
//----------------------------------------------------------------------
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="frmAnomalias.aspx.vb" Inherits="Anomalias.frmAnomalias"
smartNavigation="True" %>

//----------------------------------------------------------------------
// THIS IS THE WEBPAGE HEADER
//----------------------------------------------------------------------
<DIV id="div1" style="Z-INDEX: 109; LEFT: 14px; OVERFLOW: auto; WIDTH:
451px; POSITION: absolute; TOP: 95px; HEIGHT: 116px"
ms_positioning="GridLayout">
<asp:datagrid id="gridPdtes" style="Z-INDEX: 115; LEFT: 0px;
POSITION: absolute; TOP: 0px" runat="server" ForeColor="Navy"
Height="64px" Width="433px" BackColor="FloralWhite" BorderColor="Navy"
AutoGenerateColumns="False" Font-Size="8pt" Font-Names="Verdana">
<HeaderStyle Font-Size="10pt" Font-Names="Verdana" Font-Bold="True"
ForeColor="SteelBlue" BorderColor="White"
BackColor="Azure"></HeaderStyle>
<Columns>
<asp:TemplateColumn></asp:TemplateColumn>
<asp:BoundColumn DataField="Objeto"
HeaderText="Objeto"></asp:BoundColumn>
<asp:BoundColumn DataField="Descripcion"
HeaderText="Descripción"></asp:BoundColumn>
<asp:BoundColumn Visible="False" DataField="Index"
HeaderText="Index"></asp:BoundColumn>
</Columns>
</asp:datagrid>
</DIV>
//----------------------------------------------------------------------
// THIS IS THE CODE OF THE BUTTON THAT INSERTS NEW ROWS
//----------------------------------------------------------------------
Private Sub bAddTxt_Click(ByVal sender As System.Object, ByVal e As
System.Web.UI.ImageClickEventArgs) Handles bAddTxt.Click

If Me.txtAnomTxtLibre.Text <> "" Then
AgregarAnomTxtLibre(Me.txtAnomTxtLibre.Text)
Me.txtAnomTxtLibre.Text = ""
RellenarTablas()
End If

End Sub

//----------------------------------------------------------------------
// THIS IS THE CODE THAT USE A COMPONENT TO UPDATE/INSERT ROWS IN THE
// DATABASE
//----------------------------------------------------------------------
Public Sub AgregarAnomTxtLibre(ByVal txt As String)

SETSI_XFolder = New SETSI_Folders.SETSI_XFolders.SETSI_XFolder()
FolderBase = New IDESFOLDERLib.FdrClass()
XFolder = New IDESXLib.iDesX_XFolderClass()
XFolder = FolderBase.XNew(SessionPId, ArchAnomPId)
XFolder.SetFieldValue(SETSI_FLDID_ANOM_IDEXP, IdExp)
XFolder.SetFieldValue(SETSI_FLDID_ANOM_IDOBJ, IdObj)
If IdTipoObj = 0 Then
XFolder.SetFieldValue(SETSI_FLDID_ANOM_IDTIPOBJ, "Expediente")
Else
XFolder.SetFieldValue(SETSI_FLDID_ANOM_IDTIPOBJ,
ObjFunciones.DescripcionTipObj(IdTipoObj))
End If
XFolder.SetFieldValue(SETSI_FLDID_ANOM_SUBSAN, "N")
XFolder.SetFieldValue(SETSI_FLDID_ANOM_TEXTO, txt)
SETSI_XFolder.XFolder = XFolder
SETSI_XFolder.Flags = 0
SETSI_XFolders.Add(SETSI_XFolder)
SETSI_XFolder = Nothing
XFolder = Nothing
FolderBase = Nothing

End Sub
//----------------------------------------------------------------------
// THIS IS THE SUB THAT INITIALIZES THE DATATABLE OBJECT
//----------------------------------------------------------------------
Public Sub RellenarTablas()
Dim table As New DataTable()
Dim col As New DataColumn()
Dim row As DataRow
Dim txt As String
Dim objTxt As String
Dim chk As System.Web.UI.WebControls.CheckBox
Dim i As Integer
Dim TipoObjeto As Object
Dim IdTipoObjeto As Object
Dim IdObjeto As Object
Dim IdTipoAnomalia As Object
Dim TextoAnomalia As Object
Dim Subsanada As Object

col.ColumnName = "Objeto"
table.Columns.Add(col)
col = New DataColumn()
col.ColumnName = "Descripcion"
table.Columns.Add(col)
col = New DataColumn()
col.ColumnName = "Subsanada"
table.Columns.Add(col)
col = New DataColumn()
col.ColumnName = "Index"
table.Columns.Add(col)

For i = 0 To SETSI_XFolders.GetCount - 1
SETSI_XFolder = New
SETSI_Folders.SETSI_XFolders.SETSI_XFolder()
XFolder = New IDESXLib.iDesX_XFolderClass()
SETSI_XFolder = SETSI_XFolders.GetItem(i)
If SETSI_XFolder.Flags = 0 Or SETSI_XFolder.Flags = 2 Then
XFolder = SETSI_XFolder.XFolder
objTxt = XFolder.GetFieldValue(SETSI_FLDID_ANOM_IDTIPOBJ)
IdTipoObjeto = ObjFunciones.GetIdTipObj(CStr(objTxt))
IdObjeto = XFolder.GetFieldValue(SETSI_FLDID_ANOM_IDOBJ)
IdTipoAnomalia =
XFolder.GetFieldValue(SETSI_FLDID_ANOM_IDTIPOANOM)
TextoAnomalia =
XFolder.GetFieldValue(SETSI_FLDID_ANOM_TEXTO)
Subsanada = XFolder.GetFieldValue(SETSI_FLDID_ANOM_SUBSAN)
If IdTipoObjeto > 1 And IdTipoObj <> 4 Then
' Equipos o titulados
objTxt = objTxt & " - " &
ObjFunciones.DescripcionObj(ObjSession, SessionPId, IdTipoObjeto,
IdObjeto)
End If

If IsDBNull(IdTipoAnomalia) Then
txt = TextoAnomalia
Else
If IdTipoAnomalia = 0 Then
txt = TextoAnomalia
Else
RS = ObjSession.XDBSelect(SessionPId, "A" &
SETSI_ARCHID_TIPOS_ANOM & "SF", "FLD" & SETSI_FLDID_TIPOS_ANOM_VALOR,
"WHERE FDRID = " & IdTipoAnomalia, Found)
If Not RS Is Nothing And Found Then
RS.Item(1, txt)
End If
RS = Nothing
End If
End If
row = table.NewRow()
row.Item(0) = objTxt
row.Item(1) = txt
row.Item(2) = Subsanada
row.Item(3) = i

table.Rows.Add(row)
XFolder = Nothing
SETSI_XFolder = Nothing
End If
Next
CrearVistas(table)
AgregarCheckboxes()
DeshabilitarAutom()
End Sub

//----------------------------------------------------------------------
// THIS SUB BUILDS THE DATAVIEW ON THE DATATABLE OBJECT
//----------------------------------------------------------------------
Public Sub CrearVistas(ByVal table As DataTable)
Dim dv As DataView
If IdTipoObj > 1 Then
' Equipos y Titulados:
Me.gridPdtes.Columns(1).Visible = False
Me.gridSubs.Columns(1).Visible = False
End If
dv = New DataView(table, "Subsanada='N'", "",
DataViewRowState.CurrentRows)
Me.gridPdtes.DataSource = dv
Me.gridPdtes.DataBind()
dv = New DataView(table, "Subsanada='S'", "",
DataViewRowState.CurrentRows)
Me.gridSubs.DataSource = dv
Me.gridSubs.DataBind()
End Sub

//----------------------------------------------------------------------
// THIS SUB INSERT CHECKBOXES IN THE DATAGRID
//----------------------------------------------------------------------
Public Sub AgregarCheckboxes()
Dim i As Int16
Dim chk As System.Web.UI.WebControls.CheckBox

For i = 0 To Me.gridPdtes.Items.Count - 1
chk = New System.Web.UI.WebControls.CheckBox()
Me.gridPdtes.Items.Item(i).Cells(0).Controls.Add(c hk)
Next
For i = 0 To Me.gridSubs.Items.Count - 1
chk = New System.Web.UI.WebControls.CheckBox()
Me.gridSubs.Items.Item(i).Cells(0).Controls.Add(ch k)
Next
End Sub
//----------------------------------------------------------------------
// THIS SUB PUTS SOME CONTROLS DISABLED
//----------------------------------------------------------------------
Private Sub DeshabilitarAutom()
Dim m_Item As System.Web.UI.WebControls.DataGridItem
Dim Tipo As String
Dim Color As System.Drawing.Color
Color = Color.FromName("Snow")
For Each m_Item In Me.gridPdtes.Items
Tipo = m_Item.Cells(1).Text
If Tipo = "Automática" Then
m_Item.Enabled = False
'm_Item.BackColor = Color
End If
Next
End Sub
Nov 18 '05 #8
did you get help on this or figure this out. I'm sorry i took so long this
one slipped thru the cracks

--
Regards,
Alvin Bruney
http://www.networkip.net/dotnet/tidbits/default.htm
"Inigo Jimenez" <in*************@lycos.com> wrote in message
news:9f**************************@posting.google.c om...
Well I've copied some code lines so you can help me.

I've captured some windows for explain more detailly the problem.

The images are in the folder Webform at:
http://es.f1.pg.briefcase.yahoo.com/inigo_jimenez
The problem:

- From an ASP page I open a modal dialog (figure_A.JPG)

- If I click one of the buttons (the ! button) another window open so
I can choose one of the options (figure_B.JPG)

- When I've chosen one item, this window is closed and the datatable
is updated with a new row. The datagrid refresh automatically
(figure_C.JPG)

- I can insert a new row directly from the textbox that is down the
datagrid (figure_D.JPG)

- If I click on the button that is on the right of the textbox, the
datatable is updated with a new row and the datagrid is refreshed.
(figure_E.JPG).
Well, if this webpage is on a Windows 2000 server works fine but if
the same webpage is on a Windows 2003 server in Windows 2000 client
doesn't work but in Windows XP works fine. The problem is that the
data is inserted in the datatable but the datagrid doesn't refresh the
data.

What's Wrong?
Thanks in advance.
Here the code:

//----------------------------------------------------------------------
// THIS IS THE WEBPAGE HEADER
//----------------------------------------------------------------------
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="frmAnomalias.aspx.vb" Inherits="Anomalias.frmAnomalias"
smartNavigation="True" %>

//----------------------------------------------------------------------
// THIS IS THE WEBPAGE HEADER
//----------------------------------------------------------------------
<DIV id="div1" style="Z-INDEX: 109; LEFT: 14px; OVERFLOW: auto; WIDTH:
451px; POSITION: absolute; TOP: 95px; HEIGHT: 116px"
ms_positioning="GridLayout">
<asp:datagrid id="gridPdtes" style="Z-INDEX: 115; LEFT: 0px;
POSITION: absolute; TOP: 0px" runat="server" ForeColor="Navy"
Height="64px" Width="433px" BackColor="FloralWhite" BorderColor="Navy"
AutoGenerateColumns="False" Font-Size="8pt" Font-Names="Verdana">
<HeaderStyle Font-Size="10pt" Font-Names="Verdana" Font-Bold="True"
ForeColor="SteelBlue" BorderColor="White"
BackColor="Azure"></HeaderStyle>
<Columns>
<asp:TemplateColumn></asp:TemplateColumn>
<asp:BoundColumn DataField="Objeto"
HeaderText="Objeto"></asp:BoundColumn>
<asp:BoundColumn DataField="Descripcion"
HeaderText="Descripción"></asp:BoundColumn>
<asp:BoundColumn Visible="False" DataField="Index"
HeaderText="Index"></asp:BoundColumn>
</Columns>
</asp:datagrid>
</DIV>
//----------------------------------------------------------------------
// THIS IS THE CODE OF THE BUTTON THAT INSERTS NEW ROWS
//----------------------------------------------------------------------
Private Sub bAddTxt_Click(ByVal sender As System.Object, ByVal e As
System.Web.UI.ImageClickEventArgs) Handles bAddTxt.Click

If Me.txtAnomTxtLibre.Text <> "" Then
AgregarAnomTxtLibre(Me.txtAnomTxtLibre.Text)
Me.txtAnomTxtLibre.Text = ""
RellenarTablas()
End If

End Sub

//----------------------------------------------------------------------
// THIS IS THE CODE THAT USE A COMPONENT TO UPDATE/INSERT ROWS IN THE
// DATABASE
//----------------------------------------------------------------------
Public Sub AgregarAnomTxtLibre(ByVal txt As String)

SETSI_XFolder = New SETSI_Folders.SETSI_XFolders.SETSI_XFolder()
FolderBase = New IDESFOLDERLib.FdrClass()
XFolder = New IDESXLib.iDesX_XFolderClass()
XFolder = FolderBase.XNew(SessionPId, ArchAnomPId)
XFolder.SetFieldValue(SETSI_FLDID_ANOM_IDEXP, IdExp)
XFolder.SetFieldValue(SETSI_FLDID_ANOM_IDOBJ, IdObj)
If IdTipoObj = 0 Then
XFolder.SetFieldValue(SETSI_FLDID_ANOM_IDTIPOBJ, "Expediente")
Else
XFolder.SetFieldValue(SETSI_FLDID_ANOM_IDTIPOBJ,
ObjFunciones.DescripcionTipObj(IdTipoObj))
End If
XFolder.SetFieldValue(SETSI_FLDID_ANOM_SUBSAN, "N")
XFolder.SetFieldValue(SETSI_FLDID_ANOM_TEXTO, txt)
SETSI_XFolder.XFolder = XFolder
SETSI_XFolder.Flags = 0
SETSI_XFolders.Add(SETSI_XFolder)
SETSI_XFolder = Nothing
XFolder = Nothing
FolderBase = Nothing

End Sub
//----------------------------------------------------------------------
// THIS IS THE SUB THAT INITIALIZES THE DATATABLE OBJECT
//----------------------------------------------------------------------
Public Sub RellenarTablas()
Dim table As New DataTable()
Dim col As New DataColumn()
Dim row As DataRow
Dim txt As String
Dim objTxt As String
Dim chk As System.Web.UI.WebControls.CheckBox
Dim i As Integer
Dim TipoObjeto As Object
Dim IdTipoObjeto As Object
Dim IdObjeto As Object
Dim IdTipoAnomalia As Object
Dim TextoAnomalia As Object
Dim Subsanada As Object

col.ColumnName = "Objeto"
table.Columns.Add(col)
col = New DataColumn()
col.ColumnName = "Descripcion"
table.Columns.Add(col)
col = New DataColumn()
col.ColumnName = "Subsanada"
table.Columns.Add(col)
col = New DataColumn()
col.ColumnName = "Index"
table.Columns.Add(col)

For i = 0 To SETSI_XFolders.GetCount - 1
SETSI_XFolder = New
SETSI_Folders.SETSI_XFolders.SETSI_XFolder()
XFolder = New IDESXLib.iDesX_XFolderClass()
SETSI_XFolder = SETSI_XFolders.GetItem(i)
If SETSI_XFolder.Flags = 0 Or SETSI_XFolder.Flags = 2 Then
XFolder = SETSI_XFolder.XFolder
objTxt = XFolder.GetFieldValue(SETSI_FLDID_ANOM_IDTIPOBJ)
IdTipoObjeto = ObjFunciones.GetIdTipObj(CStr(objTxt))
IdObjeto = XFolder.GetFieldValue(SETSI_FLDID_ANOM_IDOBJ)
IdTipoAnomalia =
XFolder.GetFieldValue(SETSI_FLDID_ANOM_IDTIPOANOM)
TextoAnomalia =
XFolder.GetFieldValue(SETSI_FLDID_ANOM_TEXTO)
Subsanada = XFolder.GetFieldValue(SETSI_FLDID_ANOM_SUBSAN)
If IdTipoObjeto > 1 And IdTipoObj <> 4 Then
' Equipos o titulados
objTxt = objTxt & " - " &
ObjFunciones.DescripcionObj(ObjSession, SessionPId, IdTipoObjeto,
IdObjeto)
End If

If IsDBNull(IdTipoAnomalia) Then
txt = TextoAnomalia
Else
If IdTipoAnomalia = 0 Then
txt = TextoAnomalia
Else
RS = ObjSession.XDBSelect(SessionPId, "A" &
SETSI_ARCHID_TIPOS_ANOM & "SF", "FLD" & SETSI_FLDID_TIPOS_ANOM_VALOR,
"WHERE FDRID = " & IdTipoAnomalia, Found)
If Not RS Is Nothing And Found Then
RS.Item(1, txt)
End If
RS = Nothing
End If
End If
row = table.NewRow()
row.Item(0) = objTxt
row.Item(1) = txt
row.Item(2) = Subsanada
row.Item(3) = i

table.Rows.Add(row)
XFolder = Nothing
SETSI_XFolder = Nothing
End If
Next
CrearVistas(table)
AgregarCheckboxes()
DeshabilitarAutom()
End Sub

//----------------------------------------------------------------------
// THIS SUB BUILDS THE DATAVIEW ON THE DATATABLE OBJECT
//----------------------------------------------------------------------
Public Sub CrearVistas(ByVal table As DataTable)
Dim dv As DataView
If IdTipoObj > 1 Then
' Equipos y Titulados:
Me.gridPdtes.Columns(1).Visible = False
Me.gridSubs.Columns(1).Visible = False
End If
dv = New DataView(table, "Subsanada='N'", "",
DataViewRowState.CurrentRows)
Me.gridPdtes.DataSource = dv
Me.gridPdtes.DataBind()
dv = New DataView(table, "Subsanada='S'", "",
DataViewRowState.CurrentRows)
Me.gridSubs.DataSource = dv
Me.gridSubs.DataBind()
End Sub

//----------------------------------------------------------------------
// THIS SUB INSERT CHECKBOXES IN THE DATAGRID
//----------------------------------------------------------------------
Public Sub AgregarCheckboxes()
Dim i As Int16
Dim chk As System.Web.UI.WebControls.CheckBox

For i = 0 To Me.gridPdtes.Items.Count - 1
chk = New System.Web.UI.WebControls.CheckBox()
Me.gridPdtes.Items.Item(i).Cells(0).Controls.Add(c hk)
Next
For i = 0 To Me.gridSubs.Items.Count - 1
chk = New System.Web.UI.WebControls.CheckBox()
Me.gridSubs.Items.Item(i).Cells(0).Controls.Add(ch k)
Next
End Sub
//----------------------------------------------------------------------
// THIS SUB PUTS SOME CONTROLS DISABLED
//----------------------------------------------------------------------
Private Sub DeshabilitarAutom()
Dim m_Item As System.Web.UI.WebControls.DataGridItem
Dim Tipo As String
Dim Color As System.Drawing.Color
Color = Color.FromName("Snow")
For Each m_Item In Me.gridPdtes.Items
Tipo = m_Item.Cells(1).Text
If Tipo = "Automática" Then
m_Item.Enabled = False
'm_Item.BackColor = Color
End If
Next
End Sub

Nov 18 '05 #9

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

Similar topics

1
by: Nicolas LeBlanc | last post by:
First of all, I'd like to state that I would like to have SmartNavigation enabled on my site due to some massive work on the UI do to nice things that works a lot better if the scroll position is...
4
by: Chris Ruegsegger | last post by:
I have a registration type page that asks a series of questions but does so using Panels to display only a couple at a time. I have a Next and Back button on each panel for navigation purposes. ...
7
by: Matthew Wieder | last post by:
Hi - I have a datagrid that has a black header and the rows alternate white and gray. The problem is that until items are added to the grid, the grid appears as a large black rectangle, which is...
0
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 with smartnavigation enabled. In this webpage I have a button that...
2
by: amiringo | last post by:
I have two problems after set this page directive... First, when I run the web application in my side(installed VS.NET) the page include that directive, it will redirect to the following address....
0
by: Jim Fisher | last post by:
"Skeptical" wrote concerning SmartNavigation: > > Thanks a lot that is exactly what I have been looking for. It works in a > > standard row selecting case but somehow fails when I open > >...
3
by: Rudy Ko | last post by:
Hi, I have a long site with SmartNavigation on. It works on my developing machine. When I published to server, it doesn't work on any machine. What do I miss? Anybody know? Thank you for any...
3
by: Ashhad Syed | last post by:
I have turned on smartnavigation=True for some of the forms in my .NET application. It seemed to be working fine on Windows 2000 SP4, which also has VS 2003 installted, but when I moved the...
1
by: danyeungw | last post by:
I get the following from the link http://support.microsoft.com/kb/314206. I need to have both work - the page stays where it is and set focus to next control. Does anyone have solution? I have...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.