Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
195 views
Hi,
I'm new to the Telerik controls and ASP.NET AJAX, so this may be a very elementary question, but I'm having a hard time figuring this out.

I'm trying to get grouping working, like here where you can drag and drop columns and then the grid reloads to group the results.
I also followed the tutorial in the pdf here, which ended up working without errors but it doesn't let me drag-and-drop.  Also, I can't even sort the data without reloading the page which I thought was something AJAX would fix as well..

So I guess my question is, how do I get AJAX working?  I'm not sure what code snippets would be helpful.  Here's my aspx page:

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<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" __designer:wfdid="w3"
    </telerik:RadScriptManager>&nbsp;  
<telerik:RadAjaxLoadingPanel id="RadAjaxLoadingPanel1" __designer:wfdid="w6" Skin="Default" Runat="server" Transparency="50" MinDisplayTime="3">Loading....?</telerik:RadAjaxLoadingPanel>  
<DIV> 
    <telerik:RadGrid id="RadGrid1" runat="server" __designer:wfdid="w1" DataSourceID="SqlDataSource1" GridLines="None" ShowStatusBar="True" AllowPaging="True" AllowSorting="True" ShowGroupPanel="True"
 
        <PagerStyle PageButtonCount="15" Position="TopAndBottom" AlwaysVisible="True"></PagerStyle> 
 
        <MasterTableView DataSourceID="SqlDataSource1" AutoGenerateColumns="True"
            <PagerStyle AlwaysVisible="True"></PagerStyle> 
        </MasterTableView> 
 
        <GroupingSettings ShowUnGroupButton="True"></GroupingSettings> 
    </telerik:RadGrid> 
    <asp:SqlDataSource id="SqlDataSource1" runat="server" __designer:wfdid="w2" 
        ProviderName="<%$ ConnectionStrings:ConnectionString1.ProviderName %>" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString1 %>" 
        SelectCommand="select * from testtbl where rownum < 30"></asp:SqlDataSource>  
</DIV> 
<telerik:RadAjaxManager id="RadAjaxManager1" runat="server" __designer:wfdid="w4" 
    DefaultLoadingPanelID="RadAjaxLoadingPanel1"
    <AjaxSettings> 
        <telerik:AjaxSetting AjaxControlID="RadGrid1"
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="RadGrid1"></telerik:AjaxUpdatedControl> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
    </AjaxSettings> 
</telerik:RadAjaxManager> </form></body></html> 
 

although I'm not sure if this isn't more of a web.config problem..  Like I said though, I'm new to this..  Any help would be much appreciated!

Thanks in advance!
- Beth
Pavlina
Telerik team
 answered on 10 Jun 2010
1 answer
39 views
  AjaxLoadingPanel  hides with radmultipage property RenderSelectedPageOnly="true"
while it appers when RenderSelectedPageOnly = "FALSE"



Yana
Telerik team
 answered on 10 Jun 2010
1 answer
246 views
Hi

I am facing some issue with Radmenu.
Each time i move my mouse on the menu i am getting some javascript error as shown in image 1.
but once i disable the javascript error notification it working fine navigation wise,
below is the code in the web.config file
Is i am missing some thing.

<httpHandlers>  
      <remove verb="*" path="*.asmx" />  
      <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />  
      <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />  
      <add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />  
      <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />  
      <add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false" />  
        
    </httpHandlers> 

Below is the code for the .aspx page
<%@ Register TagPrefix="ignav" Namespace="Infragistics.WebUI.UltraWebNavigator" Assembly="Infragistics.WebUI.UltraWebNavigator.v3" %>  
<%@ Control Language="vb" AutoEventWireup="false" Codebehind="Navigation-Menu.ascx.vb" Inherits="CSC.CorporateAdvisor.Web.Navigation_Menu" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" enableViewState="False"%>  
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>  
<%--<link href ="../Menu.Default.css"  type="text/css" rel="Stylesheet"/>--%>  
<link href ="../ProjectStyles.css" type="text/css" rel="Stylesheet"/>  
<ignav:ultrawebmenu id="UltraWebMenu1" runat="server" SubMenuImage="../ig_common/WebNavigator3/ig_menuTri.gif" 
    CompactRendering="False" ScrollImageTop="../ig_common/WebNavigator3/ig_menu_scrollup.gif" DefaultItemClass="MenuItemClass" 
    ItemSpacingTop="0" ScrollImageBottomDisabled="../ig_common/WebNavigator3/ig_menu_scrolldown_disabled.gif" 
    HoverClass="MenuHoverClass" DefaultIslandClass="MenuIslandClass" ScrollImageTopDisabled="../ig_common/WebNavigator3/ig_menu_scrollup_disabled.gif" 
    DisabledClass="MenuDisabledClass" FileUrl=" " ScrollImageBottom="../ig_common/WebNavigator3/ig_menu_scrolldown.gif" 
    SeparatorClass="SeparatorClass" Width="417px" TopAligment="Center" RenderAnchors="False">  
    <Styles>  
        <ignav:Style Cursor="hand" CssClass="MenuIslandClass"></ignav:Style>  
        <ignav:Style Cursor="hand" CssClass="MenuBarClass"></ignav:Style>  
        <ignav:Style Cursor="hand" CssClass="MenuBarLastClass"></ignav:Style>  
        <ignav:Style Cursor="hand" CssClass="MenuHoverClass"></ignav:Style>  
        <ignav:Style BackgroundImage="ig_menuStandardSep.gif" CssClass="SeparatorClass" CustomRules="background-repeat:repeat-x; "></ignav:Style>  
        <ignav:Style ForeColor="LightGray" CssClass="MenuDisabledClass"></ignav:Style>  
        <ignav:Style CssClass="MenuItemClass"></ignav:Style>  
        <ignav:Style CssClass="MenuItemHoverClass"></ignav:Style>  
    </Styles>  
    <ExpandEffects ShadowColor="DarkGray" Type="Fade"></ExpandEffects>  
    <Levels>  
        <ignav:Level LevelClass="MenuBarClass" Index="0" LevelCheckBoxes="False"></ignav:Level>  
        <ignav:Level LevelHoverClass="MenuItemHoverClass" Index="1" LevelCheckBoxes="False"></ignav:Level>  
    </Levels>  
</ignav:ultrawebmenu>  
 
<telerik:RadScriptManager ID="ScriptManager" runat="server"/>  
 
<telerik:RadMenu runat="server" id="MENUK"   style="float: right"   
    EnableShadows="true" EnableRoundedCorners="false"    
        EnableEmbeddedSkins="false" BorderStyle="None" 
        Font-Bold="false" CssClass="rmItem"   
          
    >  
</telerik:RadMenu>  
 
 
<input type="hidden" name="hidMenuId" id="hidMenuId" value=""

Did i missed something to include .
Dimitar Milushev
Telerik team
 answered on 10 Jun 2010
3 answers
571 views
I'm trying to use the AsyncUpload (also tried RadUpload w/ the same results) to upload image files and save them in an image field in SQL (not save the file to the filesystem) and then use RadBinaryImage to display them. I get the uploadedfiles collection and loop through it. If I use the saveas method, it works fine. If I use the inputstream (to do anything), I don't get the results I expected... It does write data to the SQL field, but it's not usable... either by RadBinaryImage, or streaming it back to a file... will not open. I also tried skipping the SQL field (for testing) and writing the inputstream directly to the filesystem and the resulting file will not open either. Code for this is below (it's mostly pilfered from Telerik examples...), the commented portion is skipping the DB and writing to file.

If possible, could you post an example using the inputstream (or whatever method is best) to save an image to SQL and then display it using RadBinaryImage.

Thanks
    Private Sub RadAsyncUpload1_FileUploaded(ByVal sender As ObjectByVal e As Telerik.Web.UI.FileUploadedEventArgs) Handles RadAsyncUpload1.FileUploaded  
 
        objCon = New SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings("HDSWebConnectionString").ConnectionString)  
        objCon.Open()  
        For Each file As UploadedFile In RadUpload1.UploadedFiles  
            Dim bytes(file.InputStream.Length - 1) As Byte 
            file.InputStream.Read(bytes, 0, file.InputStream.Length)  
 
            Try 
                Dim command As New SqlCommand("insert into Images (Description,ImageData,ImagePath,Caption ) " & _  
                        "values ('','@Content','',''); SELECT @@IDENTITY", objCon)  
                command.Parameters.AddWithValue("@Content", bytes)  
                command.ExecuteNonQuery()  
            Finally 
 
            End Try 
        Next 
 
        'objCon = New SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings("HDSWebConnectionString").ConnectionString)  
        'objCon.Open()  
        'For Each file As UploadedFile In RadAsyncUpload1.UploadedFiles  
        '    Dim bytes(file.InputStream.Length - 1) As Byte  
        '    file.InputStream.Read(bytes, 0, file.InputStream.Length)  
 
        '    Try  
        '        Dim strfn As String = "C:\Users\jcrumpton\Documents\Test.jpg"  
        '        Dim fs As New FileStream(strfn, FileMode.CreateNew, FileAccess.Write)  
        '        fs.Write(bytes, 0, file.InputStream.Length)  
        '        fs.Flush()  
        '        fs.Close()  
 
        '    Finally  
 
        '    End Try  
        'Next  
 
 
    End Sub 
Genady Sergeev
Telerik team
 answered on 10 Jun 2010
1 answer
153 views
I use RadEditor lite for MOSS 2007 (free version) to edit list items.

When i mark an enhanced rich text as required, and does not input content on NewForm.aspx, it displays "You must specify a value for this required field." twice. This does not happen with the built-in MOSS RTE.

Is there anyway to fix this?
Stanimir
Telerik team
 answered on 10 Jun 2010
1 answer
212 views
Hello,
I'm using RadAsyncUpload and "OnClientFileUploading" I need to get the filename path. Internet explorer works fine, but in the other browsers eventArgs.get_fileName(); only returns filename without the path. Is there a way to get full path name in all browsers ?
Sample code :

javascript:

 

function onClientFileUploading(sender, eventArgs) {  
    try {  
        var fileName = eventArgs.get_fileName();  
 
        $(".ErrorHolder").append(fileName).fadeIn("slow");  
    }  
    catch (e) {  
        handleError(e);  
    }  
}  
 

 

 

Aspx page:

 

 <div class="ErrorHolder">  
                    <telerik:RadAsyncUpload ID="RadAsyncUpload1" runat="server"   
                        AllowedFileExtensions="jpg" InputSize="42"   
                        MaxFileSize="1048576" OnClientFileUploaded="clientFileUploaded"   
                        OnClientFileUploading="onClientFileUploading"   
                        OnClientValidationFailed="validationFailed"   
                        OnFileUploaded="RadAsyncUpload1_FileUploaded"   
                        OnValidatingFile="RadAsyncUpload1_ValidatingFile" 
                        OverwriteExistingFiles="True"   
                        ReadOnlyFileInputs="True" TargetFolder="./Tmp">  
 
                    </telerik:RadAsyncUpload> 
         </div> 
 
Dimitar Milushev
Telerik team
 answered on 10 Jun 2010
7 answers
163 views
Hi folks,  I've just dropped the RadComboBox into an existing web app and there are two things I notice right off.  First, the old stock DropDownList control would size its width to be able to display the largest item in the list... I don't know if that is desireable or not (the new way is growing on me) but if I embrace this new and potentially layout preserving change then I have a second problem:  when I am typing and it is doing the auto-complete, the item in the edit box is losing a bit of the left hand side... looks like just a couple of characters worth of pixels but it makes it so you can't see the first part of what you are typing.  Any way to turn that off??
anu
Top achievements
Rank 1
 answered on 10 Jun 2010
2 answers
102 views
Hello guys.

I have changed filter localization of especific filter control, but, how can I change the texts like: "Contains", etc, of a filter inside a grid?

Regards.
Yavor
Telerik team
 answered on 10 Jun 2010
5 answers
193 views
Hi there,

I am experiencing some strange behaviour where the RadInput controls (timepicker, the RadTextInput for the subject, and the combobox's) all appear to be setting their inner width of the input control to 127px. I have tried overriding this by CSS class, inherit styles. There are no Themes attached to the project or anything like that.

Could it be inheriting this somehow from the Outlook2007 skin defaults? It looks like the Width is being set to 130px somehow by a default, which with the padding taken into account, the initialization javascript that your controls run is then rendering the width.

Any ideas?

Cheers
Gavin

T. Tsonev
Telerik team
 answered on 10 Jun 2010
2 answers
116 views
hello
i open a page there error of Telerik Undefined
sys Undefined, Syntax error Telerik.Web.UI.WebResource.axd, i tried all things that available in your website like troubleshoot.html and other pages but i m not able to resolve that issue.

please help me so i can resolve this issue.
Amitkumar
Top achievements
Rank 1
 answered on 10 Jun 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?