Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > SmartNavigation Datagrid problem in Windows 2003 Server

Reply
Thread Tools

SmartNavigation Datagrid problem in Windows 2003 Server

 
 
Inigo Jimenez
Guest
Posts: n/a
 
      11-28-2003
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.)


 
Reply With Quote
 
 
 
 
Alvin Bruney
Guest
Posts: n/a
 
      11-28-2003
Have you tried turning smart navigation off?

--
Regards,
Alvin Bruney
Got Tidbits? Get it here
www.networkip.net/tidbits
"Inigo Jimenez" <> wrote in message
news:...
> 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.)
>
>



 
Reply With Quote
 
 
 
 
Inigo Jimenez
Guest
Posts: n/a
 
      11-29-2003
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" <> escribió en el mensaje
news:...
> Have you tried turning smart navigation off?
>
> --
> Regards,
> Alvin Bruney
> Got Tidbits? Get it here
> www.networkip.net/tidbits
> "Inigo Jimenez" <> wrote in message
> news:...
> > 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.)
> >
> >

>
>



 
Reply With Quote
 
Inigo Jimenez
Guest
Posts: n/a
 
      11-29-2003
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" <> escribió en el mensaje
news:...
> Have you tried turning smart navigation off?
>
> --
> Regards,
> Alvin Bruney
> Got Tidbits? Get it here
> www.networkip.net/tidbits
> "Inigo Jimenez" <> wrote in message
> news:...
> > 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.)
> >
> >

>
>



 
Reply With Quote
 
Inigo Jimenez
Guest
Posts: n/a
 
      11-29-2003
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" <> escribió en el mensaje
news:...
> Have you tried turning smart navigation off?
>
> --
> Regards,
> Alvin Bruney
> Got Tidbits? Get it here
> www.networkip.net/tidbits
> "Inigo Jimenez" <> wrote in message
> news:...
> > 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.)
> >
> >

>
>



 
Reply With Quote
 
Alvin Bruney
Guest
Posts: n/a
 
      11-29-2003
> > 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" <> wrote in message
news:%...
> 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" <> escribió en el mensaje
> news:...
> > Have you tried turning smart navigation off?
> >
> > --
> > Regards,
> > Alvin Bruney
> > Got Tidbits? Get it here
> > www.networkip.net/tidbits
> > "Inigo Jimenez" <> wrote in message
> > news:...
> > > 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.)
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Inigo Jimenez
Guest
Posts: n/a
 
      11-29-2003
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" <> escribió en el mensaje
news:uFc2$...
> > > 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" <> wrote in message
> news:%...
> > 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" <> escribió en el mensaje
> > news:...
> > > Have you tried turning smart navigation off?
> > >
> > > --
> > > Regards,
> > > Alvin Bruney
> > > Got Tidbits? Get it here
> > > www.networkip.net/tidbits
> > > "Inigo Jimenez" <> wrote in message
> > > news:...
> > > > 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.)
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Inigo Jimenez
Guest
Posts: n/a
 
      12-01-2003
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
 
Reply With Quote
 
Alvin Bruney
Guest
Posts: n/a
 
      12-06-2003
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" <> wrote in message
news: 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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
datagrid paging problem IIS windows 2003 server Manuel Alves ASP .Net 4 04-05-2006 09:37 AM
Windows server SBS cost less then Windows Server 2003 Steve Benson Computer Support 4 08-26-2005 05:29 PM
Windows 2003 Server or Exchange Server 2003 first????? Ozzie MCSA 1 11-30-2004 01:10 AM
SmartNavigation Datagrid problem in Windows 2003 Server Inigo Jimenez ASP .Net 7 12-01-2003 10:19 AM
Problems with datagrid smartnavigation and Windows 2003 server. Inigo Jimenez ASP .Net 0 11-28-2003 04:47 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57