Hello Team,
How to pass ResourceType values to another ResourceType when i select a value from ResourceType i need selected value to be placed in another ResourceType in telerik scheduler.
<telerik:radscheduler id="MyRadSchedulerRD" runat="server" datakeyfield="ID" datastartfield="Start"
advancedform-enablecustomattributeediting="true" datasubjectfield="Subject" daystarttime="08:00:00"
dayendtime="21:00:00" timezoneoffset="00:00:00" datadescriptionfield="Description"
dataendfield="End" width="800px" skin="Default" onappointmentcommand="RadScheduler1_AppointmentCommand"
onformcreated="RadScheduler1_FormCreated" onappointmentupdate="RadScheduler_AppointmentUpdate"
overflowbehavior="Expand" onclientappointmentediting="OnClientAppointmentEditing"
startinsertinginadvancedform="true" datarecurrencefield="" onclienttimeslotclick="insertAppointment"
onclientappointmentclick="editAppointment">
<%--<AdvancedForm EnableResourceEditing="false" />--%>
<AdvancedForm Modal="true"></AdvancedForm>
<WeekView HeaderDateFormat="dd/MM/yyyy"></WeekView>
<AppointmentTemplate>
<span><b>
<%# Eval("Subject") %>: </b></span><span style="font-style: italic;">
<%# Eval("Description") %></span>
<span style="font-style: italic;"></span>
</AppointmentTemplate>
<%-- <ResourceTypes>
<telerik:radcombobox id="ddAssigns" runat="server" width="200" height="200" emptymessage="Select User"
datasourceid="ObjectDataSourceAssignedTo" datatextfield="OName" datavaluefield="AssignTo">
</telerik:radcombobox>
</ResourceTypes>--%>
<ResourceTypes>
<telerik:ResourceType KeyField="ViewATFlag" Name="Type*" TextField="ViewATFlagText" ForeignKeyField="ViewATFlag"
DataSourceID="ObjectDataSourceTypes" />
</ResourceTypes>
<ResourceTypes>
<telerik:ResourceType KeyField="AssignTo" Name="Assigned To*" TextField="OName" ForeignKeyField="AssignTo"
DataSourceID="ObjectDataSourceAssignedTo" />
</ResourceTypes>
<ResourceTypes>
<telerik:ResourceType KeyField="Apptype" Name="Property Type*" TextField="ResType" ForeignKeyField="Apptype"
DataSourceID="Propertytype" />
</ResourceTypes>
<ResourceTypes>
<telerik:ResourceType KeyField="PropTo" Name="Sale*" TextField="OProp" ForeignKeyField="PropTo"
DataSourceID="ObjectDataSourcePropTo" />
</ResourceTypes>
<%--<ResourceTypes>
<telerik:ResourceType KeyField="PropTolet" Name="Letting*" TextField="OProplet" ForeignKeyField="PropTolet"
DataSourceID="ObjectDataSourcePropTolet" />
</ResourceTypes>
--%>
<ResourceTypes>
<telerik:ResourceType KeyField="ViewValFlag" Name="Flag" TextField="ResText" ForeignKeyField="ViewValFlag"
DataSourceID="ObjectDataSourceResource" />
</ResourceTypes>
<ResourceTypes>
<telerik:ResourceType KeyField="AppStatus" Name="Status*" TextField="ResText" ForeignKeyField="AppStatus"
DataSourceID="AppointmentTypesDataSource" />
</ResourceTypes>
<ResourceStyles>
<telerik:ResourceStyleMapping Key="1" Text="Viewing" ApplyCssClass="rsCategoryBlue" />
<telerik:ResourceStyleMapping Key="2" Text="Valuation" ApplyCssClass="rsCategoryRed" />
<telerik:ResourceStyleMapping Key="3" Text="Follow Up" ApplyCssClass="rsCategoryGreen" />
</ResourceStyles>
</telerik:radscheduler>
I use Rad Editor on Sitecore.
(Sitecore is a CMS tool .http://www.sitecore.net/)
As described below , span tags are erased one .
<span class="link-blank-right">
<span class="icn"><a href="#">sample</a></span>
</span>
↓↓↓
<span class="icn"><a href="#">sample</a></span>
This is what I will reproduce even in the demo site .
http://demos.telerik.com/aspnet-ajax/editor/examples/overview/defaultcs.aspx
Please tell me how to resolve .
I have Page A and Page B. Page A has "RadWindow" panel which show on condition and Page B is the "Thank you page". When user goes from Page A to Page B using submit button. So Page A is cached. When user clicks back button on browser in Page B. users are seeing cached page and it is never hitting to server check validation. So I used below code to remove cache
HttpContext.Current.Response.Cache.SetExpires(DateTime.UtcNow.AddDays(-1)) HttpContext.Current.Response.Cache.SetValidUntilExpires(false) HttpContext.Current.Response.Cache.SetRevalidation(HttpCacheRevalidation.AllCaches) HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache) HttpContext.Current.Response.Cache.SetNoStore()
<
telerik:RadWindow
ID
=
"radMembershipRenewal"
Title
=
"Change Membership and Subscription"
KeepInScreenBounds
=
"true"
VisibleOnPageLoad
=
"false"
VisibleStatusbar
=
"False"
EnableEmbeddedSkins
=
"False"
Modal
=
"true"
ReloadOnShow
=
"true"
Behaviors
=
"Move"
runat
=
"server"
Height
=
"530"
Width
=
"780"
>
If I dont show RadWindow, I can hit to server for validation. Is there anyway we can handle from RadControls?
I am trying to run code behind when a row is deleted but am having trouble triggering OnDeleteCommand. It doesn't even seem like it is posting back which seems to be related to ajax but am not sure what I need to add or change to get it to trigger.
VB:
Protected
Sub
rgMfgLot_DeleteCommand(
ByVal
source
As
Object
,
ByVal
e
As
GridCommandEventArgs)
Handles
rgMfgLot.DeleteCommand
Try
Dim
lotNo
As
String
= e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)(
"Lot_no"
).ToString()
Dim
dt
As
Data.DataTable =
DirectCast
(Session(
"StagedRecords"
), Data.DataTable)
Dim
lineRow()
As
Data.DataRow
lineRow = dt.
Select
(
"Lot_no = '"
& lotNo &
"'"
)
dt.Rows.Remove(lineRow(0))
dt.AcceptChanges()
Session(
"StagedRecords"
) = dt
BindSecondaryGrid()
Catch
ex
As
Exception
Response.Write(
"<script type="
"text/javascript"
">alert("
+ ex.Message +
");</script"
)
End
Try
End
Sub
ASPX:
<
telerik:RadGrid
ID
=
"rgMfgLot"
runat
=
"server"
AllowPaging
=
"false"
CellSpacing
=
"0"
ShowFooter
=
"false"
GridLines
=
"None"
OnPreRender
=
"rgMfgLot_PreRender"
OnItemCommand
=
"rgMfgLot_ItemCommand"
OnBatchEditCommand
=
"rgMfgLot_BatchEditCommand"
OnItemDataBound
=
"rgMfgLot_ItemDataBound"
OnBiffExporting
=
"rgMfgLot_BiffExporting"
OnDeleteCommand
=
"rgMfgLot_DeleteCommand"
>
<
MasterTableView
CommandItemDisplay
=
"TopAndBottom"
EditMode
=
"Batch"
AutoGenerateColumns
=
"false"
RetrieveNullAsDBNull
=
"true"
DataKeyNames
=
"Lot_no"
>
<
BatchEditingSettings
EditType
=
"Cell"
/>
<
CommandItemSettings
ShowAddNewRecordButton
=
"false"
ShowRefreshButton
=
"True"
ShowSaveChangesButton
=
"false"
ShowExportToExcelButton
=
"false"
ShowExportToCsvButton
=
"false"
/>
<
Columns
>
<
telerik:GridNumericColumn
DataField
=
"Ord_no"
HeaderText
=
"Order #"
UniqueName
=
"Ord_no"
ReadOnly
=
"true"
>
</
telerik:GridNumericColumn
>
<
telerik:GridNumericColumn
DataField
=
"Line_no"
HeaderText
=
"Line_no"
Visible
=
"true"
UniqueName
=
"Line_no"
ReadOnly
=
"true"
Display
=
"False"
>
</
telerik:GridNumericColumn
>
<
telerik:GridBoundColumn
DataField
=
"Item_no"
HeaderText
=
"Item #"
UniqueName
=
"Item_no"
ReadOnly
=
"true"
>
</
telerik:GridBoundColumn
>
<
telerik:GridNumericColumn
DataField
=
"Container_cnt"
HeaderText
=
"Number of Containers"
UniqueName
=
"Container_cnt"
DecimalDigits
=
"0"
ReadOnly
=
"true"
Display
=
"false"
>
</
telerik:GridNumericColumn
>
<
telerik:GridNumericColumn
HeaderText
=
"Qty to Receive"
DecimalDigits
=
"0"
UniqueName
=
"Qty_toreceive"
DataField
=
"Qty_toreceive"
>
<
ColumnValidationSettings
EnableRequiredFieldValidation
=
"true"
>
<
RequiredFieldValidator
ForeColor
=
"Red"
ErrorMessage
=
"Qty to Receive is required"
ID
=
"Qty_toreceiveVal"
ValidationGroup
=
"valGroup"
>
</
RequiredFieldValidator
>
</
ColumnValidationSettings
>
</
telerik:GridNumericColumn
>
<
telerik:GridNumericColumn
DataField
=
"Qty_remaining"
HeaderText
=
"Qty Remaining"
DecimalDigits
=
"0"
ReadOnly
=
"true"
UniqueName
=
"Qty_remaining"
Display
=
"false"
>
</
telerik:GridNumericColumn
>
<
telerik:GridBoundColumn
DataField
=
"MfgLotNo"
HeaderText
=
"Manufacturer Lot No"
UniqueName
=
"MfgLotNo"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Lot_no"
HeaderText
=
"Lot No"
UniqueName
=
"Lot_no"
ReadOnly
=
"true"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Loc"
HeaderText
=
"Location"
UniqueName
=
"Loc"
ReadOnly
=
"true"
Display
=
"false"
>
</
telerik:GridBoundColumn
>
<%--<
telerik:GridBoundColumn
DataField
=
"Bin"
HeaderText
=
"PO_Bin_no"
Visible
=
"true"
UniqueName
=
"PO_Bin_no"
ReadOnly
=
"true"
Display
=
"false"
>
</
telerik:GridBoundColumn
>--%>
<
telerik:GridTemplateColumn
HeaderText
=
"Bin #"
UniqueName
=
"Bin_no"
DataField
=
"Bin"
>
<
ItemTemplate
>
<%# Eval("Bin") %>
</
ItemTemplate
>
<
EditItemTemplate
>
<%--<
telerik:RadComboBox
runat
=
"server"
ID
=
"Bin_ComboBox1"
EnableLoadOnDemand
=
"true"
DataTextField
=
"Bin"
DataValueField
=
"Bin"
AutoPostBack
=
"false"
AllowCustomText
=
"false"
OnDataBound
=
"Bin_ComboBox_DataBound"
>
</
telerik:RadComboBox
> --%>
<
telerik:RadDropDownList
runat
=
"server"
ID
=
"Bin_no1"
AutoPostBack
=
"false"
DataTextField
=
"Bin"
DataValueField
=
"Bin"
>
</
telerik:RadDropDownList
>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
<%--<
telerik:GridButtonColumn
ConfirmText
=
"Delete this Line?"
ConfirmDialogType
=
"RadWindow"
ConfirmTitle
=
"Delete"
HeaderText
=
"Delete"
HeaderStyle-Width
=
"50px"
ButtonType
=
"ImageButton"
CommandName
=
"Delete"
Text
=
"Delete"
UniqueName
=
"DeleteColumn"
ImageUrl
=
"Images/16x16_remove.png"
>
</
telerik:GridButtonColumn
>--%>
<
telerik:GridButtonColumn
ConfirmText
=
"Delete this Line?"
ConfirmDialogType
=
"RadWindow"
ConfirmTitle
=
"Delete"
HeaderText
=
"Delete"
HeaderStyle-Width
=
"50px"
ButtonType
=
"ImageButton"
CommandName
=
"Delete"
Text
=
"Delete"
UniqueName
=
"DeleteColumn"
>
</
telerik:GridButtonColumn
>
</
Columns
>
</
MasterTableView
>
<
ExportSettings
ExportOnlyData
=
"false"
IgnorePaging
=
"true"
OpenInNewWindow
=
"true"
>
<
Csv
EncloseDataWithQuotes
=
"true"
ColumnDelimiter
=
"Comma"
/>
<
Excel
Format
=
"Biff"
/>
</
ExportSettings
>
<
ClientSettings
AllowKeyboardNavigation
=
"false"
AllowColumnsReorder
=
"false"
>
<
ClientEvents
OnBatchEditSetCellValue
=
"CellValueChanged"
OnBatchEditCellValueChanging
=
"BatchEditCellValueChanging"
OnBatchEditOpened
=
"BatchEditOpened"
OnBatchEditOpening
=
"BatchEditOpening"
OnBatchEditClosed
=
"BatchEditClosed"
OnRowDeleted
=
"RowDeleted"
/>
</
ClientSettings
>
</
telerik:RadGrid
>
<
br
/>
<
telerik:RadButton
ID
=
"btnSubmitReceipt"
runat
=
"server"
Text
=
"Submit PO Receipt"
OnClientClicked
=
"saveEditRows"
ToolTip
=
"Submit PO Receipt"
AutoPostBack
=
"false"
>
</
telerik:RadButton
>
<
telerik:RadAjaxLoadingPanel
runat
=
"server"
ID
=
"RadAjaxLoadingPanel1"
></
telerik:RadAjaxLoadingPanel
>
<
telerik:RadScriptManager
runat
=
"server"
ID
=
"RadScriptManager1"
/>
<
telerik:RadSkinManager
ID
=
"RadSkinManager1"
runat
=
"server"
ShowChooser
=
"true"
Skin
=
"WebBlue"
/>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
EnableAJAX
=
"true"
runat
=
"server"
OnAjaxRequest
=
"RadAjaxManager1_AjaxRequest"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"RadAjaxManager1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"rgPOLines"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"rgMfgLot"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
<
telerik:AjaxSetting
AjaxControlID
=
"rgMfgLot"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"rgMfgLot"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
telerik:RadFormDecorator
ID
=
"RadFormDecorator1"
runat
=
"server"
DecorationZoneID
=
"demo"
DecoratedControls
=
"All"
EnableRoundedCorners
=
"false"
/>
Hi All,
I am creating two dialogs: a parent and its child.
Parent has size 1082x630
Child has size 1500x900
On parent dialog, when I click on button "Show Child Dialog", its child will be shown.
The problem here is the size of child dialog larger than its parent. So, I want to resize the size of child dialog and show it in the center of its parent dialog.
And here is my code in Javascript that I use for resizing child dialog manually. To center child dialog, I also use childRadWindow.left and BUT, it does not work as my expected. The child dialog does not place in the center of its parent.
Please reference my expected, actual images and my code to get the problem.
My expected result: https://drive.google.com/file/d/0B7thkzS9kbhkY1ZMcW9LNGdCZ0E/view?usp=sharing
Actual result: https://drive.google.com/file/d/0B7thkzS9kbhkLU9nLVA2LVU0TDg/view?usp=sharing
Here is my code to resize child dialog manually. I put it on child dialog *.
<script type=
"text/javascript"
>
$(document).ready(
function
() {
resizeRWndDialog();
});
</script>
function
resizeRWndDialog() {
var
radWindows = [];
var
radWindow = GetRadWindow();
while
(
true
) {
if
(radWindow != undefined && radWindow !=
null
) {
radWindows.push(radWindow._popupElement);
radWindow = radWindow.BrowserWindow.GetRadWindow();
}
else
{
break
;
}
}
var
numsOfRadWindow = radWindows.length - 1;
if
(numsOfRadWindow > 0) {
for
(
var
i = numsOfRadWindow; i > 0; i--) {
var
parentWindow = radWindows[i];
var
parentWidth = parentWindow.clientWidth;
//parentWidth =1082
var
parentHeight = parentWindow.clientHeight;
//parentHeight = 630
var
chidWindow = radWindows[i - 1];
var
childWidth = chidWindow.clientWidth;
//childWidth = 1500
var
childHeight = chidWindow.clientHeight;
//childHeight = 900
var
rateMinWidth = 0,
rateMinHeight = 0,
rateMaxWidth = 0,
rateMaxHeight = 0;
if
(chidWindow.style.minWidth !=
""
) {
rateMinWidth = parseInt(chidWindow.style.minWidth) / childWidth;
}
if
(chidWindow.style.minHeight !=
""
) {
rateMinHeight = parseInt(chidWindow.style.minHeight) / childHeight;
}
if
(chidWindow.style.maxWidth !=
""
) {
rateMaxWidth = parseInt(chidWindow.style.maxWidth) / childWidth;
}
if
(chidWindow.style.maxHeight !=
""
) {
rateMaxHeight = parseInt(chidWindow.style.maxHeight) / childHeight;
}
if
((parentWidth - 40) > 0 && childWidth >= parentWidth - 40) {
childWidth = parentWidth - 40;
//parentWidth = 1082, childWidth = 1042
}
if
((parentHeight - 80) > 0 && childHeight >= parentHeight - 80) {
childHeight = parentHeight - 80;
//parentHeight = 630, childHeight = 550
}
setSizeRWndDialog(chidWindow.getElementsByClassName(
"rwTable"
)[0], rateMinWidth * childWidth, rateMinHeight * childHeight, rateMaxWidth * childWidth, rateMaxHeight * childHeight, childWidth, childHeight);
setSizeRWndDialog(chidWindow, rateMinWidth * childWidth, rateMinHeight * childHeight, rateMaxWidth * childWidth, rateMaxHeight * childHeight, childWidth, childHeight);
chidWindow.left = Math.round((parentWidth - childWidth) / 2, 0) +
"px"
;
chidWindow.top = Math.round((parentHeight - childHeight) / 2, 0) +
"px"
;
chidWindow.focus();
radWindows[i - 1] = chidWindow;
}
}
}
function
setSizeRWndDialog(element, minWidth, minHeight, maxWidth, maxHeight, width, height) {
if
(minWidth != 0 && minHeight != 0) {
element.style.minWidth = minWidth +
"px"
;
element.style.minHeight = minHeight +
"px"
;
}
if
(maxWidth != 0 && maxHeight != 0) {
element.style.maxWidth = maxWidth +
"px"
;
element.style.maxHeight = maxHeight +
"px"
;
}
else
{
element.style.maxWidth = width +
"px"
;
element.style.maxHeight = height +
"px"
;
}
element.style.width = width +
"px"
;
element.style.height = height +
"px"
;
}
I'm having problems with my combobox, when i press button (letter for element) I seek that corresponding element will highlight, which it does, however it is out of bounds.
I've attached picture, the hidden element is next after the last one visible that got highlighted, which is fine, however the user has to scroll a little bit more to actually see the element to which he was redirected to, how can I fix this?
Input = new RadComboBox { ID = "input_" + param.Name, EnableEmbeddedSkins = false, Skin = "Tabbed", AutoPostBack = true, Width = new Unit (100,UnitType.Percentage), Height = new Unit(100, UnitType.Percentage), DropDownCssClass = "Ellipsis", CssClass = "FullLength", MaxHeight = new Unit(220, UnitType.Pixel), CheckBoxes = Multiselect, EnableCheckAllItemsCheckBox = Multiselect //,ItemTemplate = CreateItemTemplate() }; Input.Style.Add ("margin-top", "5px"); Input.Style.Add ("margin-bottom", "5px"); if (!Multiselect) Input.SelectedIndexChanged += new RadComboBoxSelectedIndexChangedEventHandler(input_SelectedIndexChanged); else { Input.ItemChecked += new RadComboBoxItemEventHandler(Input_ItemChecked); Input.CheckAllCheck += new RadComboBoxCheckAllCheckEventHandler(Input_CheckAllCheck); }
Ideally, i would like to export my grids to one file, but seems i will need to create wrapper grid around my grids and it would not fit my scenario. Second option for is to create two separate export files. However, i am getting only second file saved. Here is my approach:
Export(grid, subName, strCenterHeader, alternateText)
Export(grid2, subName2, strCenterHeader2, alternateText)
Protected Sub Export(ByVal grid As RadGrid, _
ByVal subName As String, _
ByVal strCenterHeader As String, _
ByVal alternateText As String)
grid.ExportSettings.FileName = TredisSession.Current.Project.ProjectName.Replace(" ", "_") & "_" & subName & "_Data"
grid.ExportSettings.ExportOnlyData = True
grid.ExportSettings.OpenInNewWindow = True
grid.ExportSettings.UseItemStyles = True
Select Case alternateText
Case "HTML"
grid.ExportSettings.Excel.Format = GridExcelExportFormat.Html
grid.MasterTableView.ExportToExcel()
Case "ExcelML"
grid.ExportSettings.Excel.Format = DirectCast([Enum].Parse(GetType(GridExcelExportFormat), alternateText), GridExcelExportFormat)
grid.MasterTableView.ExportToExcel()
Case "Xlsx"
grid.ExportSettings.Excel.Format = DirectCast([Enum].Parse(GetType(GridExcelExportFormat), alternateText), GridExcelExportFormat)
grid.MasterTableView.ExportToExcel()
Case "PDF"
Dim footerMiddleCell As String = "<?page-number?>"
' to get lanscape orientation
grid.ExportSettings.Pdf.PageHeight = Unit.Parse("200mm")
grid.ExportSettings.Pdf.PageWidth = Unit.Parse("500mm")
grid.ExportSettings.Pdf.PageHeader.MiddleCell.Text = strCenterHeader
grid.ExportSettings.Pdf.PageHeader.MiddleCell.TextAlign = GridPdfPageHeaderFooterCell.CellTextAlign.Center
grid.ExportSettings.Pdf.PageFooter.MiddleCell.Text = footerMiddleCell
grid.ExportSettings.Pdf.PageFooter.MiddleCell.TextAlign = GridPdfPageHeaderFooterCell.CellTextAlign.Center
grid.MasterTableView.ExportToPdf()
Case "Doc"
grid.MasterTableView.ExportToWord()
Case "CSV"
grid.MasterTableView.ExportToCSV()
End Select
End Sub
Thank you
Hello,
I've updated the telerik version to the new Q3 2015 version to get the functionality of resizing columns inside the gantt. But then I had to recognize that if I set the width of my GanttBoundColumn in percent it is completely ignored.
Futhermore if a full postback is performed the width of the columns is not stored and is set back to the default width. Is there a way to accomplish saving the width of the column if a full postback is performed?
Thanks.
Regards,
Felix