]);
if (e) throw e;
if (typeof(element.control) != 'undefined') throw Error.invalidOperation(Sys.Res.controlAlreadyDefined);
Sys.UI.Control.initializeBase(
this);
this._element = element;
element.control =
this;
| protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) |
| { |
| Label Label1 = (Label)e.Item.FindControl("Label1"); |
| //Add the Label id to the tooltip manager |
| try |
| { |
| System.Data.DataRowView currentRow = (System.Data.DataRowView)e.Item.DataItem; |
| this.RadToolTipManager1.TargetControls.Add(Label1.ClientID, currentRow.Row["provider_id"].ToString(), true); |
| } |
| catch (Exception e1) |
| { |
| } |
| } |
| protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args) |
| { |
| this.updateToolTip(args.Value, args.UpdatePanel); |
| } |
| protected void updateToolTip(string elementID, UpdatePanel panel) |
| { |
| //Add the pnlToolTipContainer panel to the updatepanel, and make the test informationlabel visibility to true |
| panel.ContentTemplateContainer.Controls.Add(pnlToolTipContainer); |
| lblInfo.Visible = true; |
| lblInfo.Text = elementID; |
| toolTipProviderID.Text = elementID; // puts the current row's providerID in textbox to bind aliasGrid to that providerID |
| aliasGrid.Rebind(); |
| } |
| <telerik:RadScriptManager ID="RadScriptManager1" Runat="server"> |
| </telerik:RadScriptManager> |
| <div> |
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="okButton"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="okButton" /> |
| <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| <telerik:AjaxSetting AjaxControlID="RadGrid1"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| </div> |
| <telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AllowPaging="True" |
| DataSourceID="SqlDataSource1" GridLines="None" PageSize="20" OnItemDataBound="RadGrid1_ItemDataBound" > |
| <GroupingSettings CaseSensitive="false" /> |
| <MasterTableView AutoGenerateColumns="False" DataKeyNames="provider_id" |
| DataSourceID="SqlDataSource1" AllowSorting="True" PageSize="12" |
| InsertItemPageIndexAction="ShowItemOnCurrentPage"> |
| <SortExpressions> |
| <telerik:GridSortExpression FieldName="provider_name" SortOrder="Ascending" /> |
| </SortExpressions> |
| <RowIndicatorColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </RowIndicatorColumn> |
| <ExpandCollapseColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </ExpandCollapseColumn> |
| <Columns> |
| <telerik:GridBoundColumn DataField="provider_id" DataType="System.Int32" |
| ReadOnly="True" SortExpression="provider_id" display="false" |
| UniqueName="provider_id"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="provider_name" HeaderText="Provider Name" |
| SortExpression="provider_name" UniqueName="provider_name"> |
| </telerik:GridBoundColumn> |
| <telerik:GridTemplateColumn DataField="provider_alias" HeaderText="Primary Provider Alias" SortExpression="provider_alias" |
| UniqueName="provider_alias"> |
| <ItemTemplate> |
| <asp:Label ID="Label1" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.provider_alias") %>'> |
| </asp:Label> |
| </ItemTemplate> |
| </telerik:GridTemplateColumn> |
| <telerik:GridBoundColumn DataField="provider_alias" HeaderText="Primary Provider Alias" |
| SortExpression="provider_alias" UniqueName="provider_alias" |
| AllowFiltering="false"> |
| </telerik:GridBoundColumn> |
| </Columns> |
| <PagerStyle Mode="NextPrevAndNumeric" /> |
| <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" |
| Font-Strikeout="False" Font-Underline="False" VerticalAlign="Bottom" |
| Wrap="True" /> |
| </MasterTableView> |
| <ClientSettings> |
| <ClientEvents OnRowSelected="rowSelected" /> |
| <Selecting AllowRowSelect="True" /> |
| </ClientSettings> |
| <FilterMenu EnableTheming="True"> |
| <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> |
| </FilterMenu> |
| </telerik:RadGrid> |
| <asp:Panel ID="pnlToolTipContainer" runat="server"> |
| <asp:Label ID="lblInfo" runat="server" Visible="false" ></asp:Label> |
| <br /> |
| <telerik:RadGrid ID="aliasGrid" runat="server" GridLines="None" |
| DataSourceID="ccAlias" AutoGenerateColumns="False"> |
| <MasterTableView NoMasterRecordsText="No aliases to display"> |
| <Columns> |
| <telerik:GridBoundColumn DataField="alias_name" HeaderText="All Aliases"></telerik:GridBoundColumn> |
| </Columns> |
| </MasterTableView> |
| </telerik:RadGrid> |
| </asp:Panel> |
| <telerik:RadToolTipManager runat="server" ID="RadToolTipManager1" Position="Center" |
| RelativeTo="Element" Width="320px" Height="260px" Animation="Resize" |
| HideEvent="LeaveToolTip" Skin="WebBlue" OnAjaxUpdate="OnAjaxUpdate"> |
| </telerik:RadToolTipManager> |
| From: Laura |
| Date: 11/27/2008 4:08:30 PM |
| I wrote a question to the forum the other day about using a tooltip for a template column and displaying the detail items in a grid in a tooltip for a specific column. What I want to do is this: I have a grid of providers and a template column which is primary provider alias. I have another table called provider_aliases which is all the aliases for each provider. I want to hover over the primary alias and show a tooltip of all provider_aliases. I got a great answer here telling me to use the tooltipmananger and on the ajaxrequest to load the alias grid into the tooltip and tried to implement it and I am 90% there. The forum post is gone and I still need a little help, so I am reposting it by copying parts from the email I recieved when I got the answer. I don't know why I cant access the original post. |
| Shinu helped me greatly with this answer: |
| From: Shinu |
| Date: 11/26/2008 5:18:38 AM |
| Hi Laura, |
| I have one suggestion for doing this instead of adding the tooltip inside the template column with the "aliasGrid ", |
| place the aliasGrid outside the RadGrid1 and use the tooltip manager as explained in the demo to show the related alias's on hover the label. |
| Radgrid1 with Label in the tempplate column. |
| .......... |
i am using 2008.2.723.20 dll, The scheduler is as below.
problem is that it always takes 2 cells for one appointment, if appointment starts and ends today, the appointment expands to the next cell at right.
Please help me to fix this.
regards
Arijit Chatterjee
<
telerik:RadScheduler ID="RadScheduler2" runat="server"
OnClientAppointmentEditing
="AppointmentEditing"
OnAppointmentInsert="OnAppointmentInsert" OnAppointmentCommand="OnAppointmentCommand"
DataKeyField="EventId" DataStartField="StartTime"
DataEndField="EndTime" DataSubjectField="Title" DataRecurrenceField="Recurrence"
DataRecurrenceParentKeyField="Recurrence"
DayEndTime="22:00:00"
SelectedView="MonthView"
>
</
telerik:RadScheduler>
| <telerik:RadMenuItem Text="Options" runat="server"> |
| <Items> |
| <telerik:RadMenuItem runat="server"> |
| <ItemTemplate> |
| <asp:CheckBox ID="askatstartup" runat="server" Text="Ask to Auto-configure at startup" /> |
| </ItemTemplate> |
| </telerik:RadMenuItem> |
| <telerik:RadMenuItem runat="server"> |
| <ItemTemplate> |
| <asp:CheckBox ID="sortedtree" runat="server" Text="Show sorted tree" /> |
| </ItemTemplate> |
| </telerik:RadMenuItem> |
| </Items> |
| <GroupSettings Width="250" /> |
| </telerik:RadMenuItem> |
| RadMenuItem oOptions = oRadMenu.FindItemByText("Options"); |
| // put the value on the checkbox and add an event |
| CheckBox oCheck = (CheckBox)oOptions.Items[0].FindControl("askatstartup"); |
| oCheck.InputAttributes.Add("onClick", "OptionsCheckBoxClicked('askatstartup', this.checked);"); |
| oCheck.Attributes.Add("onMouseOver", "this.style.background = '#dfdfdf';"); |
| oCheck.Attributes.Add("onMouseOut", "this.style.background = '#fff';"); |
| .rmVertical .rmItem .rmLink:hover { |
| background:#dfdfdf !important; |
| color: #6b6b6b !important; |
| }} |