|
 |
aspx_beginners thread: SV: Re: SV: need to double click twice before something happen
Message #1 by "Jan Arve Dyrnes" <jan.arve@c...> on Thu, 27 Jun 2002 21:55:00 +0200
|
|
Hi again,
Could you give me the code in the function: private void Page_Load()
I guess it's something there that makes you hit the button twice.
jana
-----Opprinnelig melding-----
Fra: liej@c... [mailto:liej@c...]
Sendt: 27. juni 2002 20:05
Til: aspx_beginners
Emne: [aspx_beginners] Re: SV: need to double click twice before
something happen
Hi Jana,
doesn't seems to work.
In the same page, i got the almost same thing, but it's bounded to another
DB and it works fine with the same functionality.
any idea?
> Hi,
look for somthing like (!postback)
jana
-----Opprinnelig melding-----
Fra: liej@c... [mailto:liej@c...]
Sendt: 27. juni 2002 19:14
Til: aspx_beginners
Emne: [aspx_beginners] need to double click twice before something
happen
Hi guys..,
basically i follow the example on the Beginning ASP.net on ASP.net server
controls section.
I am trying to do in Place editing.
But when i clicked edit, the label suppose to become a textbox, but that's
not the case.
i have to click twice before the label become textbox to edit.
here is my code...
Public Sub UnitCommentEdit(ByVal source As Object, ByVal etest As
DataGridCommandEventArgs)
UnitComm.EditItemIndex = etest.Item.ItemIndex
loadUnitComment(GuideID, UnitID)
End Sub
<asp:TemplateColumn
HeaderText="Action">
<ItemTemplate>
<asp:LinkButton
CommandName="Delete" Text="Delete" Runat="server"
ID="Linkbutton7"></asp:LinkButton>
<asp:LinkButton
CommandName="Edit" Text="Edit" Runat="server"
ID="Linkbutton9"></asp:LinkButton>
</ItemTemplate>
<EditItemTemplate>
<asp:LinkButton
CommandName="Cancel" Text="cancel" Runat="server"
ID="Linkbutton5"></asp:LinkButton>
<asp:LinkButton
CommandName="Update" Text="Save" Runat="server"
ID="Linkbutton6"></asp:LinkButton>
</EditItemTemplate>
</asp:TemplateColumn>
any help will be appreciated.
thanks...
Message #2 by liej@c... on Thu, 27 Jun 2002 21:34:53
|
|
Hi again..,
thanks for the quick reply..
here is the code on Page_load()
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
If Not Page.IsPostBack Then
Dim UID As Integer = Request.QueryString("UID")
Dim UnitID As Integer = Request.QueryString
("UnitID") Dim sqlSelectUnit As String
addNewCommentBtn.Visible = False
Dim latestID As Integer = getPublishGuideID()
Dim sqlUnitC As String = "SELECT GuideID, UnitID, UnitComment,
DateModified, CommentID from tblUnitComment WHERE DateExpired is NULL AND
GuideID=" & latestID & " AND UnitID=" & UnitID
Dim sqlUnit As String = "Select UnitName, UnitID from
tblUnit order by UnitName"
If UnitID <> 0 Then
UnitComm.Visible = True
UnitComment.Visible = True
CSubmit.Visible = False
addNewCommentBtn.Visible = True
connToDB(sqlUnitC, UnitComm)
connToDB(sqlUnit, UnitComment)
'UnitName2.Text = getUnitName(UnitID)
End If
connToDB(sqlUnit, Unit)
If UID = 0 Then
'UnitComp.Visible = False
Else
UnitName.Text = getUnitName(UID)
sqlSelectUnit = "SELECT tblFields.FieldID,
tblFields.FieldName, tblTargetComment.Target, tblTargetComment.TargetDate,
tblTargetComment.Comment, tblTargetComment.CommentDate FROM tblFields,
tblTargetComment, tblGeneral WHERE tblFields.FieldID =
tblTargetComment.FieldID AND tblTargetComment.GuideID=tblGeneral.GuideID
AND tblGeneral.cPublish=true AND tblFields.UnitID=" & UID
sqlSelectUnit += " AND tblGeneral.GuideID=" & latestID
connToDB(sqlSelectUnit, UnitComp)
End If
End If
End Sub
thanks for your help.
> Hi again,
Could you give me the code in the function: private void Page_Load()
I guess it's something there that makes you hit the button twice.
jana
-----Opprinnelig melding-----
Fra: liej@c... [mailto:liej@c...]
Sendt: 27. juni 2002 20:05
Til: aspx_beginners
Emne: [aspx_beginners] Re: SV: need to double click twice before
something happen
Hi Jana,
doesn't seems to work.
In the same page, i got the almost same thing, but it's bounded to another
DB and it works fine with the same functionality.
any idea?
> Hi,
look for somthing like (!postback)
jana
-----Opprinnelig melding-----
Fra: liej@c... [mailto:liej@c...]
Sendt: 27. juni 2002 19:14
Til: aspx_beginners
Emne: [aspx_beginners] need to double click twice before something
happen
Hi guys..,
basically i follow the example on the Beginning ASP.net on ASP.net server
controls section.
I am trying to do in Place editing.
But when i clicked edit, the label suppose to become a textbox, but that's
not the case.
i have to click twice before the label become textbox to edit.
here is my code...
Public Sub UnitCommentEdit(ByVal source As Object, ByVal etest As
DataGridCommandEventArgs)
UnitComm.EditItemIndex = etest.Item.ItemIndex
loadUnitComment(GuideID, UnitID)
End Sub
<asp:TemplateColumn
HeaderText="Action">
<ItemTemplate>
<asp:LinkButton
CommandName="Delete" Text="Delete" Runat="server"
ID="Linkbutton7"></asp:LinkButton>
<asp:LinkButton
CommandName="Edit" Text="Edit" Runat="server"
ID="Linkbutton9"></asp:LinkButton>
</ItemTemplate>
<EditItemTemplate>
<asp:LinkButton
CommandName="Cancel" Text="cancel" Runat="server"
ID="Linkbutton5"></asp:LinkButton>
<asp:LinkButton
CommandName="Update" Text="Save" Runat="server"
ID="Linkbutton6"></asp:LinkButton>
</EditItemTemplate>
</asp:TemplateColumn>
any help will be appreciated.
thanks...
Message #3 by liej@c... on Thu, 27 Jun 2002 22:03:00
|
|
Hi again..,
I found what is wrong...
my function loadUnitComment doesn't bound the datagrid properly..
thanks jana and elissa....
Jun
Hi again..,
thanks for the quick reply..
here is the code on Page_load()
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
If Not Page.IsPostBack Then
Dim UID As Integer = Request.QueryString("UID")
Dim UnitID As Integer = Request.QueryString
("UnitID") Dim sqlSelectUnit As String
addNewCommentBtn.Visible = False
Dim latestID As Integer = getPublishGuideID()
Dim sqlUnitC As String = "SELECT GuideID, UnitID, UnitComment,
DateModified, CommentID from tblUnitComment WHERE DateExpired is NULL AND
GuideID=" & latestID & " AND UnitID=" & UnitID
Dim sqlUnit As String = "Select UnitName, UnitID from
tblUnit order by UnitName"
If UnitID <> 0 Then
UnitComm.Visible = True
UnitComment.Visible = True
CSubmit.Visible = False
addNewCommentBtn.Visible = True
connToDB(sqlUnitC, UnitComm)
connToDB(sqlUnit, UnitComment)
'UnitName2.Text = getUnitName(UnitID)
End If
connToDB(sqlUnit, Unit)
If UID = 0 Then
'UnitComp.Visible = False
Else
UnitName.Text = getUnitName(UID)
sqlSelectUnit = "SELECT tblFields.FieldID,
tblFields.FieldName, tblTargetComment.Target, tblTargetComment.TargetDate,
tblTargetComment.Comment, tblTargetComment.CommentDate FROM tblFields,
tblTargetComment, tblGeneral WHERE tblFields.FieldID =
tblTargetComment.FieldID AND tblTargetComment.GuideID=tblGeneral.GuideID
AND tblGeneral.cPublish=true AND tblFields.UnitID=" & UID
sqlSelectUnit += " AND tblGeneral.GuideID=" & latestID
connToDB(sqlSelectUnit, UnitComp)
End If
End If
End Sub
thanks for your help.
> Hi again,
Could you give me the code in the function: private void Page_Load()
I guess it's something there that makes you hit the button twice.
jana
-----Opprinnelig melding-----
Fra: liej@c... [mailto:liej@c...]
Sendt: 27. juni 2002 20:05
Til: aspx_beginners
Emne: [aspx_beginners] Re: SV: need to double click twice before
something happen
Hi Jana,
doesn't seems to work.
In the same page, i got the almost same thing, but it's bounded to another
DB and it works fine with the same functionality.
any idea?
> Hi,
look for somthing like (!postback)
jana
-----Opprinnelig melding-----
Fra: liej@c... [mailto:liej@c...]
Sendt: 27. juni 2002 19:14
Til: aspx_beginners
Emne: [aspx_beginners] need to double click twice before something
happen
Hi guys..,
basically i follow the example on the Beginning ASP.net on ASP.net server
controls section.
I am trying to do in Place editing.
But when i clicked edit, the label suppose to become a textbox, but that's
not the case.
i have to click twice before the label become textbox to edit.
here is my code...
Public Sub UnitCommentEdit(ByVal source As Object, ByVal etest As
DataGridCommandEventArgs)
UnitComm.EditItemIndex = etest.Item.ItemIndex
loadUnitComment(GuideID, UnitID)
End Sub
<asp:TemplateColumn
HeaderText="Action">
<ItemTemplate>
<asp:LinkButton
CommandName="Delete" Text="Delete" Runat="server"
ID="Linkbutton7"></asp:LinkButton>
<asp:LinkButton
CommandName="Edit" Text="Edit" Runat="server"
ID="Linkbutton9"></asp:LinkButton>
</ItemTemplate>
<EditItemTemplate>
<asp:LinkButton
CommandName="Cancel" Text="cancel" Runat="server"
ID="Linkbutton5"></asp:LinkButton>
<asp:LinkButton
CommandName="Update" Text="Save" Runat="server"
ID="Linkbutton6"></asp:LinkButton>
</EditItemTemplate>
</asp:TemplateColumn>
any help will be appreciated.
thanks...
|
|
 |