Login  
Search All Forums
Dart Home | PowerWEB LiveControls for ASP.NET | Custom Development Reply | PowerWEB LiveControls for ASP.NET Topics | Forums   
AuthorForum: PowerWEB LiveControls for ASP.NET
Topic: Is this a bug ?
oliver0303

From: Hjørring, Denmark
Posts: 58
Member Since: 04/15/05
posted May 17, 2005 2:46 PM

Why is it not possible to enable radiobuttons on call-back ? Disabled at designtime, and then enable them at call-back.

Looking forward to a quick respons.
/Oliver

<%@ Register TagPrefix="cc1" Namespace="Dart.PowerWEB.LiveControls" Assembly="Dart.PowerWEB.LiveControls" %>
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="SafeTrack.Manager.WebForm1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<cc1:LiveRadioButton id="LiveRadioButton1" style="Z-INDEX: 101; LEFT: 152px; POSITION: absolute; TOP: 432px"
runat="server" GroupName="test" Enabled="False"></cc1:LiveRadioButton>
<cc1:LiveRadioButton id="LiveRadioButton2" style="Z-INDEX: 102; LEFT: 216px; POSITION: absolute; TOP: 504px"
runat="server" GroupName="test" Enabled="False"></cc1:LiveRadioButton>
<cc1:LiveButton id="LiveButton1" style="Z-INDEX: 103; LEFT: 104px; POSITION: absolute; TOP: 576px"
runat="server"></cc1:LiveButton>
</form>
</body>
</HTML>

Public Class WebForm1
  Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

  'This call is required by the Web Form Designer.
  <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

  End Sub
  Protected WithEvents LiveRadioButton1 As Dart.PowerWEB.LiveControls.LiveRadioButton
  Protected WithEvents LiveRadioButton2 As Dart.PowerWEB.LiveControls.LiveRadioButton
  Protected WithEvents LiveButton1 As Dart.PowerWEB.LiveControls.LiveButton

  'NOTE: The following placeholder declaration is required by the Web Form Designer.
  'Do not delete or move it.
  Private designerPlaceholderDeclaration As System.Object

  Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
    'CODEGEN: This method call is required by the Web Form Designer
    'Do not modify it using the code editor.
    InitializeComponent()
  End Sub

#End Region

  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
  End Sub

  Private Sub LiveButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LiveButton1.Click
    LiveRadioButton1.Enabled = True
    LiveRadioButton2.Enabled = True
  End Sub
End Class
Jeff Cranford



From: Rome, NY USA
Posts: 586
Member Since: 05/30/01
posted May 18, 2005 9:43 AM

Yep, looks like a bug. I've added this to our bug database as issue #3174.

In the meantime, you can work around this by adding a bit of custom JavaScript.

// To enable LiveRadioButton, set Enabled to true, AND add the following JavaScript to BufferedScript
LiveRadioButton1.Enabled = true;
LiveRadioButton1.BufferedScript.Write("pwObj('LiveRadioButton1').disabled = false;");
Reply | PowerWEB LiveControls for ASP.NET Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX