Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
65 views
I have Radtreeview in my page.
+ A
    | 
    +  B
         |
         _C

when i created a subfolder named with 'C' under folder 'B' which is under folder 'A'.when i click on Folder b am getting its node text and value,
 BUT immdtly when i click on folder 'A' am getting selected text but getting Folder 'B' value (e.Node.Value)


only in this scenario(creating sub folder under parent folder) i am getting problem in other scenarios it is working fine
Nencho
Telerik team
 answered on 01 Oct 2012
2 answers
49 views
Hi,

I am using version 2011.3.1305.35 of the ASP.NET for AJAX controls.

I dynamically create the content of an ascx control, by creating strings that contain HTML and adding them to ASP.NET Tables / TableRows / TableCells.

The strings contain HTML elements like the div, span, and img elements.  I also have a RadTooltipManager on this user control, with AutoTooltipify="True".

When I view the source of the page, the strings I create end up looking like this:

<a class='bowlerTitleText' href='#' onclick="return expandCollapse('ctl00_cphContent_ucBowler1_tblBowler_bb8380','ctl00_cphContent_ucBowler1_tblBowler_bb8380i','True');"><img id='ctl00_cphContent_ucBowler1_tblBowler_bb8380i' class='upDown' src='../../img/icons/mnuCollapse.gif' /></a><span class='bowlerPeriodMiss'>Miss</span><span><img style='padding-left: 3px; vertical-align: bottom;' src='../../img/icons/talkBubble.gif' title='New Comment That can be up to 600 characters long.' /></span><span class='bowlerTitle2'>New Measurement</span>

In the example above, I'd want to tooltipify the <img> that has the title='New Comment...'

MY GOAL:
I want the 'title' attribute of my <img> elements, to be displayed by the RadTooltipManager.  Currently, the tooltips are displaying in the default browser tooltip box (ugly).  I know the radtooltipmanager is working properly as I have set the ToolTipTargetControl and TargetControlID for some asp controls in this page, and the tooltipmanager displays them correctly.

I don't expect how I'm doing it now to magically work, but How can I accomplish what I want?
Is it possible to achieve this the way I am doing it, by building HTML strings?

Thanks,
Michael
Michael Hunt
Top achievements
Rank 1
 answered on 01 Oct 2012
7 answers
263 views
I am building a wizard in the style of this example:  http://demos.telerik.com/aspnet-ajax/tabstrip/examples/applicationscenarios/wizard/defaultcs.aspx 

On the first tab a file is browsed for and selected.
On the second tab a file's data is mapped to relevant fields for my application.
On the third tab, I have a RadProgressArea and a button to run the import.

The first time the import is run, the Progress Area will not show, however the import is run successfully.  If I click the run important again, the Progress Area is shown.  I've noted that during the initial run, a script error from within telerik is raised noting that $get is not defined.  Later runs after the first never post this error.  I'm uncertain why the $get function would not be defined at first.

Perhaps this is an AJAX related issue?

I greatly appreciate feedback and assistance.

Thank you.

EDIT:

I should note use of the following on the import button:
RadScriptManager.GetCurrent(this).RegisterPostBackControl(buttonImportFile);

Without this, the progress area is never shown and the $get fails continually.
Rob
Top achievements
Rank 1
 answered on 01 Oct 2012
3 answers
129 views

Hi Guys,
    At first , please let me simply introduce my project state .

    server-side : wcf service (data service layer \ data interface layer)
    client-side   : silverlight4.0 (referred assembly: Telerik.Windows.Controls 2011.2.712.1040 \Telerik.Windows.Controls.GridView 2011.2.712.1040) 

    About GridView Export Function , please see the following main code :

            SaveFileDialog dialog = new SaveFileDialog(); 
         dialog.DefaultExt = extension; 
         dialog.Filter = String.Format("{1} files (*.{0})|*.{0}|All files (*.*)|*.*", extension, selectedItem); 
         dialog.FilterIndex = 1; 
         if (dialog.ShowDialog() == true
         
             using (Stream stream = dialog.OpenFile()) 
             
                 GridViewExportOptions exportOptions = new GridViewExportOptions(); 
                 exportOptions.Format = format; 
                 exportOptions.ShowColumnHeaders = true
                 radgridview.Export(stream, exportOptions); 
             
         }
        

        At this moment , the issue i have faced was the datetime value displayed abnormally . please see the illustration by attachment.
        Should I set the gridview some export option or else ? How to solve it ?

        please give me some advices , I am looking forward to your help .
        thanks.

Dimitrina
Telerik team
 answered on 01 Oct 2012
3 answers
293 views
Hi guys, I'm having some trouble opening a pdf file when a gridbuttoncolumn is pressed. This is my code I have to open it
if (e.CommandName == "Ver")
         {
             string Servidor = Request.Url.GetLeftPart(UriPartial.Authority);
             string fullUrl = Servidor + Session["strUrl"];
             OpenFile(fullUrl);
         }
But when I run it I get the next error message "The relative virtual path 'http:/localhost:50422/docs/28-grant application.pdf' is not allowed here." I save the file previously and now I want to open it but I can't do'it. Can you point me to the right direction please.
This is my code to save the document.
var usuarioSesion = (Usuario)Session["usuarioSesion"];
           var dbContext = new BD_SSEGUAEntities();
           string strUrl;
           int exp = Convert.ToInt32(Session["ExpEmp"]);
           int folio = Convert.ToInt32(Session["Foliosol"]);
           var newDoc = new Documento();
           foreach (UploadedFile file in RadUpload1.UploadedFiles)
           {
              // var ResultSol = new Solicitud();
               var fileName = folio + "-" + file.GetName().ToLower();
               file.SaveAs(MapPath(@"~/docs/" + fileName));
               strUrl = "/docs/" + fileName;
               //MapPath(@"/docs/")+file.GetName();// + ResultSol.fiIdSolicitud + "-" +
               if (RadUpload1.InvalidFiles.Count == 0 && RadComboBox1.SelectedValue!=null )
               {
                   try
                   {
                       var doc = new Documento
                                     {
                                         fiIdSolicitud = folio,
                                         fiAnioSolicitud = (short) DateTime.Now.Year,
                                         fiIdTipoDocumento = (byte) TipoDoc,
                                         fiIdEdoDocto = 1,
                                         fdFchRegDocto = DateTime.Now,
                                         fiUsrRegDocto = usuarioSesion.Expediente,
                                         fcURLdocumento = strUrl,
                                     };
                       dbContext.Documento.AddObject(doc);
                       dbContext.SaveChanges();
                       Alerta("El documento se guardó de forma correcta");
                        
                         
                   }
                   catch (Exception ex)
                   {
                       Alerta(ex.Message);
                   }
                   llenaGridDocs();
               }
               else
               {
                   Alerta("Captura los todos los datos");
               }
               //  else
               //{
               //    Alerta("Agrega un documento");
               //}
           }
       }

Kostadin
Telerik team
 answered on 01 Oct 2012
0 answers
97 views
Hi,

I have made a small program that enables a user to upload an image and gets it sent back to the users email with a watermark on it.
The place where the user uploads the image is in an ajax colorbox and in order for it to send the form I use another file called somefile.php.
When the form is sent succesfulle it writes mail send completed.
But it redirects to the page called somefile.php.
is it possible to have the message come in the ajax box and not redirect to a new page when submit is pressed.

I hope you understand what I meen.

You can see an example on:
www.wearecrunch.dk/gammelsjuf

and click profile in the top right corner.

My html code looks like this:

<div id="form">
    <form method="post" action=" somefile.php " name="profile" enctype="multipart/form-data" onsubmit="xmlhttpPost('somefile.php', 'profile', 'MyResult'); return false;" ">
        <label for="Upload Image">Upload Image</label>
        <input name="file_name" type="file">
        <div class="input-row"><label for="mail">E-mail: </label><input id="mail" name="mail" type="text" /></div>
        <input name="upload" value="Upload" type="submit">
    </form>
</div><!-- end form -->
<div id="MyResult"></div>

And the php looks like this:
<?php
    include_once( 'class/class.upload.php' );
    if(isset($_POST['upload'])){
        $filname=$_FILES['file_name'];
        $handle = new upload($filname);
        $handle->allowed = array('image/*');
        if($handle->uploaded){
            $handle->image_border          = 5;   // defining border width
            $handle->image_border_color    = '#000'; // defining border color
            $handle->image_watermark = 'badge.png';  // watermark image src
            $handle->image_watermark_position = 'BR'; // watermark image position again "B" for bottom and so on.
            $handle->image_resize         = true;   // making resize function to true
            $handle->image_x              = 160;    // making width to 160px
            $handle->image_y              = 160;    // making hight to 160px
            $handle->process('uploads/');
            if ($handle->processed) {
                 
                //$message = '<div class="center"><p>Border color #F58462 added successfully</p><img src="uploads/'.$handle->file_dst_name.'" alt="" /></div>';
                 
                 
 
                 
                 
                 //*** Uniqid Session ***//
    $strSid = md5(uniqid(time()));
    $to = $_POST['mail'];
    $from = 'adamkischi@gmail.com';
    $subject = 'the subject';
    $headers = 'From: '.$from. "\r\n" . 'Reply-To: '.$from. "\r\n";
    $headers .= "MIME-Version: 1.0\n";
    $headers .= "Content-Type: multipart/mixed; boundary=\"".$strSid."\"\n\n";
    $headers .= "This is a multi-part message in MIME format.\n";
    $headers .= "--".$strSid."\n";
    $headers .= "Content-type: text/html; charset=utf-8\n";
    $headers .= "Content-Transfer-Encoding: 7bit\n\n";
    if($_FILES["file_name"]["name"] != "") {
    $strFilesName = $_FILES["file_name"]["name"];
    $strContent = chunk_split(base64_encode(file_get_contents('uploads/'.$strFilesName)));
    $headers .= "--".$strSid."\n";
    $headers .= "Content-Type: application/octet-stream; name=\"".$strFilesName."\"\n";
    $headers .= "Content-Transfer-Encoding: base64\n";
    $headers .= "Content-Disposition: attachment; filename=\"".$strFilesName."\"\n\n";
    $headers .= $strContent."\n\n";
    }
    $flgSend = @mail($to, $subject, $message, $headers); // @ = No Show Error //
   if($flgSend){
echo "Mail send completed.";
$tmpfile = 'uploads/'.$strFilesName;
if(file_exists($tmpfile)) {
unlink($tmpfile);
}
}
else{
echo "Cannot send mail.";
}
            }
        }
    }
?>

And this is where I open the colorbox via a js file:

$(".profile").colorbox(
        {width:"80%", height:"80%"}
    );

Thank you
Adam
Top achievements
Rank 1
 asked on 01 Oct 2012
1 answer
80 views
Hello,
When using LabelStep for ChartXAxis, the resulting image does not have the axis lines centered at the step interval.  Is there any way to override this behavior and make lines centered at the interval.

I am using the following code

// X Axis properties
chart.PlotArea.XAxis.VisibleValues = ChartAxisVisibleValues.Positive;
chart.PlotArea.XAxis.Step = 1;
chart.PlotArea.XAxis.LabelStep = 2;
chart.PlotArea.XAxis.IsZeroBased = false;
chart.PlotArea.XAxis.AutoScale = false;
chart.PlotArea.XAxis.Appearance.ValueFormat = ChartValueFormat.General;
Evgenia
Telerik team
 answered on 01 Oct 2012
1 answer
159 views
I have a radbutton control in a radgrid that blinks when I mouse over or mouse out.
The project is using Telerik.Web.UI version 2012.1.411.35 and is running in DNN v6.2.2.
Looking at the Google Chrome development window; it seems like the image is being reloaded but before it is reloaded an about:black page is shown. (see attached image)
Any idea why it would be going back to the server to get this image and why about:blank is displaying?

<telerik:RadButton ID="INFO" runat="server" AutoPostBack="False" CausesValidation="False"
                                    Height="20px" OnClientMouseOver="infoRow"
                                    Text="" UseSubmitBehavior="False"  Width="36px" Image-ImageUrl="/images/i_info.png" Image-EnableImageButton="True" rowid="" Image-IsBackgroundImage="True">
                               </telerik:RadButton>


Thanks
Slav
Telerik team
 answered on 01 Oct 2012
1 answer
67 views
I have impemented Custom File Content Provider in Rad file Expolrer....
 I have overridden all methods but some how on renaming any file or deleting , the methods MoveFile or DeleteFIle are not being Called..

Whereas fir a directory, the methods MoveDirectory or DeleteDirectory are being called as normal..

I initially thought, it may be related to some permission issue.. But i cannot trace it..
Any help would be highly appreciated..
Vessy
Telerik team
 answered on 01 Oct 2012
1 answer
122 views
Hello,
I want to create a context menu that simply includes delete (which will call a function that will fire a stored proc to remove info from the dbase)  for the time being when I right click on a column.  I have the context menu currently displaying when I click on right click on the column and it includes all the standard items, hide, group, etc which I have hidden currently but I cannot figure out how to add a custom item to the menu.

Thanks.
Eyup
Telerik team
 answered on 01 Oct 2012
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?