Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
345 views
Hi,

I've implemented a load-on-demand radtabstrip with radmultipage using the telerik demo. This works fine. Each tab shows an ascx control which holds a different Radgrid.
I then tried to implement the RenderSelectedPageOnly by setting this to "true" & setting AutoPostBack to "true" on the TabStrip.
However, this did not work. When i load my page, the default tab loads & when i click on to another tab then this loads correctly.
BUT if i click back on to a tab i already viewed, it displays a blank tab with no radgrid. I tried to trace the AutoPostBack but it does not seem to be firing.
All i want to do is render the selected page of the TabStrip but when another tab is selected (regardless of whether it has been rendered before) load the newly clicked Tabs page contents.
My code is as follows:

HTML:
<telerik:RadTabStrip OnClientTabSelecting="onTabSelecting"     ID="RadTabStrip1" SelectedIndex="0"       runat="server" MultiPageID="RadMultiPage1"
    OnTabClick="RadTabStrip1_TabClick" Width="900px" AutoPostBack="true" >
</telerik:RadTabStrip>
 
<telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" OnPageViewCreated="RadMultiPage1_PageViewCreated" Width="900px" RenderSelectedPageOnly="true" >
</telerik:RadMultiPage>


JAVASCRIPT:
function onTabSelecting(sender, args) {
    if (args.get_tab().get_pageViewID()) {
        args.get_tab().set_postBack(false);
    }
}

.CS
protected void Page_Load(object sender, EventArgs e)
{      
     if (!Page.IsPostBack)
    {
        AddTab("MyForms");
        AddPageView(RadTabStrip1.FindTabByText("MyForms"));
        AddTab("MyApprovals");
        AddTab("MySystemsApprovals");
        AddTab("MyGateKeeperApprovals");
    }
}
 
private void AddTab(string tabName)
{
    RadTab tab = new RadTab();
    tab.Text = tabName;
    RadTabStrip1.Tabs.Add(tab);
}
 
private void AddPageView(RadTab tab)
{
    RadPageView pageView = new RadPageView();
    pageView.ID = tab.Text;
    RadMultiPage1.PageViews.Add(pageView);
    pageView.CssClass = "pageView";
    tab.PageViewID = pageView.ID;
}
 
protected void RadTabStrip1_TabClick(object sender, RadTabStripEventArgs e)
{
    AddPageView(e.Tab);
    e.Tab.PageView.Selected = true;
}
 
protected void RadMultiPage1_PageViewCreated(object sender, RadMultiPageEventArgs e)
{
    string userControlName = e.PageView.ID + "CS.ascx";
 
    Control userControl = Page.LoadControl(userControlName);
    userControl.ID = e.PageView.ID + "_userControl";
 
    e.PageView.Controls.Add(userControl);
}

Can anyone tell me what i'm doing wrong or why the autopostback is not firing when a viewed tab is selected again?
Is there a different way of getting the TabStrip to render selected page only but reload a different tab when clicked on?

Regards,

Shuja



Nencho
Telerik team
 answered on 21 Feb 2013
5 answers
93 views
Hello

We are using Telerik V2010 - Q1.  It seems that there is an issue with using RadToolTipManager with RadGrid and RadAjaxManagerProxy in that the tooltip shows up but almost immediately disappears.  Could someone please suggest a fix if there is any?  We need to use the RadAjaxManagerProxy.

Thank you
Raka
Marin Bratanov
Telerik team
 answered on 21 Feb 2013
1 answer
68 views
Hi All,

I am new to this Telerik world, i need some help with a task, when a aspx webform is closed, it should invoke a code behind method and i need to do some cleanup of some custom objects. Heard from my techinical lead that i shud be using RAD control to do it but never worked on it. Any help is appreciated and code samples will help..

Thanks,
Srinivas.
Rumen
Telerik team
 answered on 21 Feb 2013
3 answers
233 views
Hi,

  I have a RadProgressManager and RadProgressArea on my ASPX Page which opens in a RadWindow.
<telerik:RadProgressManager id="Radprogressmanager1" runat="server" RegisterForSubmit="false" />            
                    <telerik:RadProgressArea id="RadProgressArea1" runat="server" /> 

We try to copy data from one table to another table when that copy is occuring the Progressmanager kicks in ans shows how much percent of copying is done. 

After the copying is started it, progress bar is getting stuck in certain point and giving the attached error message.
 RadUploadAjax callback error : Source url returned error : 12002.

I don't know why it is behaving like this.

I registered it correctly in web.config. Don't what is triggering this issue.

Any help would be appreciated.

Thanks,
Nirmala Kalakonda


 
  


Suthish
Top achievements
Rank 2
 answered on 21 Feb 2013
4 answers
534 views
I have a test page with nothing more than an AsyncUpload control. I created a folder within the web site called "files".
I set the path within the control to save files into this folder on postback. I added a button to accomplish postback.

I am getting an ASP.Net error: 

[start error]

Access to the path is denied.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.UnauthorizedAccessException: Access to the path is denied.

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6 and IIS 7, and the configured application pool identity on IIS 7.5) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[UnauthorizedAccessException: Access to the path is denied.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +9717727
   System.IO.__Error.WinIOError() +33
   System.IO.File.Move(String sourceFileName, String destFileName) +258
   Telerik.Web.UI.AsyncUploadedFile.SaveAs(String fileName, Boolean overwrite) +50
   Telerik.Web.UI.RadAsyncUpload.RaisePostDataChangedEvent() +299
   Telerik.Web.UI.RadWebControl.System.Web.UI.IPostBackDataHandler.RaisePostDataChangedEvent() +10
   System.Web.UI.Page.RaiseChangedEvents() +134
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5201
[end error]

I've tried to to change the "files" folder permissions to "Everyone" and great full permissions but it still fails.

Does anyone have any suggestions?

Thanks,
Joe

[Update]

I solved the issue by adding this line to the web.config

<identity impersonate="true" />

So my question is this? Is that a real security risk by doing so???
Suthish
Top achievements
Rank 2
 answered on 21 Feb 2013
1 answer
89 views
I have a checkbox in edititemtemplate. How to make the parent row selected on checking the checkbox?
Shinu
Top achievements
Rank 2
 answered on 21 Feb 2013
2 answers
103 views
Hi,
I have a doubt, to pass values ​​between asp.net web pages better to use session or querystring redirect? The site may also have a lot of people online at the same time
Fabio Cirillo
Top achievements
Rank 1
 answered on 21 Feb 2013
1 answer
198 views
Hello,
i want to uplaod file with radasyncupload....and i want get name file uploaded too. Then my code is:
<telerik:RadAsyncUpload ID="RadAsyncUpload1" runat="server"
AllowedFileExtensions="jpg,jpeg,png,gif" Font-Names="Verdana"
ManualUpload="True" MaxFileInputsCount="1" MaxFileSize="3000000" Skin="Sunset"
Width="343px">
<Localization Select="Cerca" />
</telerik:RadAsyncUpload>
function startManualUpload() {
var upload = $find('<%=RadAsyncUpload1.ClientID%>');
upload.startUpload();
}

and start upload with code behind:

   Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
       If Not IsPostBack Then
           RadAsyncUpload1.TargetFolder = "~/Image/image_utenti/" & Session.Item("idutente")
       End If
   End Sub  
 
Protected Sub Imgbtncarica_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles Imgbtncarica.Click
       ScriptManager.RegisterStartupScript(Page, Me.GetType, "Upload", "startManualUpload();", True)
       ViewState("DirImage") = ViewState("RemoteFolder") & RadAsyncUpload1.UploadedFiles.Item(0).FileName
       update_image(Session.Item("idutente"), ViewState("DirImage"))
   End Sub


If i click on button "Imgbtncarica" the file in not uploaded, because i go to see into folder and there's not the file....Why?

Please help me, thank you


Suthish
Top achievements
Rank 2
 answered on 21 Feb 2013
1 answer
130 views
i can't access the additional fields server side :( i use telerik 2012.3)

i follow the following link :

http://demos.telerik.com/aspnet-ajax/asyncupload/examples/additionalfields/defaultcs.aspx

The script is:

function onClientFileUploaded(radAsyncUpload, args) {
    var row = args.get_row(),
        inputName = radAsyncUpload.getAdditionalFieldID("TextBox"),
        inputType = "text",
        inputID = inputName,
        input = createInput(inputType, "Title", "Title"),
        label = createLabel(inputID),
        br = document.createElement("br");
 
    row.appendChild(br);
    row.appendChild(input);
    row.appendChild(label);
 
}
 
function createInput(inputType, inputID, inputName) {
    var input = document.createElement("input");
 
    input.setAttribute("type", inputType);
    input.setAttribute("id", inputID);
    input.setAttribute("name", inputName);
 
    return input;
}
 
function createLabel(forArrt) {
    var label = document.createElement("label");
 
    label.setAttribute("for", forArrt);
    label.innerHTML = "info: ";
 
    return label;
}
My .aspx :

<telerik:RadAsyncUpload runat="server" ID="rada_attach" OnClientFileUploaded="onClientFileUploaded"
  MultipleFileSelection="Disabled" InitialFileInputsCount="1" MaxFileInputsCount="1"
  Width="100%" />

My .cs :

foreach (UploadedFile UF in rada_attach.UploadedFiles)
               {
                   OBJ.File_name = UF.GetFieldValue("Title");//always null
               }
Hristo Valyavicharski
Telerik team
 answered on 21 Feb 2013
6 answers
433 views
Hello everybody,
As title, I have a RadNumericTextBox as a GridTemplateColumn. Here is my code:
----------------------------------------------------------------------------------------------------------------------
code design
----------------------------------------------------------------------------------------------------------------------
<telerik:RadGrid ID="rgProduct" runat="server" GridLines="None" AutoGenerateColumns="false" 
                        AllowSorting="true" PageSize="3" onneeddatasource="rgProduct _NeedDataSource" 
                        ondeletecommand="rgProduct_DeleteCommand" >
                        
                        <HeaderContextMenu EnableImageSprites="True"></HeaderContextMenu>
                        <MasterTableView>
                        <Columns>
                            <telerik:GridBoundColumn DataField="ProductName" HeaderText="Name" UniqueName="gbcPName">                                   </telerik:GridBoundColumn>                     
                            <telerik:GridBoundColumn DataField="Price" HeaderText="Price" UniqueName="gbcPrice"></telerik:GridBoundColumn>
                            <telerik:GridTemplateColumn HeaderText="Quantity" InitializeTemplatesFirst="false" UniqueName="templatecolumns">
                            <ItemTemplate>
                            <div>
                                <telerik:RadNumericTextBox ID="txtQuantity" ToolTip='<%# Eval("ID") %>' AutoPostBack="true" 
                                                   DataType="System.int16" value='<%# int.Parse(Eval("Quantity").ToString())%>' runat="server" 
                                                   OnTextChanged="TextChanged">
                                </telerik:RadNumericTextBox>
                            </div>
                            </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridButtonColumn Text="Delete" CommandName="Delete" Reorderable="true"></telerik:GridButtonColumn>
                        </Columns>
                        </MasterTableView>
                        </telerik:RadGrid>
----------------------------------------------------------------------------------------------------------------------
code behind
---------------------------------------------------------------------------------------------------------------------- 
public void TextChanged(object sender, EventArgs e)
        {
            RadNumericTextBox ntb = (RadNumericTextBox)sender;
            List<Product> list = (List<Tra>)Session["List"];
            for (int i = 0; i < list.Count; i++)
            {
                if (list[i].ID == int.Parse(ntb.ToolTip))
                    list[i].Quantity = (int)ntb.Value;
            }
            Session["List"] = list;
        }
------------------------------------------------------------------------------------------------------------------------
OnTextChanged event doesn't work although I set AutoPostBack="true". 

Greetings
Tan.
Eyup
Telerik team
 answered on 21 Feb 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?