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

I'm having an issue... But I don't know why / where... Can you help me?

I think that I've isolated the problem.
In my Page I have:
<telerik:RadAjaxManager ID="RAMP" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RG">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RG" LoadingPanelID="LP" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

If I put my 
<telerik:RadAjaxLoadingPanel ID="LP" runat="server" ZIndex="100000001" />
in the same page, it's working well.
If I put this same code in the master page of the page then the ajax calls are not working...

When my RadAjaxLoadingPanel is in the masterpage, in the console I have this:
POST... 500 (Internal Server Error) ... Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RSM_TSM


Can you help me please?
Shinu
Top achievements
Rank 2
 answered on 24 Feb 2014
1 answer
75 views
Hello All,
I am exporting my Rad Grid data in a pdf form but it is not showing my data in a hierarchical manner and not showing data.
 Please see the below attachment and i also write my code for exporting the data in pdf form.

Please help me. It is urgent.
Princy
Top achievements
Rank 2
 answered on 24 Feb 2014
1 answer
662 views
Hi ,

I have a menu in which i am creating a mega dropdown by using itemtemplate.
I want to retrieve the value of list inside my anchor tag  <a> tag which is inside a <div> , selected by the user.

And if some one could also help me where i can assign the value to the anchor tag <a>, as it does not support the property of value.
Basically here is  a small snippet -
 <a href="#">
                                                <li>French</li>
                                            </a>

So when a user hit on French from menu , i want to return the "fr" in back-end. and perform the localization .

here is the complete code for my RadMenu-

<telerik:RadMenu ID="sMenuLanguage" runat="server" Width="7%" Font-Size="14px" EnableEmbeddedSkins="False">
        <Items>
            <telerik:RadMenuItem Text="English">
                <Items>
                    <telerik:RadMenuItem CssClass="rmSlide1" OuterCssClass="langSlide">
                        <ItemTemplate>
                            <div class="main">
                                <h2 class="main-title">AROUND THE GLOBE - SELECT YOUR LANGUAGE </h2>
                                <div class="map">
                                    <img src="../images/map.png" />
                                </div>

                                <div id="languageSection" class="languageSection">
                                    <div class="col">

                                        <ul>
                                            <a href="#">
                                                <li>Chinese (Simple)</li>
                                            </a>
                                            <a href="#">
                                                <li>Chinese (Traditional)</li>
                                            </a>
                                            <a href="#">
                                                <li>Danish</li>
                                            </a>
                                            <a href="#">
                                                <li>Dutch</li>
                                            </a>
                                            <a href="#">
                                                <li>English</li>
                                            </a>
                                        </ul>
                                    </div>
                                    <div class="col">

                                        <ul>
                                            <a href="#">
                                                <li>Finnish</li>
                                            </a>
                                            <a href="#">
                                                <li>French</li>
                                            </a>
                                            <a href="#">
                                                <li>German</li>
                                            </a>
                                            <a href="#">
                                                <li>Italian</li>
                                            </a>
                                            <a href="#">
                                                <li>Japanese</li>
                                            </a>
                                        </ul>
                                    </div>
                                    <div class="col">
                                        <ul>
                                            <a href="#">
                                                <li>Korean</li>
                                            </a>
                                            <a href="#">
                                                <li>Norwegian</li>
                                            </a>
                                            <a href="#">
                                                <li>Portuguese</li>
                                            </a>
                                            <a href="#">
                                                <li>Spanish</li>
                                            </a>
                                            <a href="#">
                                                <li>Swedish</li>
                                            </a>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </ItemTemplate>
                    </telerik:RadMenuItem>
                </Items>
            </telerik:RadMenuItem>
        </Items>
    </telerik:RadMenu>


Could any one help me on this , how can we achieve this , with a small piece of sample code

Thanks 







Shinu
Top achievements
Rank 2
 answered on 24 Feb 2014
3 answers
260 views
The RadEditor on screen Character Count doesn't match the character count when accessing RadEditor1.Text.Length on a postback.  How can I access the count that is displayed to the user as they are entering text?

Below is an example:

Screen shows 21 characters, but when doing RadEditor1.Text the result is :"0123456789 \n0123456789"
This has a .Length of 22 characters.



Princy
Top achievements
Rank 2
 answered on 24 Feb 2014
1 answer
121 views
after selecting one image by pressing on select button, the file gets uploaded. Likewise, if again i press on the select button again it uploads another file. Its a little confusing.
To prevent that i after selecting and uploading a single image , the fileupload control or the button through which i select another image should be disabled.
Can anyone provide me with any solutions??....Its urgent...Thanks
Shinu
Top achievements
Rank 2
 answered on 24 Feb 2014
2 answers
141 views
Hi

I have a radgrid with multiple columns, I want to change the colour of a cell individually when the cell is clicked on a client side. Also, I need to capture the cell id or index and the column details and update the database.

Thanks
Princy
Top achievements
Rank 2
 answered on 24 Feb 2014
1 answer
105 views
Sorry for taking your time, I just dont know why, i cant download sample code of ASP NET AJAX it stuck on 80 % then unknown network error. link :  http://www.telerik.com/support/aspnet-ajax#step-by-step
Rumen
Telerik team
 answered on 23 Feb 2014
1 answer
138 views
Hi,

Im using Telerik 2010.2.713 version with Sharepoint 2010.
Created visualwebpart with simple button, 1 radcombobox inside updatepanel, initially the radcombobox will be visible false, on button click we are trying to enable the radcombobox.
But when i click on button im getting error on page 'Telerik is undefined', so i changed my web.config with Telerik.Web.UI.WebResource in <handlers>, later on im getting 'Object expected'.

Please find the below code that im using

visual webpart usercontrol

<asp:UpdatePanel runat="server" ID="updatePanel1" UpdateMode="Conditional" >
    <ContentTemplate>
        <asp:Button runat="server" ID="btn1" Text="ShowButton" OnClick="btn1_Click" />
        <telerik:RadComboBox visible="false" AutoPostBack="true" ID="RadComboBox1" runat="server">
            <Items>
                <telerik:RadComboBoxItem Text="1" />
                <telerik:RadComboBoxItem Text="2" />
                <telerik:RadComboBoxItem Text="3" />
            </Items>
        </telerik:RadComboBox>
    </ContentTemplate>
</asp:UpdatePanel>

Telerik references in Web.Config

<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" />
    </httpHandlers>

<handlers>
      <remove name="OPTIONSVerbHandler" />
      <remove name="WebServiceHandlerFactory-Integrated" />
      <remove name="svc-Integrated" />
      <remove name="WebDAV" />
      <add name="svc-Integrated" path="*.svc" verb="*" type="System.ServiceModel.Activation.HttpHandler, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="integratedMode" />
      <add name="OwssvrHandler" scriptProcessor="C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\isapi\owssvr.dll" path="/_vti_bin/owssvr.dll" verb="*" modules="IsapiModule" preCondition="integratedMode" />
      <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      <add name="JSONHandlerFactory" path="*.json" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" resourceType="Unspecified" preCondition="integratedMode" />
      <add name="ReportViewerWebPart" verb="*" path="Reserved.ReportViewerWebPart.axd" type="Microsoft.ReportingServices.SharePoint.UI.WebParts.WebPartHttpHandler, Microsoft.ReportingServices.SharePoint.UI.WebParts, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
      <add name="ReportViewerWebControl" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
      <add name="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" />
    </handlers>

please help me to resolve the issue asap, waiting for ur reponse
Thanks in advance
PJ
Top achievements
Rank 1
 answered on 23 Feb 2014
2 answers
163 views
Hi, i have a RadContextMenu which is created dynamically.The RadMenuItem inside it is also created dynamically.
My RadMenuItem which may consists of Edit/ Delete/Firm.When user click on the Firm or Delete , a pop up come out for confirmation. When user choose ok only, then it proceed to firm or delete the record.

My problem is no matter user click on the ok or cancel button the  RadMenu.ItemClick evet is fired.
Does anyone has idea on this??
Below is my coding :
    Private Sub CreateDynamicControl() 
 
        Dim i As Integer 
        Dim iCellIndex As Integer 
        Dim drFoundRecord As Data.DataRow() 
 
        Try 
 
            For i = 0 To gvDynamic.Rows.Count - 1 
                For iCellIndex = 1 To gvDynamic.Rows(i).Cells.Count - 1 
                    If gvDynamic.Rows(i).Cells(iCellIndex).ID Is Nothing = False Then 
 
                        Dim cLabelItem As New Label 
                        Dim cTxtboxQty As New TextBox 
                        Dim cLabelWorkOrder As New Label 
                        Dim cTxtWorkOrder As New TextBox 
 
                        Dim cLiteraSpace1 As New LiteralControl 
                        Dim cLiteraSpaceBR As New LiteralControl 
                        Dim cLiteraSpace2 As New LiteralControl 
                        Dim cHtmlTable As New HtmlTable 
 
                        Dim radMenu As New Telerik.Web.UI.RadContextMenu 
                        Dim radMenuItem As New Telerik.Web.UI.RadMenuItem 
                        Dim radMenuItem2 As New Telerik.Web.UI.RadMenuItem 
                        Dim radMenuItem3 As New Telerik.Web.UI.RadMenuItem 
                        Dim target As New Telerik.Web.UI.ContextMenuControlTarget 
 
 
 
 
                        Dim button1 As New Button 
 
 
                        drFoundRecord = getRecordByKey(gvDynamic.Rows(i).Cells(iCellIndex).ID) 
 
                        If drFoundRecord.Length > 0 Then 
 
                            cHtmlTable = CreateDynamicHTMLTable() 
 
                            gvDynamic.Rows(i).Cells(iCellIndex).BackColor = Drawing.Color.BlanchedAlmond 
 
                            cLabelItem.ID = "lblItem" & gvDynamic.Rows(i).Cells(iCellIndex).ID 
                   
                            cLabelItem.Text = drFoundRecord(0)("Planned_Item") 
                          
                            radMenuItem.Text = "Edit" 
                            radMenuItem2.Text = "Delete" 
                            radMenuItem3.Text = "Firm" 
 
                            radMenu.Items.Add(radMenuItem) 
                            radMenu.Items.Add(radMenuItem2) 
                            radMenu.Items.Add(radMenuItem3) 
 
                            radMenuItem3.Attributes.Add("onclick", "return confirm('Are you sure you want to firm?');") 
                            radMenuItem2.Attributes.Add("onclick", "return confirm('Are you sure you want to delete?');") 
 
                            AddHandler radMenu.ItemClick, AddressOf cRadMenuItem1Click 
 
                            target.ControlID = cLabelItem.ID 
 
                            radMenu.Targets.Add(target) 
 
 
                            cHtmlTable.Rows(0).Cells(0).Controls.Add(radMenu) 
                            cHtmlTable.Rows(0).Cells(0).Controls.Add(cLabelItem) 
                
                            gvDynamic.Rows(i).Cells(iCellIndex).Controls.Add(cHtmlTable) 
 
                        End If 
 
                    End If 
                Next 
            Next 
        Catch ex As Exception 
            Throw ex 
        End Try 
 
    End Sub 
 
 
    Protected Sub cRadMenuItem1Click(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadMenuEventArgs) 
 
        Try 
 
            Dim a As String 
            a = "sfds" 
 
 
        Catch ex As Exception 
            Throw ex 
        End Try 
 
    End Sub 
TQ
Silvio Silva Junior
Top achievements
Rank 2
 answered on 22 Feb 2014
3 answers
74 views
Hello,

I need to add detail table in the existing grid, the grid has only mastertableview currently. I am able to add the markup but i am not able to fully understand the code written in NeedsDataSource event. I tried to split the code to detailTable DataBind but it is passing the same DataKeyValueto all the records of the detail table. So please help me to do this. I have provided the grdfilesParent Design markup and the code in NeedDataSource Event. and also the STGrdNotesMaster grid design markup, like this i need to change the grdfilesParent . Help me to convert it.
Existing Grid With Only Master Table
-------------------------------------------
 
<ST:STGrid ID="grdfilesParent" runat="server" Width="100%" AllowPaging="false"
                                        GroupingEnabled="true" ShowGroupPanel="false"  EnableHierarchyExpandAll="true" >
                                        <MasterTableView  HierarchyLoadMode ="Client"  >
                                            <Columns>
                                                <tel:GridBoundColumn UniqueName="Name" DataField="Name" HeaderText="Category" />
                                                <tel:GridHyperLinkColumn UniqueName="Subject" DataTextField="Subject" HeaderText="Subject"
                                                    DataNavigateUrlFormatString="attachments/display.aspx?id={0}" DataNavigateUrlFields="ID"
                                                    SortExpression="Subject">
                                                    <ItemStyle CssClass="gridhyperlink" />
                                                </tel:GridHyperLinkColumn>
                                                <tel:GridHyperLinkColumn UniqueName="FileName" DataTextField="FileName" HeaderText="Attachment"
                                                    DataNavigateUrlFormatString="{0}" DataNavigateUrlFields="AttachmentUrl" SortExpression="FileName"
                                                    Target="_blank">
                                                    <ItemStyle CssClass="gridhyperlink" />
                                                </tel:GridHyperLinkColumn>
                                                <tel:GridDateTimeColumn UniqueName="CreatedDate" DataField="CreatedDate" HeaderText="Date" />
                                                <tel:GridBoundColumn UniqueName="CreatedBy" DataField="CreatedBy" HeaderText="Author" />
                                            </Columns>
                                            <GroupByExpressions>
                                                <tel:GridGroupByExpression>
                                                    <SelectFields>
                                                        <tel:GridGroupByField FieldName="Name" FieldAlias="Category"  />
                                                    </SelectFields>
                                                    <GroupByFields>
                                                        <tel:GridGroupByField FieldName="Name" />
                                                    </GroupByFields>
                                                </tel:GridGroupByExpression>
                                            </GroupByExpressions>
                                        </MasterTableView>
                                        <ClientSettings AllowExpandCollapse="true">
                                         </ClientSettings>
            </ST:STGrid>
---------------------------------------------------
NeedDataSource Event of Above Grid:
--------------------------------------------
Private Sub grdfilesParent_NeedsDataSource(ByVal sender As Object, ByVal e As GridNeedDataSourceEventArgs) Handles grdAttachmentsParent.NeedDataSource
        Dim types As fileTypeList = CurrentST.GetfileTypes()
        Dim attachments = types.Aggregate(
         New List(Of Object)(),
         Function(acc As List(Of Object), type As STfileType)
             Dim typefilements As STfilementList = Document.Getfilements(type.ID)
             typefilements.Aggregate(
              acc,
              Function(acc2 As List(Of Object), filement As STfile)
                  Dim extension = file.Extension.ToLower()
                  Dim navigationUrl As String = String.Empty
 
                  If CurrentSTClient.av Then
                      navigationUrl = String.Format("files/view.aspx?id={0}&path={1}&aid={2}", file.Document.ID, file.FileName, file.ID)
                  ElseIf EnableCommentsWithfiles Then
                      navigationUrl = String.Format("reviews/displayReadOnlyOptional.aspx?id={0}&type=file&path={1}&aid={2}", file.Document.ID, file.FileName, file.ID)
                  Else
                      If (extension = "docx" _
                       OrElse extension = "doc" _
                       OrElse extension = "dotx" _
                       OrElse extension = "dot" _
                       OrElse extension = "rtf" _
                       OrElse extension = "xls" _
                       OrElse extension = "xlsx" _
                      ) Then
                          navigationUrl = String.Format(
                           "reviews/displayreadonly.aspx?id={0}&type=file&path={1}",
                           file.ID,
                           file.FileName
                          )
                      Else
                          navigationUrl = file.VirtualPath
                      End If
                  End If
 
                  acc2.Add(New With {
                   Key .Name = type.Name,
                 .ID = file.ID,
                 .Subject = file.Subject,
                 .FileName = file.FileName,
                 .CreatedDate = String.Format("{0} {1}", file.CreatedDate.ToString(CurrentCulture.DateTimeFormat.ShortDatePattern, CurrentCulture), file.CreatedDate.ToString(CurrentCulture.DateTimeFormat.ShortTimePattern, CurrentCulture)),
                 .CreatedBy = file.CreatedBy,
                  .fileUrl = navigationUrl
                  })
                  Return acc2
              End Function
             )
             Return acc
         End Function
        )
 
 
        DirectCast(grdAttachmentsParent.Columns(1), GridHyperLinkColumn).DataNavigateUrlFormatString = String.Format("{0}cc/files/display.aspx?id={1}0{2}", Captions.VirtualRoot, Chr(123), Chr(125))
 
        grdfilesParent.DataSource = files.ToArray()
 
End Sub
---------------------------------------------
 
I need to convert the above grid to  the Grid like below with Master - Detail
-----------------------------------------------------------------------------------------
<ST:STGrid ID="STGrdNotesMaster" runat="server" TabIndex="212" AutoGenerateColumns="false" AllowSorting="false" AllowPaging="false" ClientSettings-AllowColumnsReorder="false" ClientSettings-AllowDragToGroup="false" ShowGroupPanel="false" EnableHierarchyExpandAll="true" MasterTableView-ExpandCollapseColumn-HeaderStyle-BackColor="LightGray" >
                                            <MasterTableView DataKeyNames="ID" HierarchyDefaultExpanded="false" NoMasterRecordsText="" NoDetailRecordsText="" GroupLoadMode="Client" HierarchyLoadMode ="Client" >
                                                <Columns>
                                                    <telerik:GridBoundColumn HeaderText="Category" DataField="Name" UniqueName="Category" />
                                                    <telerik:GridTemplateColumn UniqueName="Reorder">
                                                        <ItemTemplate><ST:STButton ID="btnReorder" runat="server" CommandName="reorder" Text="Reorder based on sort" /></ItemTemplate>
                                                    </telerik:GridTemplateColumn>
                                                </Columns>
                                                <DetailTables>
                                                    <telerik:GridTableView Name="Detail" AllowSorting="true" AllowPaging="false" DataKeyNames="ID" NoMasterRecordsText="" NoDetailRecordsText="" EditMode="InPlace">
                                                        <Columns>
                                                            <telerik:GridHyperLinkColumn UniqueName="Subject" HeaderText="Subject" DataNavigateUrlFormatString="~/notedisplay.aspx?id={0}" DataNavigateUrlFields="ID" DataTextField="Subject" SortExpression="Subject" ItemStyle-CssClass="gridhyperlink" HeaderStyle-Width="500px" />
                                                            <telerik:GridHyperLinkColumn UniqueName="file" HeaderText="file" DataNavigateUrlFormatString="javascript:void(window.open('imageviewer.aspx?a=3&b=file&c={0}', '_blank', 'left=0, top=0, width=785, height=585, titlebar=yes, location=no, status=no, toolbar=no, menubar=no, scrollbars=no, resizable=yes'));" DataNavigateUrlFields="ID" DataTextField="fileName" SortExpression="fileName" ItemStyle-CssClass="gridhyperlink" />
                                                            <telerik:GridBoundColumn UniqueName="AddDate" HeaderText="Created" DataField="AddDate" SortExpression="AddDate" ReadOnly="true" />
                                                            <telerik:GridEditCommandColumn UniqueName="EditColumn">
                                                                <ItemStyle CssClass="gridhyperlink" />
                                                            </telerik:GridEditCommandColumn>
                                                        </Columns>
                                                    </telerik:GridTableView>
                                                </DetailTables>
                                            </MasterTableView>
                                            <ClientSettings AllowExpandCollapse="true">
                                            </ClientSettings>
                                        </ST:STGrid>
Joselina
Top achievements
Rank 1
 answered on 21 Feb 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?