Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
223 views
Issue: Social buttons (ShareThis) show up initially on load but on ajaxing on Tab Strip the ShareThis buttons disappear. Spent many hours trying to figure this out and tried all the forum suggestions but nothing seems to work. Pls advise fix. Thx 

Here is sample code (stripped down)

<telerik:RadAjaxPanel runat="server" ID="rjpFeatureDeal" LoadingPanelID="RadAjaxLoadingPanel1"
    ClientEvents-OnRequestStart="conditionalPostback" >
       <div class="subrub1">
                        <telerik:RadTabStrip ID="rtsUserDeal" runat="server" OnTabClick="rtsUserDeal_TabClick" Skin="Black">
                              
                        </telerik:RadTabStrip>
       </div>

 <asp:Panel runat="server" ID="pnlsocial" Width="100%" Direction="LeftToRight">
                                                   
                                                    <div id="divShareThis" runat="server">
                                                        <asp:Label ID="lblPageCustomURL" runat="server" Visible="false"></asp:Label>
                                                        <asp:Label ID="lblPageCustomTitle" runat="server" Visible="false" Text=""></asp:Label>
                                                    </div>

                                               <div id="divShareThisScript" runat="server">
                                                    </div> 

             <div id="ShareThisSmall" class="clsShareThis" runat="server">
                                                        
                    <span class='st_twitter' st_url="<%=lblPageCustomURL.Text%>" st_title="<%=lblPageCustomTitle.Text %>"></span>
                     <span class='st_linkedin' st_url="<%=lblPageCustomURL.Text%>" st_title="<%=lblPageCustomTitle.Text %>"> </span>
                      <span class='st_email' st_url="<%=lblPageCustomURL.Text%>" st_title="<%=lblPageCustomTitle.Text %>"></span>
                      <span class='st_sharethis' st_url="<%=lblPageCustomURL.Text%>" st_title="<%=lblPageCustomTitle.Text %>"></span>
                                                          
            </div>

</asp:Panel>
</telerik:RadAjaxPanel >


<!----ShareThis codebehind script -->

   public static string BuildShareThisScript(string PublisherID)
   {
       //   <!--ShareThis script:-->
       //<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script> 
       //  <script type="text/javascript"> 
       //   stLight.options({ 
       //           publisher:  'XXXXXXX',
       //   }); 
       //   </script> 

       string ShareThis = "<script type=\"text/javascript\" src=\"http://w.sharethis.com/button/buttons.js\"></script>";
       ShareThis += "<script type=\"text/javascript\">";
       ShareThis +=  "stLight.options({publisher:'" + PublisherID + "'});</script>";
       return ShareThis;

   }

 string scriptString = Social.BuildShareThisScript(ShareThisPublisherID);
  divShareThisScript.InnerHtml = scriptString;
                        


Pavlina
Telerik team
 answered on 26 Mar 2012
1 answer
130 views
Here I try Radupload with RadProgressArea in that facing some of issue 

1)  mention in AllowedFileExtensions & MaxFileSize is not validating at client side
2) RadProgressArea  primary progress always 100% not status update and the current file name which is up loding  is not geting
3) the file is saving at the target folder can not be customize with file name
 here i giving code that i used
//////////////////////design////////////////////////////////////
<table>
                <tr>
                    <td>
                        <telerik:RadProgressManager ID="Radprogressmanager1" runat="server" />
                        <table>
                            <tr>
                                <td>
                                    <telerik:RadUpload ID="RadUpload1" runat="server"
                                           Skin="Windows7" OverwriteExistingFiles="false"  InitialFileInputsCount="1"
                                                            MaxFileInputsCount="5" AllowedFileExtensions=".doc,.docx,.pdf,.xls,.xlsx,.xps,.txt,.rtf,.jpg,.jpeg,.png,.gif,.tiff"
                                                            
                                        MaxFileSize="5242880" ReadOnlyFileInputs="True" Width="340px">
                                                              
                                        
                                    </telerik:RadUpload>
                                    <asp:CustomValidator ID="Customvalidator1" runat="server" Display="Dynamic" ClientValidationFunction="validateFiletype"
                                        ValidationGroup="UP">
                    <span style="FONT-SIZE: 11px;">Invalid file extensions. Please select only doc,docx,pdf,xls,xlsx,xps,txt,rtf,jpg,jpeg,png,gif or tiff files.</span>
                                    </asp:CustomValidator>
                                       
                                </td>
                            </tr>
                        </table>
                        <div class="submitArea11">
                            <asp:LinkButton ID="SubmitButton123" runat="server" CssClass="greenbutton " TabIndex="18"
                                OnClick="SubmitButton123_Click"  ValidationGroup="UP" ToolTip="Click it to Save the File"><span>Upload files</span></asp:LinkButton>
                                
                        </div>
                        <telerik:RadProgressArea runat="server" ID="ProgressArea1" Skin="Windows7">
                            <Localization Uploaded="Uploaded"></Localization>
                        </telerik:RadProgressArea>
                    </td>
                </tr>
            </table>


/////////////////////////////////////// code////////////////////////////

  Public Function DesignAttachmenttable() As DataTable
        Dim dtattachment As New DataTable("Attachment")
        dtattachment.Columns.Add("Filename")
        dtattachment.Columns.Add("FilePath")
        Return dtattachment
    End Function

 Protected Sub Page_Load1(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If IsPostBack And RadUpload1.UploadedFiles.Count > 0 Then
                HandleUpload()
            End If
            If Not IsPostBack() Then
                If Not IsPostBack Then
                    ProgressArea1.Localization.UploadedFiles = "Completed Steps: "
                    ProgressArea1.Localization.CurrentFileName = "Step: "
                    ProgressArea1.Localization.TotalFiles = "Total Steps:"
                End If
End If
End Sub

Protected Sub SubmitButton123_Click(ByVal sender As Object, ByVal e As EventArgs)
        If RadUpload1.UploadedFiles.Count > 0 Then
            If Session("Attachment") Is Nothing Then
                dtAttachment.Clear()
                athgrv.DataSource = dtAttachment
                athgrv.DataBind()
            Else
                dtAttachment = Session("Attachment")
                athgrv.DataSource = dtAttachment
                athgrv.DataBind()
            End If
        End If
    End Sub

    Private Sub UpdateProgressContext(ByVal File As UploadedFile)
        Const total As Integer = 100
        Dim progress As RadProgressContext = RadProgressContext.Current
        progress.Speed = "N/A"


        For i As Integer = 0 To total - 1
            progress.PrimaryTotal = total
            progress.PrimaryValue = 1
            progress.PrimaryPercent = i


            progress.SecondaryTotal = total
            progress.SecondaryValue = i
            progress.SecondaryPercent = i
            progress.CurrentOperationText = File.GetName
            If Not Response.IsClientConnected Then
                Exit For
            End If
            progress.TimeEstimated = (total - i) * 100
            System.Threading.Thread.Sleep(100)
        Next
    End Sub

    Private Sub HandleUpload()
        For Each file As UploadedFile In RadUpload1.UploadedFiles
            Dim dt As String = DateTime.Now.ToString("MMddyyyy_hhmmss") + "_"
            Fname = dt + file.GetName
            Fpath = Server.MapPath("~/UploadedFiles/") + Fname
            file.SaveAs(Fpath)
            If Session("Attachment") Is Nothing Then
                Session("Attachment") = DesignAttachmenttable()
                dtAttachment = Session("Attachment")
            Else
                dtAttachment = Session("Attachment")
            End If
            Dim dr As Data.DataRow = Nothing
            dr = dtAttachment.NewRow
            dr("Filename") = Fname
            dr("FilePath") = Fpath
            dtAttachment.Rows.Add(dr)
            dtAttachment.AcceptChanges()
            Session("Attachment") = dtAttachment
        Next
    End Sub



 Kindly help with detail example
Richard
Top achievements
Rank 1
 answered on 26 Mar 2012
1 answer
244 views
Hi all,
I have bid a radgrid with entity data source object control and i was performing all operations like insert,edit, delete, filter, sorting, paging so all of these working fine but when i am jumping or navigate on last page and delete whole records of last page when last record is deleted than grid show message "No records to display." rather than navigate previous page so can any one please tell me how can i acheive this

Thanks,
Richard
Top achievements
Rank 1
 answered on 26 Mar 2012
0 answers
77 views
I am following the online sample located here loadondemand tabStrip. Version Q32011 is being used.

I receive two JS errors:
Microsoft JScript runtime error: 'this.ClientSettings.AllowKeyboardNavigation' is null or not an object
Microsoft JScript runtime error: 'undefined' is null or not an object

I believe the second one is a result of the first. Some have reported disabling the setting above has worked for them. This may not be an option for our clients and I need to know the root of the problem to have accessibility enabled.

I have checked the follow resources which did not resolve my issue:
  1. http://www.telerik.com/community/forums/aspnet-ajax/tabstrip/known-issues-and-breaking-changes-radtabstrip-and-radmultipage.aspx 
  2. https://www.google.com/search?rlz=1C1CHFX_enUS473US473&ix=sea&sourceid=chrome&ie=UTF-8&q=Microsoft+JScript+runtime+error%3A+'this.ClientSettings.AllowKeyboardNavigation'+is+null+or+not+an+object#hl=en&rlz=1C1CHFX_enUS473US473&sclient=psy-ab&q=telerik+Microsoft+JScript+runtime+error%3A+this.ClientSettings.AllowKeyboardNavigation+is+null+or+not+an+object&oq=telerik+Microsoft+JScript+runtime+error:+this.ClientSettings.AllowKeyboardNavigation+is+null+or+not+an+object&aq=f&aqi=&aql=&gs_l=serp.3...17338319l17343215l1l17343467l2l0l0l0l0l0l0l0ll0l0.llsin.&pbx=1&bav=on.2,or.r_gc.r_pw.r_cp.r_qf.,cf.osb&fp=49e91e21499bfe9d&ix=sea&biw=1600&bih=713

Please advise and thanks in advance.
Johnathan
Top achievements
Rank 1
 asked on 26 Mar 2012
0 answers
115 views

I want to call a storedprocedure when filtering happens in RadGrid , but it does not seem to be working. How do I override the default filering and bind to the data from the storedprocedure?

protected void RadGridMaster_ItemCommand(object source, GridCommandEventArgs e)
 {
     if (e.CommandName == RadGrid.FilterCommandName)
     {
         Pair filterPair = (Pair)e.CommandArgument;
         string filterPattern = ((TextBox)(e.Item as GridFilteringItem)[filterPair.Second.ToString()].Controls[0]).Text;
 
         //string filter = RadGridMaster.MasterTableView.FilterExpression;
         BindMasterGrid(filterPattern);
         (this.Page as BasePage).ClearAllControls();
     }
 }

Prashanthi
Top achievements
Rank 1
 asked on 26 Mar 2012
3 answers
915 views
Hello,

I added TemplateColumns to my RadGrid and now my grid is way too big: 2209px wide within a ~900px div (see attached 1, FireBug shows width as 2209px (circled)). The content of the grid is easily small enough to fit (see attached 2 (manually changed the width in FireBug)). When the grid is empty, the sizing is fine (see attached 3). Is this a bug with template columns that's causing the total grid Width to be wrong, or am I missing something?

I tried setting each TemplateColumn's ItemStyle-Width property individually, but got the same result. Changing the RadGrid's Width property has no effect. Below is my Grid Code.

<tel:RadGrid runat="server" ID="rgImportData" AutoGenerateColumns="false" Width="100%" >
    <MasterTableView>
        <Columns>
            <tel:GridTemplateColumn HeaderText="Exclude from Import" UniqueName="ExcludeColumn" >
                <ItemTemplate>
                    <asp:CheckBox ID="cbExcludeFromImport" runat="server" />
                </ItemTemplate>
            </tel:GridTemplateColumn>
            <tel:GridBoundColumn DataField="SpeciesName" HeaderText="Species Name" UniqueName="SpeciesName" />
            <tel:GridBoundColumn DataField="SpeciesID" UniqueName="SpeciesID" Display="false" />
            <tel:GridTemplateColumn HeaderText="Length" UniqueName="Length" >
                <ItemTemplate>
                    <tel:RadNumericTextBox runat="server" ID="rgrntLength" Text='<%# Eval("Length") %>' NumberFormat-DecimalDigits="0" Width="40px" MaxValue="9999" />
                </ItemTemplate>
            </tel:GridTemplateColumn>
            <tel:GridTemplateColumn HeaderText="Weight" UniqueName="Weight" >
                <ItemTemplate>
                    <tel:RadNumericTextBox runat="server" ID="rgrntWeight" Text='<%# Eval("Weight") %>' NumberFormat-DecimalDigits="0" Width="40px" MaxValue="9999" />
                </ItemTemplate>
            </tel:GridTemplateColumn>
            <tel:GridBoundColumn DataField="Sex" HeaderText="Sex" UniqueName="Sex" />
            <tel:GridTemplateColumn HeaderText="Age" UniqueName="Age" >
                <ItemTemplate>
                    <tel:RadNumericTextBox runat="server" ID="rgrntAge" Text='<%# Eval("Age") %>' NumberFormat-DecimalDigits="0" Width="40px" MaxValue="9999" />
                </ItemTemplate>
            </tel:GridTemplateColumn>
            <tel:GridTemplateColumn HeaderText="Magn." UniqueName="Magnification" >
                <ItemTemplate>
                    <tel:RadNumericTextBox runat="server" ID="rgrntMagnification" Text='<%# Eval("Magnification") %>' NumberFormat-DecimalDigits="0" Width="40px" MaxValue="9999" />
                </ItemTemplate>
            </tel:GridTemplateColumn>
            <tel:GridTemplateColumn HeaderText="Annulus 1" UniqueName="Annulus1" >
                <ItemTemplate>
                    <tel:RadNumericTextBox runat="server" ID="rgrntAnn1" Text='<%# Eval("Annulus1") %>' NumberFormat-DecimalDigits="0" Width="40px" MaxValue="9999" />
                </ItemTemplate>
            </tel:GridTemplateColumn>
            <tel:GridTemplateColumn HeaderText="Annulus 2" UniqueName="Annulus2" >
                <ItemTemplate>
                    <tel:RadNumericTextBox runat="server" ID="rgrntAnn2" Text='<%# Eval("Annulus2") %>' NumberFormat-DecimalDigits="0" Width="40px" MaxValue="9999" />
                </ItemTemplate>
            </tel:GridTemplateColumn>
            <tel:GridTemplateColumn HeaderText="Annulus 3" UniqueName="Annulus3" >
                <ItemTemplate>
                    <tel:RadNumericTextBox runat="server" ID="rgrntAnn3" Text='<%# Eval("Annulus3") %>' NumberFormat-DecimalDigits="0" Width="40px" MaxValue="9999" />
                </ItemTemplate>
            </tel:GridTemplateColumn>
            <tel:GridTemplateColumn HeaderText="Annulus 4" UniqueName="Annulus4" >
                <ItemTemplate>
                    <tel:RadNumericTextBox runat="server" ID="rgrntAnn4" Text='<%# Eval("Annulus4") %>' NumberFormat-DecimalDigits="0" Width="40px" MaxValue="9999" />
                </ItemTemplate>
            </tel:GridTemplateColumn>
            <tel:GridTemplateColumn HeaderText="Annulus 5" UniqueName="Annulus5" >
                <ItemTemplate>
                    <tel:RadNumericTextBox runat="server" ID="rgrntAnn5" Text='<%# Eval("Annulus5") %>' NumberFormat-DecimalDigits="0" Width="40px" MaxValue="9999" />
                </ItemTemplate>
            </tel:GridTemplateColumn>
            <tel:GridTemplateColumn HeaderText="Annulus 6" UniqueName="Annulus6" >
                <ItemTemplate>
                    <tel:RadNumericTextBox runat="server" ID="rgrntAnn6" Text='<%# Eval("Annulus6") %>' NumberFormat-DecimalDigits="0" Width="40px" MaxValue="9999" />
                </ItemTemplate>
            </tel:GridTemplateColumn>
            <tel:GridTemplateColumn HeaderText="Annulus 7" UniqueName="Annulus7" >
                <ItemTemplate>
                    <tel:RadNumericTextBox runat="server" ID="rgrntAnn7" Text='<%# Eval("Annulus7") %>' NumberFormat-DecimalDigits="0" Width="40px" MaxValue="9999" />
                </ItemTemplate>
            </tel:GridTemplateColumn>
            <tel:GridTemplateColumn HeaderText="Annulus 8" UniqueName="Annulus8" >
                <ItemTemplate>
                    <tel:RadNumericTextBox runat="server" ID="rgrntAnn8" Text='<%# Eval("Annulus8") %>' NumberFormat-DecimalDigits="0" Width="40px" MaxValue="9999" />
                </ItemTemplate>
            </tel:GridTemplateColumn>
            <tel:GridTemplateColumn HeaderText="Edge" UniqueName="Edge" >
                <ItemTemplate>
                    <tel:RadNumericTextBox runat="server" ID="rgrntEdge" Text='<%# Eval("Edge") %>' NumberFormat-DecimalDigits="0" Width="40px" MaxValue="9999" />
                </ItemTemplate>
            </tel:GridTemplateColumn>
        </Columns>
        <NoRecordsTemplate>
            Select a file to see what data will be imported into this view.
        </NoRecordsTemplate>
    </MasterTableView>
</tel:RadGrid>
Richard
Top achievements
Rank 1
 answered on 26 Mar 2012
1 answer
158 views
Hi All

how I can edit a specific cell of a gridview selecting a row in javascript ?.


Thank you very much beforehand.

Richard
Top achievements
Rank 1
 answered on 26 Mar 2012
1 answer
85 views
Hi,
if we are having a telerik ajax panel inside another radajax panel then if there is any postback in the controls inside the inner radajax panel then which ajax panel will work?
is there any benefit of using radajax panel inside another radajax panel?

Thanks in advance
Jiju
Eyup
Telerik team
 answered on 26 Mar 2012
7 answers
440 views
Hi,

Is there a way to add the CalendarExtender from Ajax Control Toolkit inside the RadGrid ? In my table I've got a datetime field so I need to perform a little validation for the date field.

Thanks a lot
Martin
Telerik team
 answered on 26 Mar 2012
3 answers
97 views
Hi Team,
I am using Editor, i passed the data from DB to editor is like
<table class="topbot" pgwide="1" id="nzf_734"><caption>
              Recommended regimens for
              <i>Helicobacter pylori</i>
              eradication in adults
            </caption><colgroup cols="5"><col colname="col1" /><col colname="col2" /><col colname="col3" /><col colname="col4" /><col colname="col5" /></colgroup>
<colspec colname="col1" />
<colspec colname="col2" />
<colspec colname="col3" />
<colspec colname="col4" />
<colspec colname="col5" /><thead> etc 
But the editor display the above content as like
<table id="nzf_734" class="topbot" pgwide="1"><caption>
              Recommended regimens for
              <i>Helicobacter pylori</i>
              eradication in adults
            </caption>
<colgroup cols="5"><col colname="col1">
<col colname="col2"><col colname="col3">
<col colname="col4"><col colname="col5">
</colgroup><colspec colname="col1"><colspec colname="col2"><colspec colname="col3"><colspec colname="col4"><colspec colname="col5"><thead>                                                                                                                                                                                                                                                                                                                                                                                                                                                                             

                Editor automatically remove the end tag, if it is not contain the value.
it will create problem for me. How to solve this issue. Please help me. It is urgent.

Thanks
Uma
Rumen
Telerik team
 answered on 26 Mar 2012
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?