Home Search Member List Faq Register Login  
UltimateAjax
UltimateAjax nested within UltimateTabstrip tab.

Thread Starter: Jamie   Started: 12-17-2008 4:18 PM   Replies: 8
 Karamasoft Support Forums » General Discussions » UltimateAjax » UltimateAjax nested within UltimateTabstrip tab.
 Printable Version    « Previous Thread   Next Thread »
  17 Dec 2008, 4:18 PM
Jamie is not online. Last active: 9/25/2014 8:24:54 AM Jamie

Top 10 Posts
Joined on 08-07-2008
Posts 28
UltimateAjax nested within UltimateTabstrip tab.
Do you have an example or can you explain how to add callback event to an ultimateajax object when it is nested inside an ultimatetabstrip content template?
  
  17 Dec 2008, 4:51 PM
Karamasoft is not online. Last active: 5/8/2018 10:36:45 AM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,820
Re: UltimateAjax nested within UltimateTabstrip tab.
We have an integration sample at http://www.karamasoft.com/Samples.aspx?component=UltimateAjax&sample=AjaxTabstrip to show how you can integrate the UltimateAjax control with UltimateTabstrip control. In that sample, the UltimateAjax control is placed outside the UltimateTabstrip control but it loads the content of the tabstrip using callbacks. However, if you place your UltimateAjax control inside the content template of your UltimateTabstrip control, you might need to manually set the OnCallback event handler for your UltimateAjax control and add the Callback event handler in your page code-behind manually.
  
  17 Dec 2008, 8:20 PM
Jamie is not online. Last active: 9/25/2014 8:24:54 AM Jamie

Top 10 Posts
Joined on 08-07-2008
Posts 28
Re: UltimateAjax nested within UltimateTabstrip tab.
I looked at the example and looked at the help file. My situation is that the ultimateajax control will be within the content template within the ultimate tabstrip. I can find the control on load, but I'm uncertain on how to add callback event handler in the code behind. I have wired up the ultimateajax control and wrote the event, I just need to tie the ultimateajax control event to the event that is already written.
  
  17 Dec 2008, 8:37 PM
Jamie is not online. Last active: 9/25/2014 8:24:54 AM Jamie

Top 10 Posts
Joined on 08-07-2008
Posts 28
Re: UltimateAjax nested within UltimateTabstrip tab.
Found some information. I had a problem converting c# to vb, but found some information on MSDN, but still have issues to resolve.

Dim ua As Karamasoft.WebControls.UltimateAjax.UltimateAjax = uts.FindControl("uai")

AddHandler ua.Callback, AddressOf uai_Callback


  
  17 Dec 2008, 11:31 PM
Karamasoft is not online. Last active: 5/8/2018 10:36:45 AM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,820
Re: UltimateAjax nested within UltimateTabstrip tab.
Could you please explain what exactly the issue is after adding the event handler? You can reply with your code so that we can try it in our test environment. Thanks.
  
  18 Dec 2008, 7:33 AM
Jamie is not online. Last active: 9/25/2014 8:24:54 AM Jamie

Top 10 Posts
Joined on 08-07-2008
Posts 28
Re: UltimateAjax nested within UltimateTabstrip tab.
Overview: Page has a drop down list with onchange attribute added. If the drop down list value equals "Regular" I need to make certain objects within ultimateajax container either visible/invisible or enabled/disabled. Putting a break point at the callback event and it never fires. I can work around this and eliminate the use of ultimateajax by adding another tab to the collection. (plan b)

VS 2008 / .NET 3.5

Error states: uab0 is null or not an object.


Parts of page code:

<script type="text/javascript" language="javascript">

function Update(arg)

{

DoUltimateCallback('ctl00_ContentPlaceHolder1_ct100_uai', arg);

}

</script>

<kswc:Tab HeaderText="Time Entries" ID="utst0">

<ContentTemplate>

<div style="text-align:left">


<table>

<tr>

<td></td>

<td>

<asp:Label ID="lblDate" runat="server" CssClass="lbl" Text="Date:"></asp:Label>

</td>

<td>

<asp:TextBox ID="txtDate" runat="server" CssClass="txt" ReadOnly="True"

Width="85px"></asp:TextBox>

</td>

</tr>

<tr>

<td></td>

<td>

<asp:Label ID="lblType" runat="server" CssClass="lbl" Text="Pay Type:"></asp:Label>

</td>

<td>

<asp:DropDownList ID="ddlType" runat="server" CssClass="txt">

<asp:ListItem>Regular</asp:ListItem>

<asp:ListItem>Vacation</asp:ListItem>

<asp:ListItem>Holiday</asp:ListItem>

<asp:ListItem>Funeral</asp:ListItem>

<asp:ListItem>Jury Duty</asp:ListItem>

<asp:ListItem>Injury</asp:ListItem>

</asp:DropDownList>

</td>

</tr>


<cc1:UltimateAjax ID="uai" runat="server" OnCallback="uai_Callback">

<tr>

<td></td>

<td>

<asp:Label ID="lblTimeIn" runat="server" CssClass="lbl" Text="Time In:"></asp:Label>

</td>

<td>

<table>

<tr>

<td>

<asp:DropDownList ID="ddlHour" runat="server" CssClass="txt">

<asp:ListItem>1</asp:ListItem>

<asp:ListItem>2</asp:ListItem>

<asp:ListItem>3</asp:ListItem>

<asp:ListItem>4</asp:ListItem>

<asp:ListItem>5</asp:ListItem>

<asp:ListItem>6</asp:ListItem>

<asp:ListItem>7</asp:ListItem>

<asp:ListItem>8</asp:ListItem>

<asp:ListItem>9</asp:ListItem>

<asp:ListItem>10</asp:ListItem>

<asp:ListItem>11</asp:ListItem>

<asp:ListItem>12</asp:ListItem>

</asp:DropDownList>

</td>

<td>

<asp:DropDownList ID="ddlMinutes" runat="server" CssClass="txt">

<asp:ListItem>00</asp:ListItem>

<asp:ListItem>15</asp:ListItem>

<asp:ListItem>30</asp:ListItem>

<asp:ListItem>45</asp:ListItem>

</asp:DropDownList>

</td>

<td>

<asp:DropDownList ID="ddlAMPM" runat="server" CssClass="txt">

<asp:ListItem>AM</asp:ListItem>

<asp:ListItem>PM</asp:ListItem>

</asp:DropDownList>

</td>

</tr>

</table>

</td>

</tr>

</cc1:UltimateAjax>


Parts of code behind:

Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init

Dim ua As Karamasoft.WebControls.UltimateAjax.UltimateAjax = uts.FindControl("uai")

AddHandler ua.Callback, AddressOf uai_Callback

End Sub

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

If Page.IsPostBack = False Then

setDays(getStartDate())

Dim ddl As DropDownList = uts.FindControl("ddlType")

ddl.Items.Insert(0, New ListItem(" - Select a Pay Type - ", ""))

ddl.Attributes.Add("onchange", "Update('Type');")

ddl = uts.FindControl("ddlHour")

ddl.Items.Insert(0, New ListItem(" - Hour - ", ""))

ddl = uts.FindControl("ddlMinutes")

ddl.Items.Insert(0, New ListItem(" - Minutes - ", ""))

ddl = uts.FindControl("ddlAMPM")

ddl.Items.Insert(0, New ListItem(" - AM/PM - ", ""))

ddl = uts.FindControl("ddlHourOut")

ddl.Items.Insert(0, New ListItem(" - Hour - ", ""))

ddl = uts.FindControl("ddlMinutesOut")

ddl.Items.Insert(0, New ListItem(" - Minutes - ", ""))

ddl = uts.FindControl("ddlAMPMOut")

ddl.Items.Insert(0, New ListItem(" - AM/PM - ", ""))

End If

lblError.Text = ""

End Sub


Protected Sub uai_Callback(ByVal sender As Object, ByVal e As Karamasoft.WebControls.UltimateAjax.CallbackEventArgs)

Select Case (e.Argument)

Case "Type"

Dim ddl As DropDownList = uts.FindControl("ddlType")

Dim lbl As Label = uts.FindControl("lblTimeIn")

If ddl.SelectedValue = "Regular" Then

lbl.Visible = True

Else

lbl.Visible = False

End If

End Select

End Sub





  
  18 Dec 2008, 12:34 PM
Karamasoft is not online. Last active: 5/8/2018 10:36:45 AM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,820
Re: UltimateAjax nested within UltimateTabstrip tab.
You should replace your as Update client-side method follows:

function Update(arg)
{
DoUltimateCallback('<%=uts.FindControl("uai").ClientID%>', arg);
}

  
  18 Dec 2008, 6:06 PM
Jamie is not online. Last active: 9/25/2014 8:24:54 AM Jamie

Top 10 Posts
Joined on 08-07-2008
Posts 28
Re: UltimateAjax nested within UltimateTabstrip tab.
Thanks for the information. I tested and event now fires, but an error still occurs. The error states unknown runtime error. I needed to move forward on the project, so I page got redesigned using tab strips and I ran into a problem with those as well.
  
  18 Dec 2008, 6:23 PM
Karamasoft is not online. Last active: 5/8/2018 10:36:45 AM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,820
Re: UltimateAjax nested within UltimateTabstrip tab.
We don't know what might be causing the unkown runtime error without seeing your app. If you send us a self-contained web app that we can try in our test environment without any modifications, we can help you better.
  
 Page 1 of 1 (9 items)
Karamasoft Support Forums » General Discussions » UltimateAjax » UltimateAjax nested within UltimateTabstrip tab.

You can add attachments
You can post new topics
You can reply to topics
You can delete your posts
You can edit your posts
You can create polls
You can vote in polls
Forum statistics are enabled
Forum is unmoderated

© 2002-2018 Karamasoft LLC. All rights reserved.