I have a toggle button in a grid and would like to set its initial setting dependant on a Boolean in the database. Is there a way to bind it or set it via code.
Thanks
function
MyAjaxRequest(sender, args)
{
var
id = args.getDataKeyValue(
"AuditEntryID"
).toString();
var
ajaxObj = $find(
"<%= RadAjaxManager.GetCurrent(Page).ClientID %>"
);
ajaxObj.ajaxRequest(
"id:"
+ id);
}
Protected
Sub
Page_Load(
ByVal
sender
As
Object
,
ByVal
e
As
System.EventArgs)
Handles
Me
.Load
Dim
manager
As
RadAjaxManager = RadAjaxManager.GetCurrent(Page)
AddHandler
manager.AjaxRequest,
AddressOf
manager_AjaxRequest
End
Sub
Private
Sub
manager_AjaxRequest(
ByVal
sender
As
Object
,
ByVal
e
As
AjaxRequestEventArgs)
Dim
result
As
String
= e.Argument.Split(
":"
)(1)
AuditID = result
End
Sub
<
asp:Content
ID
=
"Content1"
ContentPlaceHolderID
=
"cphMain"
runat
=
"Server"
>
<
telerik:RadCodeBlock
ID
=
"RadCodeBlock1"
runat
=
"server"
>
<
script
type
=
"text/javascript"
language
=
"javascript"
>
function LR_Collapsed()
{
var left = $find("<%=LeftPane.ClientID%>");
var right = $find("<%=RightPane.ClientID%>");
var bottom = $find("<%=BottomPane.ClientID%>");
if (left.get_collapsed() && right.get_collapsed())
{
bottom.expand(1);
}
}
function LR_Expanded()
{
var bottom = $find("<%=BottomPane.ClientID%>");
bottom.collapse(1);
}
function MyAjaxRequest(sender, args)
{
var id = args.getDataKeyValue("AuditEntryID").toString();
var ajaxObj = $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>");
//ajaxObj.ajaxRequestWithTarget('<%=AccordionExisting1.UniqueID%>',"id:" + id);
ajaxObj.ajaxRequest("id:" + id);
}
</
script
>
</
telerik:RadCodeBlock
>
<
telerik:RadAjaxManagerProxy
ID
=
"AjaxManagerProxy1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"RadAjaxPanelExisting"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadAjaxPanelExisting"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
<
telerik:AjaxSetting
AjaxControlID
=
"RadAjaxPanelProposed"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadAjaxPanelProposed"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
<
telerik:AjaxSetting
AjaxControlID
=
"RadAjaxPanel1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadAjaxPanel1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManagerProxy
>
<
telerik:RadSplitter
ID
=
"RadSplitter1"
runat
=
"server"
Skin
=
"Office2007"
Width
=
"100%"
Height
=
"100%"
>
<
telerik:RadPane
ID
=
"LeftPane"
runat
=
"server"
Scrolling
=
"None"
Width
=
"25%"
OnClientCollapsed
=
"LR_Collapsed"
OnClientExpanded
=
"LR_Expanded"
>
<
telerik:RadAjaxPanel
id
=
"RadAjaxPanelExisting"
runat
=
"server"
height
=
"100%"
width
=
"100%"
>
<
uc2:AccordionExisting
ID
=
"AccordionExisting1"
runat
=
"server"
/>
</
telerik:RadAjaxPanel
>
</
telerik:RadPane
>
<
telerik:RadSplitBar
ID
=
"RadSplitBar1"
runat
=
"server"
CollapseMode
=
"Forward"
Width
=
"25px"
EnableTheming
=
"True"
/>
<
telerik:RadPane
ID
=
"MiddlePane"
runat
=
"server"
Scrolling
=
"None"
>
<
telerik:RadSplitter
ID
=
"RadSplitterMid"
runat
=
"server"
Skin
=
"Office2007"
Width
=
"100%"
Height
=
"100%"
Orientation
=
"Horizontal"
>
<
telerik:RadPane
ID
=
"TopPane"
runat
=
"server"
Scrolling
=
"None"
Height
=
"0%"
>
</
telerik:RadPane
>
<
telerik:RadSplitBar
ID
=
"RadSplitBar3"
runat
=
"server"
CollapseMode
=
"Forward"
Width
=
"25px"
/>
<
telerik:RadPane
ID
=
"BottomPane"
runat
=
"server"
Scrolling
=
"None"
>
<
telerik:RadAjaxPanel
id
=
"RadAjaxPanel1"
runat
=
"server"
height
=
"100%"
width
=
"100%"
>
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
DataSourceID
=
"SqlDataSourceAudit"
AutoGenerateColumns
=
"False"
GridLines
=
"None"
Width
=
"100%"
Height
=
"100%"
AllowPaging
=
"False"
PageSize
=
"8"
>
<
HeaderContextMenu
CssClass
=
"GridContextMenu GridContextMenu_Default"
>
</
HeaderContextMenu
>
<
MasterTableView
DataSourceID
=
"SqlDataSourceAudit"
CommandItemDisplay
=
"Top"
ClientDataKeyNames
=
"AuditEntryID"
>
<
CommandItemSettings
ExportToPdfText
=
"Export to Pdf"
/>
<
RowIndicatorColumn
FilterControlAltText
=
"Filter RowIndicator column"
>
</
RowIndicatorColumn
>
<
ExpandCollapseColumn
FilterControlAltText
=
"Filter ExpandColumn column"
>
</
ExpandCollapseColumn
>
<
Columns
>
<
telerik:GridTemplateColumn
HeaderText
=
"Building"
UniqueName
=
"Building"
FilterControlAltText
=
"Filter Building column"
>
<
ItemTemplate
>
<
telerik:RadComboBox
ID
=
"rcbBuilding"
runat
=
"server"
AllowCustomText
=
"True"
Filter
=
"Contains"
Width
=
"100%"
>
</
telerik:RadComboBox
>
</
ItemTemplate
>
<
HeaderStyle
Width
=
"100px"
/>
</
telerik:GridTemplateColumn
>
<
telerik:GridBoundColumn
DataField
=
"AuditEntryID"
UniqueName
=
"AuditEntryID"
FilterControlAltText
=
"Filter AuditEntryID column"
Display
=
"False"
>
</
telerik:GridBoundColumn
>
<
telerik:GridButtonColumn
ConfirmText
=
"Delete this audit entry?"
ConfirmDialogType
=
"RadWindow"
ConfirmTitle
=
"Delete"
ButtonType
=
"ImageButton"
CommandName
=
"Delete"
Text
=
"Delete"
UniqueName
=
"DeleteColumn"
ImageUrl
=
"~/images/16/remove_16.png"
FilterControlAltText
=
"Filter DeleteColumn column"
>
<
ItemStyle
HorizontalAlign
=
"Center"
/>
<
HeaderStyle
Width
=
"25px"
/>
</
telerik:GridButtonColumn
>
</
Columns
>
<
EditFormSettings
>
<
EditColumn
FilterControlAltText
=
"Filter EditCommandColumn column"
>
</
EditColumn
>
</
EditFormSettings
>
<
CommandItemTemplate
>
<
table
>
<
tr
>
<
td
align
=
"left"
>
<
asp:ImageButton
ID
=
"btnAdd"
Tooltip
=
"Add"
CommandName
=
"Insert"
Runat
=
"server"
ImageUrl
=
"~/images/16/add_16.png"
></
asp:ImageButton
>
<
asp:ImageButton
ID
=
"btnSave"
Tooltip
=
"Save"
CommandName
=
"Save"
Runat
=
"server"
ImageUrl
=
"~/images/16/floppy_disk_16.png"
></
asp:ImageButton
>
</
td
>
<
td
align
=
"right"
>
<
asp:ImageButton
ID
=
"btnRefresh"
Tooltip
=
"Refresh data"
CommandName
=
"Cancel"
Runat
=
"server"
ImageUrl
=
"~/images/16/refresh_16.png"
></
asp:ImageButton
>
</
td
>
</
tr
>
</
table
>
</
CommandItemTemplate
>
</
MasterTableView
>
<
FilterMenu
EnableImageSprites
=
"False"
>
</
FilterMenu
>
<
ClientSettings
>
<
Selecting
AllowRowSelect
=
"True"
/>
<
Resizing
AllowColumnResize
=
"True"
/>
<
Scrolling
AllowScroll
=
"True"
UseStaticHeaders
=
"True"
/>
<
ClientEvents
OnRowSelected
=
"MyAjaxRequest"
/>
</
ClientSettings
>
<
PagerStyle
Mode
=
"Slider"
/>
</
telerik:RadGrid
>
</
telerik:RadAjaxPanel
>
</
telerik:RadPane
></
telerik:RadSplitter
>
</
telerik:RadPane
>
<
telerik:RadSplitBar
ID
=
"RadSplitBar2"
runat
=
"server"
CollapseMode
=
"Backward"
Width
=
"25px"
/>
<
telerik:RadPane
ID
=
"RightPane"
runat
=
"server"
Scrolling
=
"None"
Width
=
"25%"
OnClientCollapsed
=
"LR_Collapsed"
OnClientExpanded
=
"LR_Expanded"
>
<
telerik:RadAjaxPanel
id
=
"RadAjaxPanelProposed"
runat
=
"server"
height
=
"100%"
width
=
"100%"
>
<
uc3:AccordionProposed
ID
=
"AccordionProposed1"
runat
=
"server"
/>
</
telerik:RadAjaxPanel
>
</
telerik:RadPane
>
</
telerik:RadSplitter
>
</
asp:Content
>
Hello,
I have a listview that has shows a startdate enddate starttime endtime. I want to have it only display startdate unless the enddate is not equal to the startdate. For example is the row had a startdate & enddata that were the same I would like for the enddate to be set as visable = false. I have tried the code below but cant seem to get it to work, any help would be great.
Thanks
<
ItemTemplate
>
<
li
class
=
"rlvI"
> <
asp:Label
ID
=
"SubjectLabel"
runat
=
"server"
Text='<%# Eval("Subject") %>' />
<
asp:Label
ID
=
"DescriptionLabel"
runat
=
"server"
Text='<%# Eval("Description") %>' />
<
asp:Label
ID
=
"StartDateLabel"
runat
=
"server"
Text='<%# Eval("StartDate", "{0:MMMM dd}") %>' />
<
asp:Label
ID
=
"EndDateLabel"
runat
=
"server"
Text='<%# Eval("EndDate", "{0:MMMM dd}") %>' />
<
asp:Label
ID
=
"StartTimeLabel"
runat
=
"server"
Text='<%# Eval("StartTime","{0:t}") %>' />
<
asp:Label
ID
=
"EndTimeLabel"
runat
=
"server"
Text='<%# Eval("EndTime","{0:t}") %>' />
</
li
>
</
ItemTemplate
>
We have Rad editor lite for MOSS 2007 and use the RadHtmlField control in the publishing layouts to render the RichHtml fields. When we place a picture or a link into the field in edit mode using absolute path within sharepoint sites and then publish the page. All urls are converted to relative url. Unfortunately deactivating/reactivating StripAbsoluteAnchorPaths and StripAbsoluteImagesPaths only works in edit mode. Urls became relative after the page is published.
We want to keep urls the same way we've entered them in edit mode.
Please advise.
Thank you!!
The icon of a creeping RadComboBox items shown out of square with Internet Explorer 9 in the last release that launched Telerik Q1 2011.
IE Version: 9.0.8112.16421
When I fix it?
http://demos.telerik.com/aspnet-ajax/combobox/examples/default/defaultcs.aspx
Attach Image!!!
<Telerik:RadGrid Height ="612" ID="Results" HorizontalAlign="Center" runat="server" AllowPaging="True" AllowSorting="True" |
Font-Names="Tahoma" OnItemCommand="Results_OnItemCommand" GridLines="None" Skin="Office2007" |
OnPreRender="Results_PreRender" OnExcelExportCellFormatting="dgResults_ExcelExportCellFormatting" OnPageSizeChanged ="dgResults_pageSizeChanged"> |
<MasterTableView Width ="98.5%" TableLayout="auto" GroupLoadMode ="client" DataKeyNames ="General ID" > |
<Columns> |
</Columns> |
<NestedViewSettings DataSourceID="AccessDataSource1"> |
<ParentTableRelation> |
<telerik:GridRelationFields DetailKeyField="GeneralID" MasterKeyField="General ID" /> |
</ParentTableRelation> |
</NestedViewSettings> |
<NestedViewTemplate> |
<asp:Panel runat="server" ID="InnerContainer" CssClass ="viewWrap" Visible="false"> |
<telerik:radGrid HorizontalAlign ="center" ID ="dgResutls_inner" runat ="server" OnNeedDataSource ="inner_needDataSource" AllowPaging="True" AllowSorting="True" Skin="Office2007" > |
<AlternatingItemStyle Font-Size="8pt" CssClass="MyAlternatingClass" wrap="False"/> |
<ItemStyle Font-Names="Tahoma" Font-Size="8pt" CssClass ="MyClass" wrap="False" /> |
<HeaderStyle Font-Bold="True" Font-Size="9pt" ForeColor="Black" Wrap="False" HorizontalAlign="Center" /> |
<ClientSettings > |
<Selecting AllowRowSelect ="true" /> |
</ClientSettings> |
<MasterTableView TableLayout ="auto" > |
</MasterTableView> |
</telerik:radGrid> |
</asp:Panel> |
</NestedViewTemplate> |
</MasterTableView> |
</Telerik:RadGrid> |
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetResults" UpdateMethod="GetResults" InsertMethod="GetResults" TypeName="iFindSearchDB"></asp:ObjectDataSource> |
<asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="stage.mdb" SelectCommand="SELECT * FROM [stage] where GeneralID=@GeneralID"> |
<SelectParameters> |
<asp:SessionParameter Name="GeneralID" SessionField="GeneralID" Type="Int32" /> |
</SelectParameters> |
</asp:AccessDataSource> |