| <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> |
| <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head runat="server"> |
| <title></title> |
| </head> |
| <body> |
| <form id="form1" runat="server"> |
| <div> |
| <telerik:RadScriptManager runat="server" ID="rsmScriptManager" /> |
| <telerik:RadAjaxManager runat="server" ID="ramAjaxManager"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="btnTest"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="divColor" LoadingPanelID="rlpLoadingPanel" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| <telerik:RadAjaxLoadingPanel ID="rlpLoadingPanel" runat="server" Skin="Vista"/> |
| <div style="width: 500px; height: 500px; background-color: Red;" runat="server" id="divColor" /> |
| <asp:Button ID="btnTest" runat="server" Text="Test" OnClick="btnTest_Click" /> |
| </div> |
| </form> |
| </body> |
| </html> |
Hi,
When using the month view inthe Scheduler I would like to show a summary of all appointments in a day, OnMousehover I would like to show the details of the appointments for that day.
For Example
I have a room name Conference,and wish to see the bookings for a month for this room. I am able to show theappointments in the month view.
Say on a particular day thereare 5 bookings for the room, the month view shows all 5 bookings seperately.What I want is to show a summary stating there are 5 bookings and on mousehoverit should provide me information of the separate bookings for the day.
Thanks
Sabrish
protected
void DynamicRepeater_ItemCreated(Object sender, RepeaterItemEventArgs e)
{
IDictionary
<string, string> values = RetrieveValues();
RadComboBox combo= new RadComboBox();
//DropDownList combo= new DropDownList();
combo.ID =
"SomeId";
combo.DataSource = values;
combo.DataValueField =
"Key";
combo.DataTextField =
"Value";
e.Item.Controls.Add(combo)
}
There is another RadComboBox control named TypeComboBox with AutoPostBack="true" inside the FormView.
Whenever the TypeComboBox selection changes, the repeater needs to be rebound and the dynamic controls will be recreated inside the repeater.
So I added the following code to ajaxify the repeater:
protected void Page_PreRender(object sender, EventArgs e)
{
RadComboBox
typeComboBox = (RadComboBox)FormView1.FindControl("TypeComboBox ");
RadAjaxManager.GetCurrent(Page).AjaxSettings.AddAjaxSetting(typeComboBox , (Repeater)FormView1.FindControl("DynamicRepeater"));
}
This does not work.The point is when I replace the RadComboBox with an Asp DropDownList ,the ajax works fine.So I assume the problem might be happening by the RadComboBox.
Note that Ajaxifying the whole FormView is not an option for me, because I don't want to lose the data that user entered in the other controls in the FormView after selecting the Type.
I had a previous issue with the ajaxifying other controls like Panel and PlaceHolder inside a FormView(Support ID:228263 -- Problem with RadAjaxManager and Panel or PlaceHolder inside a FormView), but I am afraid the answer was not very saticefying because like I explained the whole FormView shouldn't be refreshed in my case.
What can I do to solve this issue?
Thanks in advance for your help.
Sima
| Imports Telerik.Web.UI |
| Partial Class _Default |
| Inherits System.Web.UI.Page |
| Protected Overrides Sub OnLoad(ByVal e As System.EventArgs) |
| MyBase.OnLoad(e) |
| F(ph) |
| End Sub |
| Private Sub F(ByVal pane As Control, Optional ByVal limit As Integer = 10) |
| If limit <= 0 Then |
| Dim blah As New Literal() |
| blah.Text = " " |
| pane.Controls.Add(blah) |
| Exit Sub |
| End If |
| If TypeOf pane Is WebControl Then |
| Dim rand As New Random(pane.GetHashCode) |
| Dim r As Integer = rand.Next(100, 255) |
| Dim g As Integer = rand.Next(10, 255) |
| Dim b As Integer = rand.Next(50, 255) |
| CType(pane, WebControl).BackColor = System.Drawing.Color.FromArgb(r, g, b) |
| End If |
| Dim splitter As New RadSplitter() |
| splitter.Orientation = If(limit Mod 2 = 0, Orientation.Horizontal, Orientation.Vertical) |
| splitter.PanesBorderSize = 0 |
| Dim leftPanel As New RadPane() |
| leftPanel.Scrolling = SplitterPaneScrolling.None |
| F(leftPanel, limit - 1) |
| splitter.Items.Add(leftPanel) |
| Dim rightPanel As New RadPane() |
| rightPanel.Scrolling = SplitterPaneScrolling.None |
| F(rightPanel, limit - 1) |
| splitter.Items.Add(rightPanel) |
| Dim spacing As New Panel() |
| spacing.Style.Add("padding", "5px") |
| spacing.Controls.Add(splitter) |
| pane.Controls.Add(spacing) |
| End Sub |
| End Class |
| <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head runat="server"> |
| </head> |
| <body> |
| <form id="form1" runat="server"> |
| <asp:ScriptManager runat="server" /> |
| <asp:PlaceHolder runat="server" ID="ph" /> |
| </form> |
| </body> |
| </html> |
<
telerik:GridTemplateColumn HeaderText="Notification" UniqueName="TemplateColumn"
EditFormColumnIndex="1" ReadOnly="false">
<ItemTemplate>
<%
# Eval("vchNewsText") %>
</ItemTemplate>
<EditItemTemplate>
<span><telerik:RadTextBox runat="server" ID="txtNotification" Width="750px" height="200px"
TextMode="MultiLine"
Text='<%# Bind("vchNewsText") %>'></telerik:RadTextBox><span></span>
</EditItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
s1 = (editedItem.FindControl(
"txtNotification") as TextBox).Text;
Hashtable newValues = new Hashtable();
e.Item.OwnerTableView.ExtractValuesFromItem(newValues, editedItem);
s1=(string)newValues["TemplateColumn"];
Result-empty string;
So how do I extract the new value of Control in Template Column in Grid_ItemCommand procedure ?