<asp:LinkButton ID="lbAddPhone" runat="server" onclientclick="javascript:InsertPhone(); return false;">+ Phone/Email</asp:LinkButton> |
function InsertPhone() { |
var hid = document.getElementById("<%= hidContactId.ClientID %>"); |
var oWnd = $find("<%= wndAddPhone.ClientID %>"); |
oWnd.setUrl("popup_addcontact.aspx?which=3&id=" + hid.value); |
oWnd.show(); |
} |
protected void btnPhoneSave_Click(object sender, EventArgs e) |
{ |
string closingscript = "closeWin();"; |
ScriptManager.RegisterStartupScript(this, this.GetType(), "closeWin", closingscript, true); |
} |
function closeWin() { |
var wind = GetRadWindow(); |
wind.close(); |
} |
function GetRadWindow() { |
var oWindow = null; |
if (window.radWindow) { |
oWindow = window.radWindow; |
} |
else if (window.frameElement.radWindow) { |
oWindow = window.frameElement.radWindow; |
} |
return oWindow; |
} |
<
telerik:RadAsyncUpload
runat
=
"server"
ID
=
"radUpload"
MultipleFileSelection
=
"Automatic"
ManualUpload
=
"true"
HideFileInput
=
"true"
Localization-Select
=
"Select files ..."
EnableFileInputSkinning
=
"true"
OnClientFilesSelected
=
"onFilesSelected"
></
telerik:RadAsyncUpload
>
Hi,
Based on above code, just want to ask how to loop through selected files to get the row and size? Please take note that ManualUpload is set to true.
Basically I want to have below piece of code (but this was created for OnClientFileSelected)
args.get_fileInputField().files[0].size;
var row = args.get_row();
$(row).addClass("file-row");
Hi there , I read many articles on ticker , some of them are Demo1 and Demo2 , code is shown in aspx format how to get the same code in cshtml format .
I also tried only telerik tags in Razor views but still no working ,
I've installed tekerik trial version. does that make any difference
<telerik:RadTicker ID="RadTicker1" AutoStart="true" Width="300px">
<items>
<telerik:RadTickerItem runat="server" ID="RadTickerItem1"
Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad
minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in
voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur
sint occaecat
cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.">
</telerik:RadTickerItem>
</items>
</telerik:RadTicker>
Hi
I've got 3 RadHtmlCharts one below the other. They have different value range f.e. Chart1 from -9 to 5 and Chart2 from -100000 to + 100000. That causes the situation shown on picture, that they are placed not in line. I've already tried to adjust it in JS, but didn't manage to.
My code (I've tried many combinations):
var chart = $find("<%=timeChart.ClientID%>");
chart.get_kendoWidget()._plotArea.axisY.box.expand(50,50);
chart.get_kendoWidget()._plotArea.axisY.box.pad(50);
chart.get_kendoWidget()._plotArea.axisY.box.x2 = 150;
chart.repaint();
chart.get_kendoWidget().redraw();
chart.get_kendoWidget().refresh();
None of this have worked.
I'm looking forward for your help
Greets,
Maciek
Hi,
I have a problem with RadDatePicker controls in Asp.Net.
I am dynamically creating 2 RadDatePicker controls at runtime and I want to apply CompareValidator to check if the 'From Date' is less than the 'To Date'. The controls are dynamically created so i have set the AutoPostBack = false. With that the controls are not throwing the validation if i choose the wrong dates.
The condition is:
Date Validation checks - From Date <= To date
Here is my code:
for (int j = 0; j < slistArray.Length; j++)
{
int counter = 0;
int DateRangeFound = 0;
switch (QuestionType)
{
case "DateRange":
if (QuestionName == "DateFrom")
{
RadDatePicker rdpDateFrom = new RadDatePicker();
rdpDateFrom.CssClass = "form-control form-control-item";
rdpDateFrom.ID = "rdpDateFrom" + j.ToString() + "-" + counter;
rdpDateFrom.AutoPostBack = false;
rdpDateFrom.DatePopupButton.Visible = true;
rdpDateFrom.ShowPopupOnFocus = true;
rdpDateFrom.EnableScreenBoundaryDetection = true;
rdpDateFrom.MaxDate = DateTime.Now;
txtC1.Controls.Add(rdpDateFrom);
++DateRangeFound;
}
else if (QuestionName == "DateTo")
{
RadDatePicker rdpDateTo = new RadDatePicker();
rdpDateTo.CssClass = "form-control form-control-item";
rdpDateTo.ID = "rdpDateTo" + j.ToString() + "-" + (counter - 1);
rdpDateTo.AutoPostBack = false;
rdpDateTo.DatePopupButton.Visible = true;
rdpDateTo.ShowPopupOnFocus = true;
rdpDateTo.EnableScreenBoundaryDetection = true;
rdpDateTo.MaxDate = DateTime.Now;
txtC1.Controls.Add(rdpDateTo);
++DateRangeFound;
}
if (DateRangeFound > 1)
{
CompareValidator cvdpDate = new CompareValidator();
cvdpDate.ID = "cvdpDate" + j.ToString() + "-" + counter;
cvdpDate.ControlToCompare = "rdpDateFrom" + j.ToString() + "-" + (counter - 1);
cvdpDate.ControlToValidate = "rdpDateTo" + j.ToString() + "-" + (counter - 1);
cvdpDate.Operator = ValidationCompareOperator.GreaterThanEqual;
cvdpDate.Type = ValidationDataType.Date;
cvdpDate.Text = "*";
cvdpDate.ForeColor = Color.Red;
cvdpDate.ErrorMessage = "End date must be equal or greater than start date - please correct dates.";
txtC1.Controls.Add(cvdpDate);
}
break;
}
panelBody.Controls.Add(txtC1);
counter++;
}
Any suggestions for the client side jquery validation will also be helpful.
Thank you.
I am currently attempting to add custom nodes to the file explorer view, with the selection of the lowest level of each node displaying the contents of multiple listed directories (create nodes with custom names as their own 'custom trees' where the contents of the corresponding listview would include those of directory1 + 2 + 3 etc.) Here is what I have so far, and I am looking for the equivalent value of the 'viewpath' from the main fileexplorer object for each individual node.
protected void BindDataTable()
{
RadTreeNode temp_node;
DataTable node_template = CreateDirectoryTable();
foreach (DataRow row in node_template.Rows)
{
temp_node = new RadTreeNode();
temp_node.Text = (string)row[1];
temp_node.Value = (string)row[2];
FileExplorerBase.TreeView.Nodes.Add(temp_node);
}
}
Is it a simple property in the node object? Because I cannot seem to find it. Or is this functionality present in the treeview object directly?
<
telerik:RadGrid ID="RadGrid1" runat="server">
<HeaderContextMenu EnableTheming="True">
<CollapseAnimation Type="OutQuint" Duration="200">
</CollapseAnimation>
</HeaderContextMenu>
<MasterTableView CommandItemDisplay="Top" DataKeyNames="Contact_ID" Width="100%"
ExpandCollapseColumn-Display="true" HierarchyDefaultExpanded="false"
EditMode="EditForms" AllowPaging="True" PageSize="5">
<ItemTemplate>
<span lang="en-us">ITEM TEMPLATE</span>
</ItemTemplate>
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
<EditFormSettings EditFormType="Template">
<FormTemplate>
<asp:DropDownList ID="cboCountry" runat="server" Enabled="false">
</asp:DropDownList>
<asp:Button runat="server" ID="butCountry" text="change" CausesValidation="False"
CommandName="ChangeCountry" />
<br />
<br />
</FormTemplate>
</EditFormSettings>
</MasterTableView>
<FilterMenu EnableTheming="True">
<CollapseAnimation Type="OutQuint" Duration="200">
</CollapseAnimation>
</FilterMenu>
</telerik:RadGrid>
Private Sub RadGrid1_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.ItemCommand
Dim strCommand As String
strCommand = e.CommandName.ToUpper
Select
Case strCommand
Case Is = "CHANGECOUNTRY"
Dim editItem As GridDataItem = CType(e.Item, GridDataItem)
Dim
ContactCombo As DropDownList = CType(editItem.FindControl("cboCountry"), DropDownList)
ContactCombo.Enable = "True"
End Select
End Sub