
I have a listbox on a user control that serves as an edit control for a radgrid that is on another user control.
Everything executes without error but when the listbox displays it has nothing selected.
Here is the aspx and code behind.
private void UsersControlEditSCS_DataBinding(object sender, System.EventArgs e)
{
listSCS.DataBind();
listSCS.Items[i].Selected = true;
listSCS.Items[0].Selected = true;
listSCS.Items[1].Selected = true;
listSCS.Items[2].Selected = true;
}
}
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UsersControlEditSCS.ascx.cs" Inherits="BalancedFlow.WebSite3._5.Controls.UsersControlEditSCS" %>
<table id="Table2" cellspacing="2" cellpadding="1" width="100%" border="1" rules="none"
style="border-collapse: collapse">
<tr>
<td colspan="2">
<b>Link to SCS</b></td>
</tr>
<tr>
<td colspan="2">
(Select one, or more with CTRL key)</td>
</tr>
<tr>
<td>
<table id="Table3" cellspacing="1" cellpadding="1" width="100%" border="0">
</table>
</td>
<td>
<table id="Table1" cellspacing="1" cellpadding="1" width="300" border="0">
<tr>
<td>
</td>
</tr>
<tr>
<td>
<asp:ListBox ID="listSCS" runat="server" SelectionMode="Multiple" DataTextField="SCS_Name"
DataValueField="SCS_ID" Width="325px"></asp:ListBox>
</td>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
</td>
</tr>
<tr>
The code executes, but the Tab Strip never changes... I'm not sure what to do to change it.
Here is the code that I execute in the ItemCommand event:
switch (e.CommandName)
{
case "cmdShowRelations":
strUniqueID = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex][
"uid"].ToString();
Telerik.Web.UI.
RadTabStrip rts = Parent.FindControl("RadTabStrip1") as RadTabStrip;
RadMultiPage mp = Parent.FindControl("mpPersonsSearch") as RadMultiPage;
ctlFindRelatedPersons frp = Parent.FindControl( "ctlFindRelated" ) as ctlFindRelatedPersons;
frp.LoadRelatedPerson(strUniqueID);
rts.FindTabByText(
"Related").Selected = true;
mp.SelectedIndex = rts.SelectedTab.Index;
break;
}
GridRadToolTipManager.TargetControls.Add(e.Item.ClientID, client.Id.ToString(),
true);
However, the OnAjaxUpdate does not get called. Though when I remove the ajaxmanager all works fine.
Does anyone have any ideas on this?
Andrew