Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
119 views
Hello ,
im Trying to use RadLightBox to show some pictures for different items so on click i need to change hidden field value and rebind the list .
so how can i rebind the light box from client side.

JS Code
function OpenImages(ItemID) {
$('#<%= hdnItemID.ClientID%>').val(ItemID);
//alert(ItemID);

var rlbItemImages = $find('<%= rlbItemImages.ClientID%>');
rlbItemImages.get_items();
//rlbItemImages.DataBind();
rlbItemImages.show();
}


RadLightBox Code
<telerik:RadLightBox ID="rlbItemImages" runat="server" DataSourceID="odsItemImages" ShowLoadingPanel="true"
EnableAjaxSkinRendering="true" RegisterWithScriptManager="true"
DataImageUrlField="ItemPath" DataDescriptionField="ItemPath" DataTitleField="ItemPath">
</telerik:RadLightBox>


Object DataSource Code

<asp:ObjectDataSource ID="odsItemImages" runat="server" SelectMethod="QueryDatabase" TypeName="AdoClass.DBitemsImagesSP" OldValuesParameterFormatString="original_{0}">
<SelectParameters>
<asp:Parameter DefaultValue="1" Name="QueryType" Type="Object" />
<asp:Parameter Name="ID" Type="String" />
<asp:ControlParameter ControlID="hdnItemID" Name="ItemID" PropertyName="Value" Type="String" />
<asp:Parameter DefaultValue="" Name="ItemImage" Type="Object" />
<asp:Parameter Name="ItemPath" Type="String" />
<asp:Parameter DefaultValue="rtvImagesPaths" Name="Operation" Type="String" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:HiddenField runat="server" ID="hdnItemID" />

Regards ,

Maria Ilieva
Telerik team
 answered on 28 Jan 2015
1 answer
174 views
I have a RadNumericTextBox defined as follows:

<telerik:RadNumericTextBox ID="txtMaxCost" Runat="server" MaxLength="14" Width="250px"  Type="Currency" SkinID="OverrideRadDefaultSkinWithNonExistantSkin" AutoPostBack="true" Enabled="true" AllowOutOfRangeAutoCorrect="false">
<NumberFormat DecimalDigits="2" KeepNotRoundedValue="False"/>
</telerik:RadNumericTextBox>

When users enter a number that's out of range (e.g., 77777777777777), the text turns red and a yield sign appears in the control when focus is lost.  When the user saves the object, the control's value is set to null and therefore, our validation isn't executed on the code-behind.

I checked out the properties of the control and see there's an .Invalid property, but when I check it's state in the code, it's set to false.

How can I check to see that the control is in an invalid state programmatically?  
Viktor Tachev
Telerik team
 answered on 28 Jan 2015
5 answers
1.2K+ views
How to set the selected date of raddatepicker to asp parameter of an sql data source?
Kostadin
Telerik team
 answered on 28 Jan 2015
1 answer
71 views
I was trying to access data from AutoCompleteBox from the Private Sub RadAutoCompleteBox1_TextChanged(sender As Object, e As AutoCompleteTextEventArgs) Handles RadAutoCompleteBox1.TextChanged event.
I can get the text but I can't seem to get the DataValueField or any of the Data stored in the template fields (i.e., <%# DataBinder.Eval(Container.DataItem, "EMPTIN")%>)


RadAutoCompleteBox1.DataTextField = "ComboName"
RadAutoCompleteBox1.DataValueField = "EmployerIdnt"

<telerik:RadAutoCompleteBox ID="RadAutoCompleteBox1" runat="server" Width="400px" DropDownWidth="400px" EmptyMessage="Enter TIN or Name" TextSettings-SelectionMode="Single" inputtype="Text" >

<DropDownItemTemplate>

<table cellpadding="0" cellspacing="0">
<tr>
<td style="width: 25%">
Name:
</td>
<td style="width: 75%">
<%# DataBinder.Eval(Container.DataItem, "EMPNAME")%>
</td>
</tr>
<tr>
<td>
TIN:
</td>
<td>
<%# DataBinder.Eval(Container.DataItem, "EMPTIN")%>
</td>
</tr>
<tr>
<td>
City:
</td>
<td>
<%# DataBinder.Eval(Container.DataItem, "EMPCITY")%>
</td>
</tr>
<tr><td colspan="2"><hr /></td></tr>
</table>
</DropDownItemTemplate>

</telerik:RadAutoCompleteBox>

Thanks for any help
Henry
Boyan Dimitrov
Telerik team
 answered on 28 Jan 2015
4 answers
105 views
Hello everyone,
I'm configuring the RadEditor and I can't do these two things:
1) Node Inspector: customize the list of CSS classes visible in the dropdown "CLASSNAME" or hide the dropdown "CLASSNAME"
2) Toolbar: create a custom button to change the background color of the text

Thanks
Ianko
Telerik team
 answered on 28 Jan 2015
8 answers
2.2K+ views
i have RadTabStrip, with General and other tabs. there are input fields and save button on the general tab.

the purpose of the code bellow is to enable the general save button only when the user changed a value on general tab and don't allow him to continue to another tab if there is unsaved data.
the accomplish it:
1) $('#MainContent_RadPageViewGeneral :input').change(...
using this event I identify changes in any input and enable the save button
2) OnClientTabSelecting
using this event i identify when the user try to move to another tab, and block him in case he
didn't perform save (if the save button is enabled)

it's working beside in one case when the user enter the general tab, perform first change in a field and
then press on another tab without moving to another field inside this tab. in this case, change event isn't called, so the save
button didn't become enable and the user is allowed to move to another tab, even tough the field was modified.

how can i catch this event of modification on first time and pressing on another tab?

piece of code (.aspx):
<telerik:RadTabStrip ID="RadTabStripEditClaim" runat="server" MultiPageID="RadMultiPageEditClaim" SelectedIndex="0" OnClientTabSelecting="OnClientTabSelecting">
    <Tabs>
        <telerik:RadTab Text="General" Enabled="true" Value="General"></telerik:RadTab>
        <telerik:RadTab Text="Files" Enabled="true"  Value="Files"></telerik:RadTab>
    </Tabs>
</telerik:RadTabStrip>
  
<telerik:RadMultiPage ID="RadMultiPageEditClaim" runat="server" SelectedIndex="0" >
    <telerik:RadPageView ID="RadPageViewGeneral" runat="server">
        <fieldset>
        </fieldset>
    </telerik:RadPageView>
    ....
 </telerik:RadMultiPage>  
  
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <%--load jquery library--%>
   <script type="text/javascript">
        $(document).ready(function () {
  
            //disable button <Save and Continue Update>
            $("#MainContent_ButtonSubmit").attr('disabled', 'disabled');
            $("#MainContent_ButtonSubmit").css({
                "cursor": "default",
                //"box-shadow": "none"
            });
          
            //in case the user perform changes in General tab
            $('#MainContent_RadPageViewGeneral :input').change(function () {
                //disable button <Save and Continue Update>
                $("#MainContent_ButtonSubmit").removeAttr('disabled');
                $("#MainContent_ButtonSubmit").css({
                    "cursor": "pointer",
                    //    "box-shadow": "1px 0px 6px #333"
                });
            });
          
        });
                      
         //client-side event occurs when the user selects a tab, before the tab is selected.
        function OnClientTabSelecting(sender, eventArgs) {
          
            var pageView = multiPage.get_selectedPageView();
            if (pageView.get_id() == 'MainContent_RadPageViewGeneral')
            {
                //we are exiting General tab
                //check status of save button, if not disabled then we need to save
                var disabledValue = $("#MainContent_ButtonSubmit").attr('disabled');
                if (disabledValue != 'disabled')
                {
                    alert('You cannot continue without performing save');
                    eventArgs.set_cancel(true); //stop the selection
                    return;
                }
            }
          
            eventArgs.set_cancel(false);
        }
  
     
    </script>
</telerik:RadCodeBlock>
Viktor Tachev
Telerik team
 answered on 28 Jan 2015
1 answer
71 views
We're using a RadToolTip.

The Tooltip is broken since the 2014.3.x build, it will only show on the first item. The rest of the items is just a "title" attribute without html rendering.

  <telerik:RadToolTip ID="rttGroepen" runat="server" TargetControlID="pnl" RelativeTo="Element" Text='<%# Eval("Omschrijving").ToString()  %>'
                    RenderInPageRoot="true" EnableShadow="false" AutoCloseDelay="0" CssClass="tooltip"
                    EnableAjaxSkinRendering="False" EnableEmbeddedBaseStylesheet="True" EnableEmbeddedSkins="False"
                    VisibleOnPageLoad="False" ViewStateMode="Disabled" ShowDelay="0" Overlay="True"
                    Position="TopCenter" HideDelay="2500">
                </telerik:RadToolTip>


What's the work-around for this, and does this get fixed in the next build?
Marin Bratanov
Telerik team
 answered on 28 Jan 2015
7 answers
692 views

i have a radtextbox with TextMode="MultilLine".  i want to have a list of items in it but the problem is that in a radgrid, the textbox shrinks vertically and you have to use scroll bars to see all the content.

i have tried...

height="100%" on the textbox itself

(another recommendation)

 

OVERFLOW-X: visible; OVERFLOW-Y: visible; WORD-WRAP: break-word; HEIGHT: 100%;

 

 

 

on the CSS Class of the textbox

is there a quick and easy way to show all the vertical content and stretch the textbox to fix the vertical content?  if not in edit mode then at least in read-only mode?

if i can achieve the effect with another control or htmlcontrol, what would you recommend?

 

 

 

Galin
Telerik team
 answered on 28 Jan 2015
7 answers
1.1K+ views
error: Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3af01b1325-3d40-437a-8da2-df3d86714220%3aea597d4b%3ab25378d2

my web config below:

PLEASE HELP!  Been stuck for 2 days

<?xml version="1.0"?>
<!-- 
    Note: As an alternative to hand editing this file you can use the 
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in 
    machine.config.comments usually located in 
    \Windows\Microsoft.Net\Framework\v2.x\Config 
-->
<configuration>
  <appSettings configSource="appsettings.config" />
  <connectionStrings>

  </connectionStrings>
  <system.web>
    <sessionState timeout="120" />
    <!-- 
            Set compilation debug="true" to insert debugging 
            symbols into the compiled page. Because this 
            affects performance, set this value to true only 
            during development.
        -->
    <!--
      Set compilation debug="true" to insert debugging
      symbols into the compiled page. Because this
      affects performance, set this value to true only
      during development.
    -->
    <compilation debug="true" targetFramework="4.0">
      <assemblies>
        <add assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
      </assemblies>
    </compilation>
    <!--
            The <authentication> section enables configuration 
            of the security authentication mode used by 
            ASP.NET to identify an incoming user. 
        -->
    <authentication mode="Windows" />
    <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
      <controls>
        <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" />
      </controls>
    </pages>
    <httpHandlers>
      <add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false" />
      <add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false" />
      <add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false" />
      <add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false" />
      <add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode,runtimeVersionv2.0"/>
      <add verb="*" validate="false" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI" />
    </httpHandlers>
    <httpModules>
      <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" />
      <add name="RadCompression" type="Telerik.Web.UI.RadCompression" />
    </httpModules>
    <!--
            The <customErrors> section enables configuration 
            of what to do if/when an unhandled error occurs 
            during the execution of a request. Specifically, 
            it enables developers to configure html error pages 
            to be displayed in place of a error stack trace.

        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
        -->
    <customErrors mode="RemoteOnly" />
  </system.web>
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <modules runAllManagedModulesForAllRequests="true">
      <remove name="RadUploadModule" />
      <remove name="RadCompression" />
      <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" preCondition="integratedMode" />
      <add name="RadCompression" type="Telerik.Web.UI.RadCompression" preCondition="integratedMode" />
    </modules>
    <handlers>
      <remove name="ChartImage_axd" />
      <remove name="Telerik_Web_UI_SpellCheckHandler_axd" />
      <remove name="Telerik_Web_UI_DialogHandler_aspx" />
      <remove name="Telerik_RadUploadProgressHandler_ashx" />
      <remove name="Telerik_Web_UI_WebResource_axd" />
      <add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode" />
      <add name="Telerik_Web_UI_SpellCheckHandler_axd" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" preCondition="integratedMode" />
      <add name="Telerik_Web_UI_DialogHandler_aspx" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" preCondition="integratedMode" />
      <add name="Telerik_RadUploadProgressHandler_ashx" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" preCondition="integratedMode" />
      <add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode" />
    </handlers>
  </system.webServer>
  <system.web.extensions>
    <scripting>
      <webServices />
    </scripting>
  </system.web.extensions>
</configuration>
Peter Filipov
Telerik team
 answered on 28 Jan 2015
5 answers
148 views
Consider the following code...
<html xmlns="http://www.w3.org/1999/xhtml" > 
  <head runat="server"
    <title></title
  </head> 
  <body> 
    <form id="form1" runat="server"
      <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
      </telerik:RadScriptManager> 
      <telerik:RadToolBar ID="RadToolBar1" runat="server" style="width:100%;"
        <Items> 
          <telerik:RadToolBarSplitButton runat="server" EnableDefaultButton="true" DefaultButtonIndex="0" > 
            <Buttons> 
              <telerik:RadToolBarButton Value="first" ImageUrl="Images/ticket1-16.png" /> 
              <telerik:RadToolBarButton Value="second" ImageUrl="Images/tickets16.png"  /> 
            </Buttons> 
          </telerik:RadToolBarSplitButton> 
        </Items> 
      </telerik:RadToolBar> 
      <hr /> 
      <telerik:RadToolBar ID="RadToolBar2" runat="server" style="width:100%;"
        <Items> 
          <telerik:RadToolBarSplitButton runat="server" EnableDefaultButton="true" DefaultButtonIndex="0" > 
            <Buttons> 
              <telerik:RadToolBarButton Value="first" ImageUrl="Images/ticket1-16.png" Text="One Ticket" /> 
              <telerik:RadToolBarButton Value="second" ImageUrl="Images/tickets16.png" Text="Multiple Tickets" /> 
            </Buttons> 
          </telerik:RadToolBarSplitButton> 
        </Items> 
      </telerik:RadToolBar> 
    </form> 
  </body> 
</html> 

You can see that the only noteworthy difference between the two toolbars is that the first has no text associated with the buttons in the splitbutton control.

If you run this page, you will see that the top toolbar displays the splitbutton with just an image, which is what I want. Clicking on the down arrow, however, displays nothing.

Clicking on the down arrow of splitbutton on the 2nd toolbar displays the menu of buttons, which is what I want.

In short, what I'm looking for is a use the splitbutton so that it displays JUST the icon and the down arrow on the toolbar but BOTH the icon and the text in the dropdown menu.

Any clues?

--
Stuart

jlj30
Top achievements
Rank 2
 answered on 27 Jan 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?