Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
110 views
Hello,

I have implemented a custom File Explorer. The explorer is initialized with two paths, a User folder and a Company folder like this:
 RadFileExplorer1.Configuration.ViewPaths = New String() {cUser.Account.BusinessName & "/", cUser.UserName & "/"}
        RadFileExplorer1.Configuration.UploadPaths = New String() {cUser.Account.BusinessName & "/", cUser.UserName & "/"}
        RadFileExplorer1.Configuration.DeletePaths = New String() {cUser.Account.BusinessName & "/", cUser.UserName & "/"}

 I can move/copy directories from one to another and I can move files from the user to the company folder. However, when attempting to move a file from the company folder to the user folder the explorer throws the folder error;

"The selected folder could not be created because the application did not have enough permissions. Please, contact the administrator."

This is thrown before any functions in my code run while debugging. Any help would be appreciated.

Thanks,
Ryan 
Fiko
Telerik team
 answered on 16 Jun 2010
2 answers
252 views
Hi,
I am working with a .net gridview and with many radnumerictextboxes inside the grid. 
I have to move the focus to the next row, instead of next column (which is by default), on tab press in textbox. So for that I have fired onkeypress event of textbox, and if keychar is tab then, it will focus on the textbox below instead of beside box.
Here is a client side code and the onkeypress event. This code works well in Mozilla.

 <asp:TemplateField HeaderText="Par" ItemStyle-HorizontalAlign="center" HeaderStyle-Width="29px" 
                                        ItemStyle-Width="29px" > 
                                        <ItemTemplate> 
                                            <telerik:radnumerictextbox runat="server" id="txtSinglePar" width="25px"   onfocus="HasFocus(this)" 
                                                emptymessage="Par">      
                                                 <ClientEvents OnKeyPress="MoveToNextTextBox" />                                   
                                              <NumberFormat DecimalDigits="0" GroupSeparator="" />    </telerik:radnumerictextbox> 
                                        </ItemTemplate> 
                                    </asp:TemplateField> 

HasFocus() works well.

 function HasFocus(TextBox) {      
       textBoxWithFocus = TextBox;     
    } 


And this is JS function of focusing on the next control, according to required logic.

function MoveToNextTextBox(sender, args) 
     { 
        //IF TAB KEY HAS BEEN PRESSED 
         if (args.get_keyCode() == 9) 
         { 
            var str = textBoxWithFocus.id.replace("_text", ""); 
            var id = str.substring(str.indexOf("_ctl"), str.indexOf("_txt")); 
            //GET THE NUMBER OF THE ROW IN GRIDVIEW 
            idid = id.replace("_ctl", ""); 
            newId = parseFloat(id) + parseFloat(01); 
            if (parseInt(newId) < 9) { 
                newId = "0" + newId; 
            } 
            var prevID = str.replace(id, newId); 
 
            if (parseFloat(id) < 9) 
             { 
                prevIDprevID = prevID.replace("_ctl", "_ctl0"); 
                prevIDprevID = prevID.replace("_ctl00", "_ctl0"); 
            } 
            var newCtl = document.getElementById(prevID); 
 
            if (newCtl != null && $find(newCtl.id) != null)  
            { 
                $find(newCtl.id).focus();                                                  
            }               
           args.set_cancel(true);  
        } 
 
    } 

While in Mozilla, it moves to the control in next row, in safari it does not. What is the reason?
Iana Tsolova
Telerik team
 answered on 16 Jun 2010
2 answers
192 views
hi,

I Have created radgrid. My radgrid header is not displaying properly. Please see the attached screen shot(Half with green color and half with silver color). Please let me know how to fix this.  Here is my radgrid aspx code.

<telerik:RadGrid ID="gvTrackers" Height="560px" runat="server" AllowPaging="true" AllowSorting="True" 
            GridLines="None" AutoGenerateColumns="true" ShowGroupPanel="True" EnableHeaderContextMenu="true" 
            EnableHeaderContextFilterMenu="true" AllowMultiRowSelection="true" AllowFilteringByColumn="True" 
            OnNeedDataSource="gvTrackers_NeedDataSource" OnItemCreated="gvTrackers_ItemCreated" 
            OnExcelMLExportStylesCreated="gvTrackers_ExcelMLExportStylesCreated" OnExcelMLExportRowCreated="gvTrackers_ExcelMLExportRowCreated" 
            OnItemCommand="gvTrackers_ItemCommand" > 
            <HeaderStyle Height="40px" Width="100px" BackColor="#004000" Font-Size="8pt" Font-Bold="True" ForeColor="White" 
                HorizontalAlign="Right" BorderColor="white" BorderWidth="1px" /> 
            <ExportSettings IgnorePaging="true" ExportOnlyData="true"> 
            <Pdf AllowModify="false" AllowPrinting="true" PageWidth="16in" /> 
            </ExportSettings> 
            <MasterTableView AllowMultiColumnSorting="true" CommandItemDisplay="Top"> 
                <CommandItemSettings ShowExportToWordButton="true" ShowExportToExcelButton="true" 
                    ShowExportToCsvButton="true" ShowExportToPdfButton="true" ShowAddNewRecordButton="false" /> 
            </MasterTableView> 
            <ClientSettings ReorderColumnsOnClient="True" AllowDragToGroup="True" AllowColumnsReorder="True"> 
                <Scrolling AllowScroll="true" UseStaticHeaders="true" /> 
                <Selecting AllowRowSelect="True"></Selecting> 
                <Resizing AllowRowResize="True" AllowColumnResize="True" EnableRealTimeResize="True" 
                    ResizeGridOnColumnResize="False"></Resizing> 
            </ClientSettings> 
            <GroupingSettings ShowUnGroupButton="true" /> 
            <PagerStyle Mode="NextPrevAndNumeric" HorizontalAlign="Right" Font-Bold="true" AlwaysVisible="true" /> 
        </telerik:RadGrid> 
Babu Puchakayala
Top achievements
Rank 1
 answered on 16 Jun 2010
1 answer
130 views
Hi all.
I have a site, where each subpage selected from the menu is displayed in updatepanel. In one of the subpage a have several controls including radgrid. This radgrid is databinding on the server and it works ok. Now I want to have the posibility to sorting, filtering and paging this grid using virtual paging. In examples on the Telerik site I have found a radajaxmanager but I don't know how to use it inside updatepanel? Or maybe is there possibly to do it differently? To databound I'm using NeedDataSource event.
Maria Ilieva
Telerik team
 answered on 16 Jun 2010
1 answer
108 views
Hi,
I'm working with the Q2 2009 SP1 telerik suite and run into a problem when rendering a spline chart.
Essentially the edges seem to roll of the chart as highlighted in the attached illustration. I'd like to find out if there is a setting (or later release) that will prevent this behavior.

Thanks in advance,
Elmar
Ves
Telerik team
 answered on 16 Jun 2010
1 answer
133 views
In server-side I do some validation and then show a radwindow. If this code is sent via a normal request, the autosize feature works, but it i sent via ajax then it doesn't

string script = @"var oWindowMsg = top.window.radopen('Hello World', null);
                                oWindowMsg.setSize(200, 200);
                                oWindowMsg.set_modal(true);
                                oWindowMsg.set_visibleStatusbar(false);
                                oWindowMsg.set_behaviors(Telerik.Web.UI.WindowBehaviors.Close);
                                oWindowMsg.add_pageLoad(function () { oWindowMsg.autoSize(true) });"; 
                
if (RadScriptManager.GetCurrent(this).IsInAsyncPostBack) 
{ 
  RadAjaxManager.GetCurrent(this).ResponseScripts.Add(script); 
} 
else 
{ 
  this.ClientScript.RegisterStartupScript(this.GetType(), "mostrarMensaje", String.Format("<script language='javascript'>function f(){{{0}; Sys.Application.remove_load(f);}}; Sys.Application.add_load(f);</script>", script)); 
} 
 

Any idea? Thanks!


Fiko
Telerik team
 answered on 16 Jun 2010
2 answers
104 views
I have a three-level hierarchical grid, and I want to hide the column that contains the expand and collapse buttons.

Has anybody come up with a solution for this yet?  I'm using Q1 2010 Asp.Net AJAX, .Net 3.5, with the Web20 skin.
Ed McCarroll
Top achievements
Rank 1
 answered on 16 Jun 2010
1 answer
358 views
Hi
On thread:
http://www.telerik.com/community/forums/aspnet-ajax/grid/get-row-number-of-grid.aspx
It shows the following:
<script type="text/javascript" language="javascript">  
    function onFocus(sender, args)  
    {  
        var cell = sender.get_element().parentNode.parentNode;  
        alert(cell.parentNode.rowIndex);  
    } 
</script> 
The above gets the row index. 
It seem to me that parentNode.ParentNode gets one to the row.  If context is correct, so from there I should be able to find other controls in the grid data row.  So how do I find the data row object context (not html) and then find other controls.

Phil
Princy
Top achievements
Rank 2
 answered on 16 Jun 2010
1 answer
59 views
Team

In Our application, we are binding RadComboBox with SqlDataSource.

We are populating ComboBox with query "Select Col1, Col2, Col3, Col4 from Table1" and binding Col2 as datasource for the same.

Problem is sometime ComboBox showing Col4 data.

Pls. Clarify.
Thanks

Veronica
Telerik team
 answered on 16 Jun 2010
1 answer
188 views
I use uploadedfile.saveas(targetphysicalfolder) (version 2.3.2.0) to save file on server, but the temporary file is created in temp folder on server and not automatically deleted ever. It makes spaces on our server reduced and our network staff has to manually deleted them regularly. Is there any way to delete the temporary file immediately after uploading?

Here is my code in VB.Net
.aspx: 

<input type="file"

style="width: 95%"
runat="server"
id="inputFile" /> </td>
<td align="left" colspan="2"> <asp:button id="btnUpload"

 

Text=" Upload "

 

runat="server"

 

ToolTip="Click to upload file."

 

CssClass="Button">

 

</asp:button>

 

</td>

<td colspan="2">

 

<radU:RadProgressManager ID="RadProgressManager1" runat="server" UniquePageIdentifier="eae0adf1-8382-4884-8843-a38bf3b99b38" />  

 

 

<radU:RadProgressArea ID="RadProgressArea1" runat="server">  

 

</radU:RadProgressArea>

 

</td>


.aspx.vb

Protected Sub btnUpload_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnUpload.Click

 

 

'Store current user token in a variable...

 

 Dim tokenCurrentUser As System.IntPtr = System.Security.Principal.WindowsIdentity.GetCurrent.Token

Try
file = RadUploadContext.Current.UploadedFiles(inputFile.UniqueID)

'validating

 

 

If validating() = False Then

 

 

 

 

Exit Sub

 

End If


fileName = file.GetName

 

 

fileExt = file.GetExtension

 

filesize = file.ContentLength

 

'Impersonate ASPNETRW account ...  

 

 

Dim szASPNETRWPassword As String = Trim(All.DecryptPassWord(Trim(ConfigurationManager.AppSettings("ASPNETRWPassWord"))))

 

 

 

 

If Not ImpersonateUser.ImpersonateValidUser("aspnetrw", "HCA_LAN", szASPNETRWPassword) Then

 

'Notify user of error...

ClientScripts.CallMsgBox(

 

Me, "Error", "Sorry, unable to access archive at this time.")

Exit Sub

End If

 

 

 

file.SaveAs(ConfigurationManager.AppSettings(

 

"UploadFilePath") & fileName)

'update database
NewPHI_Request()
'send email notice

sendMail()

Response.Redirect("xThankyou.aspx", False)

 

 

 

 

 

 

Catch ex As Exception

 

 Try

 

'pass error to web service...

 xLogError.LogError(ex.Message, ex.StackTrace)

 

 

 

Catch exLogError As Exception  

 

End Try

 

 

 

 

'place error message into session and redirect to error page...

Session.Item(

 

 

 

"ErrorMessage") = ex.Message.ToString()

Response.Redirect(

 

 

 

"xError.aspx", False)  

 

Finally  

 

'Set impersonation back to previous user...  

ImpersonateUser.UndoImpersonation()

System.Security.Principal.WindowsIdentity.Impersonate(tokenCurrentUser)

 

 

 

 

End Try

 

End Sub

 

 

 

 

 

Genady Sergeev
Telerik team
 answered on 16 Jun 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?