| <telerik:RadFormDecorator ID="FormDecorator1" runat="server" DecoratedControls="All" |
| Skin="WebBlue"></telerik:RadFormDecorator> |
| <...........> |
| <asp:TextBox ID="UserName" TabIndex="1" runat="server" CssClass="classTbxCourriel" ValidationGroup="login"></asp:TextBox> |
| <...........> |
| <asp:Button UseSubmitBehavior="false" TabIndex="3" ID="LoginButton" ValidationGroup="login" runat="server" CommandName="Login" |
| Width="120px" Text="<%$ Resources:Labels, LoginLoginButton %>" /> |
<%
@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %>
<%
@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml" >
<
head id="Head1" runat="server">
<!-- custom head section -->
<link href="Styles.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.RadGrid th input
{
margin-top:0;
margin-bottom:0;
height:12px;
}
.OutlookTopBar
{
background-image: url(Img/outlookBarTop.gif);
background-color: white;
background-repeat: repeat-x;
padding-top: 3px;
border: 1px solid #002D96;
width: 180px;
font-size: 11px;
padding-left: 4px;
}
.OutlookTable
{
background-color:#c4dafa;
margin-top:4px;
}
.MailSubject
{
color: #808080;
}
.SelectedRow_Outlook
.MailSubject
{
color: white;
}
</style>
<!-- end of custom head section -->
</
head>
<
body class="BODY">
<form runat="server" id="mainForm" method="post">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
<!-- content start -->
<div style="background: url(img/bg.jpg) no-repeat; padding: 7px 5px; width:742px;">
<div style="font-size:13px;font-weight: bold;color:#15428b;padding: 4px 30px;"> <b>Outlook®</b> style</div>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadGrid1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1"/>
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
<telerik:RadGrid ID="RadGrid1" runat="server" Width="741px" AllowSorting="True"
AllowMultiRowSelection="True" AllowPaging="True" ShowGroupPanel="True" GridLines="None"
AutoGenerateColumns="False" DataMember="Mails"
DataSourceID="SessionDataSource1">
<PagerStyle Mode="NextPrevAndNumeric">
</PagerStyle>
<
HeaderContextMenu EnableAutoScroll="True"></HeaderContextMenu>
<MasterTableView DataMember="Mails" AllowMultiColumnSorting="True"
Width="724px" TableLayout="Fixed" DataSourceID="SessionDataSource1">
<GroupByExpressions>
<telerik:GridGroupByExpression>
<SelectFields>
<telerik:GridGroupByField FieldAlias="Received" FieldName="Received" FormatString="{0:D}" HeaderValueSeparator=" from date: "></telerik:GridGroupByField>
</SelectFields>
<GroupByFields>
<telerik:GridGroupByField SortOrder="Descending" FieldName="Received" FormatString="" HeaderText="">
</telerik:GridGroupByField>
</GroupByFields>
</telerik:GridGroupByExpression>
</GroupByExpressions>
</MasterTableView>
<ClientSettings AllowDragToGroup="True">
<Selecting AllowRowSelect="True"></Selecting>
<Scrolling AllowScroll="True" UseStaticHeaders="True" ScrollHeight="275px"></Scrolling>
<ClientMessages DragToGroupOrReorder="Drag to group" />
</ClientSettings>
</telerik:RadGrid>
<asp:SqlDataSource ID="SessionDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
ProviderName
="System.Data.SqlClient" SelectCommand="SELECT ProductID, ProductName, CategoryID, QuantityPerUnit, UnitPrice, UnitsInStock, Discontinued FROM [Products]"
DeleteCommand
="DELETE FROM [Products] WHERE [ProductID] = @ProductID" InsertCommand="INSERT INTO Products(ProductName, CategoryID, QuantityPerUnit, UnitPrice, UnitsInStock, Discontinued) VALUES (@ProductName, @CategoryID, @QuantityPerUnit, @UnitPrice, @UnitsInStock, @Discontinued)"
UpdateCommand
="UPDATE [Products] SET [ProductName] = @ProductName, [CategoryID] = @CategoryID, [QuantityPerUnit] = @QuantityPerUnit, [UnitPrice] = @UnitPrice, [UnitsInStock] = @UnitsInStock, [Discontinued] = @Discontinued WHERE [ProductID] = @ProductID AND [ProductName] = @ProductName AND [CategoryID] = @CategoryID AND [QuantityPerUnit] = @QuantityPerUnit AND [UnitPrice] = @UnitPrice AND [UnitsInStock] = @UnitsInStock AND [Discontinued] = @Discontinued"
OldValuesParameterFormatString="original_{0}" ConflictDetection="CompareAllValues">
<DeleteParameters>
<asp:Parameter Name="original_ProductID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="ProductName" Type="String" />
<asp:Parameter Name="QuantityPerUnit" Type="String" />
<asp:Parameter Name="UnitPrice" Type="Decimal" />
<asp:Parameter Name="UnitsInStock" Type="Int16" />
<asp:Parameter Name="Discontinued" Type="Boolean" />
<asp:Parameter Name="original_ProductID" Type="Int32" />
<asp:Parameter Name="original_ProductName" Type="String" />
<asp:Parameter Name="original_QuantityPerUnit" Type="String" />
<asp:Parameter Name="original_UnitPrice" Type="Decimal" />
<asp:Parameter Name="original_UnitsInStock" Type="Int16" />
<asp:Parameter Name="original_Discontinued" Type="Boolean" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="ProductName" Type="String" />
<asp:Parameter Name="QuantityPerUnit" Type="String" />
<asp:Parameter Name="UnitPrice" Type="Decimal" />
<asp:Parameter Name="UnitsInStock" Type="Int16" />
<asp:Parameter Name="Discontinued" Type="Boolean" />
</InsertParameters>
</
asp:SqlDataSource>
</div>
<!-- content end -->
</form>
</
body>
</
html>
:1,"Index":1,"Data":{"text":"Centre Activities (except Amusement Arcade, Child ...","value":"uc1843"}},{"Type":1,"Index":2,"Data":{"text":"Centre Activities (except Amusement Arcade, Child ...","value":"uc1890"}},{"Type":1,"Index":3,"Data":{"text":"Centre Activities where not involving building wor...","value":"uc1919"}},{"Type":1,"Index":4,"Data":{"text":"Centre Activities (except Display and Sales Activi...","value":"uc1932"}},{"Type":1,"Index":5,"Data":{"text":"Building work involving alterations to the facade ...","value":"wb1951"}},{"Type":1,"Index":6,"Data":{"text":"Centre Activities (except Display and Sales Activi...","value":"uc1996","selected":true}},{"Type":1,"Index":7,"Data":{"text":"Centre Activities whether or not involving buildin...","value":"uc2022"}},{"Type":1,"Index":8,"Data":{"text":"Demolition or removal of a Multi–unit Dwelling (wh...","value":"wd2046"}}],"value":"wd2046","text":"Demolition or removal of a Multi–unit Dwelling (wh...","enabled":true}
How do I access the value variables for combos 1, 2 and 3 - because the SelectedValue, SelectedItem, SelectedText properties arent working for me in this case?
Also, why is it that the Firefox post seems to identify the first item as selected whatever item I choose, but in fact its the only one that returns the correct item when I use SelectedValue, SelectedItem, SelectedText. The other two are atleast sending the correct items to the server!
Very confused.
Ive posted the page code and code behind below. Really appreciate your advice.
<%
@ Page Language="C#" MasterPageFile="~/Masterpages/MasterPage.master" AutoEventWireup="true" CodeFile="Slice2.aspx.cs" Inherits="Slice2" Title="Untitled Page" %>
<%
@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<
asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<title>Slice: thePlanBox</title>
<telerik:RadScriptBlock ID="RadScriptBlock2" runat="server">
<script type="text/javascript">
var pgs = new Array('Find','Review','Navigate','Read');
DoSetup(pgs);
</script>
</telerik:RadScriptBlock>
<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
<script type="text/javascript">
function OnRC1ClientSelectedIndexChanged(sender, args)
{
var value = args.get_item().get_value();
if (value != "0") {
var panel = $find("<%=RadXmlHttpPanel1.ClientID %>");
panel.set_value(value);
}
else {
var combo = $find('<%=rc2.ClientID %>');
combo.clearItems();
combo.clearSelection();
}
}
function OnClientResponseEnding(panel, args) {
var count = args.get_content().length;
var combo = $find('<%=rc2.ClientID %>');
combo.clearItems();
combo.clearSelection();
var selectItem = new Telerik.Web.UI.RadComboBoxItem();
selectItem.set_text(
"Please Select");
selectItem.set_value(
"0");
combo.trackChanges();
combo.get_items().add(selectItem);
selectItem.select();
combo.commitChanges();
for (var i = 0; i < count; i++) {
var item = args.get_content()[i];
var comboItem = new Telerik.Web.UI.RadComboBoxItem();
comboItem.set_text(item.Name);
comboItem.set_value(item.ID);
combo.trackChanges();
combo.get_items().add(comboItem);
combo.commitChanges();
}
args.set_cancel(
true);
}
</script>
</telerik:RadScriptBlock>
</
asp:Content>
<
asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<
div id="tpb_default_pagecontrols">
<
telerik:RadXmlHttpPanel ID="RadXmlHttpPanel1" runat="server"
WebMethodPath="WebService.asmx"
WebMethodName="GetActivitiesForPlace"
EnableClientScriptEvaluation="true"
OnClientResponseEnding="OnClientResponseEnding" LoadingPanelID="LoadingPanel1">
</telerik:RadXmlHttpPanel>
<div id="tpb_clientdocumentcombos">
<div>
<div class="tpb_controllabel">Places</div>
<div class="tpb_shadowcombo"><telerik:RadComboBox ID="rc1" runat="server"
OnClientSelectedIndexChanged="OnRC1ClientSelectedIndexChanged" Width="600"></telerik:RadComboBox></div>
<div class="tpb_dropshadow"><asp:Image ID="DDImage1" runat="server" ImageUrl="Images/DD_Shadow.png" /></div>
</div>
<div>
<div class="tpb_controllabel">Activities</div>
<div class="tpb_shadowcombo"><telerik:RadComboBox ID="rc2" Runat="server" Width="600"></telerik:RadComboBox></div>
<div class="tpb_dropshadow"><asp:Image ID="Image1" runat="server" ImageUrl="Images/DD_Shadow.png" /></div>
</div>
<div>
<div class="tpb_controllabel">Choose criteria types</div>
<div class="tpb_shadowcombo"><telerik:RadComboBox ID="rc3" Runat="server" Width="600"></telerik:RadComboBox></div>
<div class="tpb_dropshadow"><asp:Image ID="Image2" runat="server" ImageUrl="Images/DD_Shadow.png" /></div>
</div>
<div class="tpb_loadingmsg">
<telerik:RadAjaxLoadingPanel id="LoadingPanel1" Runat="server">
<asp:Image id="Image3" runat="server" ImageUrl="Images/ajax-loader.gif" >
</asp:Image>
</telerik:RadAjaxLoadingPanel>
</div>
</div>
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="200px"
Width="600px" LoadingPanelID="LoadingPanel1">
<asp:Button ID="Button1" runat="server" Text="Show Me" onclick="Button1_Click" />
<asp:Literal ID="xml1" runat="server" Mode="PassThrough" EnableViewState="false"></asp:Literal>
</telerik:RadAjaxPanel>
</div>
</
asp:Content>