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
Hello,
quite a while ago a topic came up that the DisplayDeleteConfirmation is not working properly if a dependency is about to be deleted when a full post back is performed. The popup opens and then closes immediatly. I wonder by when this bug will be fixed because for me it is an quite important functionality that the user is asked again if he really wants to delete the task or the dependency.
Thanks in advance.
Regards,
Felix
Using any data source, I can create the necessary hierarchy for a menu system using the RadNavigation. However, I have no examples or knowledge on how to activate associated URLs for each of the nodes.
If JavaScript is required, please show by example.
Required Info
My HTML
<
telerik:RadNavigation
runat
=
"server"
ID
=
"RadMenu3"
Skin
=
"BlackMetroTouch"
DataSourceID
=
"XmlDataSource1"
DataTextField
=
"Text"
DataNavigateUrlField
=
"Url"
>
</
telerik:RadNavigation
>
<
asp:XmlDataSource
ID
=
"XmlDataSource1"
runat
=
"server"
DataFile
=
"~/App_Data/SiteNavigation.xml"
XPath
=
"/SiteNavigation/Item"
>
</
asp:XmlDataSource
>
XML SiteNavigation (abbreviated)
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
SiteNavigation
>
<
Item
Url
=
"#"
Text
=
"Surveying the Past"
>
<
Item
Url
=
"#"
Text
=
"Timeline"
/>
<
Item
Url
=
"#"
Text
=
"Blog"
/>
<
Item
Url
=
"#"
Text
=
"Discussion"
/>
</
Item
>
<
Item
Url
=
"#"
Text
=
"Experiencing the Present"
>
<
Item
Url
=
"#"
Text
=
"Timeline"
/>
<
Item
Url
=
"#"
Text
=
"Blog"
/>
<
Item
Url
=
"#"
Text
=
"Discussion"
/>
</
Item
>
</
SiteNavigation
>
ERROR: Page Won't Load
System.Web.UI.WebControls.XmlHierarchyData' does not contain a property with the name 'Url'