Hi,
Pretty new to telerik. I have a radgrid which has a RadMaskedTextBox child control. I have been able to use <ClientEvents OnLoad to get the value typed into the RadMaskedTextBox using the onchanged event using clientside javascript . I also need to pass other values from the Radgrid's datasource which is a datatable.
I am trying to get to the radgrid datasource inside of the RadMaskedTextBox declaration using server tags and the clientid. I'm not sure this is possible or if I need to get the values in the javascript code. Here is what I am trying to do and doesn't work. It isn't complete but it's clear that what I've done so far isn't working. The cboCBH.ClientID is not returning a control but the generated RadMaskedTextBox (seen in view source) code shows "cboCBH.ClientID " and not an actual controlid. The demo.getInputValue works as long as I don't pass the $find and pass nothing. I'm trying to pass the radgrid datasource. Here's what I have so far.
<telerik:RadScriptBlock runat="server" ID="whocares"><telerik:RadMaskedTextBox ID="cboCBH" runat="server" Width="80px" Mask="##.##" onchange="demo.getInputValue($find('<%=cboCBH.ClientID %>').NamingContainer)"> <ClientEvents OnLoad="demo.load" /></telerik:RadMaskedTextBox></telerik:RadScriptBlock>
Here's the "onload code":
; (function () {
var demoInputControl;
var id;
var demo = window.demo = {};
function getServerId(clientId) {
return clientId.indexOf("_") > -1 ? clientId.replace(/.+_([a-zA-Z0-9]+)$/m, "$1") : clientId;
}
demo.load = function (sender, args) {
demoInputControl = sender;
id = getServerId(demoInputControl.get_id()) + " ";
};
demo.getDemoInputControl = function () {
return demoInputControl;
}
demo.setInputValue = function (id2) {
var valueTbx = $telerik.findControl(document.forms[0], id2);
demoInputControl.set_value(valueTbx.get_value());
}
demo.getInputValue = function (other) {
alert(id + "value is: " + demoInputControl.get_value());
alert(other);
}
demo.setEmptyMessage = function (id2) {
var valueTbx = $telerik.findControl(document.forms[0], id2);
demoInputControl.set_emptyMessage(valueTbx.get_value());
}
demo.getEmptyMessage = function () {
alert(id + "EmptyMessage is: " + demoInputControl.get_emptyMessage());
}
demo.setMaxValue = function (id2) {
var valueTbx = $telerik.findControl(document.forms[0], id2);
demoInputControl.set_maxValue(valueTbx.get_value());
demoInputControl.clear();
}
demo.getMaxValue = function () {
alert(id + "MaxValue is: " + demoInputControl.get_maxValue());
}
demo.showNumberFormat = function () {
var numberFormat = demoInputControl.get_numberFormat();
var output = "";
for (var prop in numberFormat) {
output += prop + ": " + numberFormat[prop] + "\n";
}
alert(output);
}
})();
Will this work? Or do I need to get the radgrid datasource from inside a javascript function?


| <telerik:RadListView ID="lvCalendars" runat="server" AllowPaging="True" DataKeyNames="Listing_ID" |
| DataSourceID="dsListing" OnItemDataBound="lvCalendars_ItemDataBound"> |
| <LayoutTemplate> |
| <telerik:RadDataPager ID="dpTopPager" runat="server" PagedControlID="lvCalendars" |
| PageSize="7" Skin="Office2007"> |
| <Fields> |
| <telerik:RadDataPagerButtonField FieldType="Numeric" PageButtonCount="10" /> |
| </Fields> |
| </telerik:RadDataPager> |
| <table cellpadding="0" cellspacing="0" width="100%" class="bgStandardMedium"> |
| <tr id="itemPlaceholder" runat="server"> |
| </tr> |
| </table> |
| <telerik:RadDataPager ID="dpBottomPager" runat="server" PagedControlID="lvCalendars" |
| PageSize="7" Skin="Office2007"> |
| <Fields> |
| <telerik:RadDataPagerButtonField FieldType="Numeric" PageButtonCount="10" /> |
| </Fields> |
| </telerik:RadDataPager> |
| </LayoutTemplate> |
| <ItemTemplate> |
| <tr> |
| <td class="bgStandardDark propertySection"> |
| <asp:Image ID="imgProperty" runat="server" Width="130px" Height="90px" AlternateText='<%#Eval("Name") %>' |
| ToolTip='<%#Eval("Name") %>' /> |
| <span class="propertyName"> |
| <%#DataBinder.Eval(Container, "DataItem.Name").ToString() %> |
| </span> |
| <asp:HyperLink ID="lnkBookProperty" runat="server" CssClass="buttonStandard" Text="<span>Book Property</span>" |
| Width="170px"></asp:HyperLink> |
| <br /> |
| <br /> |
| <asp:LinkButton ID="lnkPrintCalendar" runat="server" CssClass="buttonStandard" Width="170px" |
| Text="<span>Print Reservation List</span>"></asp:LinkButton> |
| </td> |
| <td class="calendarSection"> |
| <telerik:RadAjaxPanel ID="apBookingCalendar" runat="server" LoadingPanelID="LoadingPanel1"> |
| <telerik:RadCalendar ID="calBooking" runat="server" MultiViewColumns="4" MultiViewRows="1" |
| EnableMultiSelect="false" ShowRowHeaders="False" ShowOtherMonthsDays="False" |
| AutoPostBack="True" CssClass="bookingCalendar" OnDefaultViewChanged="calBooking_DefaultViewChanged"> |
| <CalendarTableStyle Width="175px" Height="196px" /> |
| </telerik:RadCalendar> |
| <div class="button-row" style="text-align: center;"> |
| <asp:LinkButton ID="lnkbtnViewFullYear" runat="server" CssClass="buttonStandard" |
| Text="<span>View Full Year</span>" Width="150px" /> |
| </div> |
| </telerik:RadAjaxPanel> |
| </li> |
| </td> |
| </ItemTemplate> |
| </telerik:RadListView> |
| protected void calBooking_DefaultViewChanged(Object sender, Telerik.Web.UI.Calendar.DefaultViewChangedEventArgs e) |
| { |
| try |
| { |
| // get calendar |
| RadCalendar calBooking = (RadCalendar)sender; |
| // get RadListViewDataItem |
| RadListViewDataItem dtItem = (RadListViewDataItem)calBooking.Parent.Parent; |
| // hold Sub Listing |
| SubListing subListing = new SubListing(); |
| // hold Listing |
| Listing listing; |
| // check if data item is a listing |
| if (dtItem.DataItem is Listing) |
| { |
| // get listing |
| listing = (Listing)dtItem.DataItem; |
| } |
| else |
| { |
| // get sub listing |
| subListing = (SubListing)dtItem.DataItem; |
| // get listing |
| listing = subListing.Listing; |
| } |
| //...calendar setup code follows |
| } |
| catch (Exception ex) |
| { |
| } |
| } |

Hi,
I have found a issue when a user opens a link by rightclick in the editor and then "Open Link" due to our customformated links with $* characters.
I am trying to find a way to replace this characters before the link is opened.
Successfully catched the event in OnClientCommandExecuting but I guess it is to late there..
function OnClientCommandExecuting(editor, args) { if (args.get_name() == "OpenLink") { }}
Hi, I'm trying to pass a parameter in the GridButtonColumn's CommandArgument and CommandName field. From what I can see in the examples, I should be able to just put in the field, like this.... CommandArgument="Part_id", however, it does not seem to pass the param back to the code behind. I'm using the RadGrid1.ItemCommand event handler and it kicks off that event just fine. Here is the button and the code behind and the error....
<telerik:GridButtonColumn ButtonType="LinkButton" HeaderText="Additional<br />Process" CommandArgument="Part_id" CommandName="Part_id" Text="View" UniqueName="lnkPartID" DataType="System.Int32"></telerik:GridButtonColumn>
Private Sub RadGrid1_ItemCommand(sender As Object, e As GridCommandEventArgs) Handles RadGrid1.ItemCommand
Dim partID As Integer = CInt(e.CommandArgument)
code....code.... .code....
End Sub
Error...
Input string was not in a correct format...
The value is an integer.
Many thanks,
-Erich Neubert
Hi,
I have a control (PDFViewer) that make callbacks on save, download, etc.., and i manage this events in server side.
The control in isolation works well, I receive the events on the server. But when I place it inside a RadWindow or a RadSplitter I stop receiving the events on the server.
Any idea what the problem might be? Thanks!

I would like users to land on a particular step based on a parameter passed to the page. I would like to hide all previous steps when this occurs. I am able to loop through the existing steps in the wizard, determine if the step is before the "LandingStep", and hide the previous step. I then set the "LandingStep"... StepType to "Start".
This all works, however setting the previous step's visible property to "False" does not hide them. I would think if a step has Visible="False" set it would not render. But the steps still show up. I have tried to hide the steps in Page Load as well as Wizard_PreRender.

I have created a custom button to set/change a file tags (this would be a DB column I will handle). I am trying to call/open the new folder dialog and use it's textbox to set or modify a file tags, my code is:
<telerik:RadFileExplorer runat="server" ID="telerikFileExplorer" RenderMode="Lightweight" Width="650px" Height="480px"
OnExplorerPopulated="telerikFileExplorer_ExplorerPopulated" OnClientLoad="fileExplorerInit" OnClientItemSelected="fileExplorerItemSelected" OnClientFolderChange="fileExplorerFolderChanged">
<Configuration AllowFileExtensionRename="false" AllowMultipleSelection="true" />
</telerik:RadFileExplorer>
<script type="text/javascript">
function fileExplorerInit(fileExplorer, args) {
var toolbar = fileExplorer.get_toolbar();
toolbar.add_buttonClicked(toolbarClicked);
setButtonEnableState(fileExplorer, '', 'ChangeTags');
}
function toolbarClicked(toolbar, args) {
var buttonValue = args.get_item().get_value();
if (buttonValue == 'ChangeTags') {
//Call open NewFolder dialog and post to update new value;
}
}
function fileExplorerItemSelected(fileExplorer, args) {
setButtonEnableState(fileExplorer, args.get_item().get_extension(), 'ChangeTags');
}
function fileExplorerFolderChanged(fileExplorer, args) {
setButtonEnableState(fileExplorer, args.get_item().get_extension(), 'ChangeTags');
}
function setButtonEnableState(fileExplorer, extension, command) {
var button = fileExplorer.get_toolbar().findItemByValue(command);
button.set_enabled(!(typeof (extension) == 'undefined' || extension == null || extension == ''));
}
</script>

.RadSiteMap.RadSiteMap_rtl .rsmLevel .rsmNodeLines .rsmItem {padding-right:.83333em;padding-left:0;background:url(WebResource.axd?d=f48wGjvl_0dfjPmNr9tLOFvnMRB1CLi8n-kjtv2310YCqz9WudUCfxBHSq03EKuBio5VhswoV9GN6Msark-MNoNqaK7fwka8kcEAy9exFY5jI8t7WdZDzHk_lf7RbccUA8wjhaQPz1iF6FN7gH24LNwpnC6TMkNoLUu3voY_UExZqI460&t=635496800280000000) right -2px no-repeat;}
RadMenu inside a ListView Item changes popup position after deleting or adding a new ListView Item. It seems as if RadMenu save its old x,y before ListView update.
It works fine only after page refresh but I can't do this not to lose Current Item and Current Page position and layout,
I there any method to let RadMenu recognize Page Length / ListView length changes?
Thanks
