Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
94 views
I have a RadDatePicker, where on selection of a date, the date is saved in the DB and the user should get a message that date is saved. The RadDatePicker calls a function on its event OnDateSelected as follows(C#):

radDatePicker.ClientEvents.OnDateSelected = "function(sender, args){SaveDate(sender,args," + PriceDealProposalId + ")}";

The javascript function SaveDate successfully calls a webservice to save the date selected.

function SaveDate(sender, e, id) {      
       if (e.get_newDate() != null) {
           $.ajax({
               url: "/ajaxservice.asmx/SaveSignedDate",
               data: "{priceDealProposalId:" + id + ",proposalDate: " + JSON.stringify(e.get_newDate()) + "}",
               dataType: "json",
               type: "POST",
               contentType: "application/json;charset=utf-8",
               success: function (data) {
                   alert("saved");
               }
           });
       }
   }
The above successfully saves the value and alerts a message. Instead of an alert I want to display a text message near this RadDatePicker control which says "Saved" and disappears in a few seconds. 
For this I added a label and made it invisible as follows:
savedLabel.Attributes.Add("style", "display:none;");
How can I access this label in the success part of the ajax call. On success I want to make the label visible so that user knows the date as saved.
Shinu
Top achievements
Rank 2
 answered on 04 Aug 2014
3 answers
145 views
What I would like to do is have two LinkButton's that will both download the RadGrid into Excel format.  Previously I did have the "ExportCSV" and "ExportToExcel" menu items turned on and the code worked just fine however I needed the names of the downloads to be something else.  One version will be formatted like the RadGrid results and the other will be formatted slightly different (see below).  I was hoping that with option 1 that I could just tie into the RadGrid's ability to export to .XLS but it appears as if I don't have something right.  Can you offer assistance? 

File option 2 I need the data formatted differently would I have to requery the database or can I just manipulate the RadGrid results?

<telerik:RadGrid ID="GridContacts" runat="server" AllowPaging="True"
    AutoGenerateColumns="False" CellSpacing="0" 
    GridLines="None" PageSize="20"
    OnNeedDataSource="GridContacts_NeedDataSource" Visible="true">
    <GroupingSettings CaseSensitive="False" ShowUnGroupButton="false" />
    <ExportSettings IgnorePaging="True" OpenInNewWindow="True"
        ExportOnlyData="True" FileName="MarketingEmailList">
        <Excel AutoFitImages="True" Format="ExcelML" />
        <Csv ColumnDelimiter="VerticalBar" EncloseDataWithQuotes="False" />
    </ExportSettings>
    <MasterTableView CommandItemDisplay="Top" 
        IsFilterItemExpanded="true">
        <CommandItemTemplate>
            <asp:LinkButton ID="btnExportPrn" runat="server" CommandName="ExportPrinter" Visible="true"><img style="border:0px;vertical-align:middle;" alt="" src="/Images/DownloadPrinter.png"/>Printer Download</asp:LinkButton>  
            <asp:LinkButton ID="btnExportMarket" runat="server" CommandName="ExportMarketing"><img style="border:0px;vertical-align:middle;" alt="" src="/Images/DownloadMarket.png"/>Marketing Download</asp:LinkButton>  
        </CommandItemTemplate>

Code behind and while running it I see the CommandName is either "ExportPrinter" or "ExportMarketing" and to see if I could get it to work I just invoked the calls to "ConfigureCSVExport" and "ConfigureExcelExport"
Protected Sub RadGrid1_ItemCommand(sender As Object, e As Telerik.Web.UI.GridCommandEventArgs) Handles GridContacts.ItemCommand
       If e.CommandName = "ExportPrinter" Then
           ConfigureCSVExport()
       ElseIf e.CommandName = "ExportMarketing" Then
           ConfigureExcelExport()
       End If
       'If e.CommandName = Telerik.Web.UI.RadGrid.ExportToCsvCommandName Then
 
 
       'ElseIf e.CommandName = Telerik.Web.UI.RadGrid.ExportToExcelCommandName Then
 
       'End If
   End Sub

Currently the RadGrid displays the data as such

Company Name | Address info | CEO | CFO | Marketing Mgr | Operations Mgr
ABC Company | Main St, my town USA | Bob Smith | Susie Jones | Mr. X

For the "ExportMarketing" this format would work just fine but for the "ExportPrinter" I need the data slightly changed and wondering the best way of going about this.  Need the data to appear like

Bob Smith | ABC Company | Main St, My town USA
Susie Jones | ABC Company | Main St, My town USA
Mr. X | ABC Company | Main St, My town USA























Princy
Top achievements
Rank 2
 answered on 04 Aug 2014
1 answer
71 views
Hi,
I have RadGrid which I exporting to excel and this grid contains 7 columns.All data in columns align in the center.I need data in one column to be align on the left.
How can I do that?

Thanks for your help. 
Shinu
Top achievements
Rank 2
 answered on 04 Aug 2014
2 answers
56 views
Is it possible to superimpose a data entry form over the ImageGallery (and "float" it using responsive techniques)?  I have attached a file with a sample of what I am asking about.

If this is possible, any starting example, however simplistic, would be most helpful.

Thanks in advance for any assistance!

Lynn
winston
Top achievements
Rank 1
 answered on 03 Aug 2014
6 answers
95 views
Hi,

Unless I’m missing something obvious I can’t seem to find
a way to expand a treeview to a particular node?


Please advise?

TIA
Doug
Top achievements
Rank 1
 answered on 01 Aug 2014
2 answers
216 views
Hi,

Given a node is it possible to get the value of the root node?

1
    222
    333
        888
5
    555
    444

for exmaple if I was on 888 I need to be able to find 1, likewise if I was on 444 I need to be able to find 5

TIA.
Doug
Top achievements
Rank 1
 answered on 01 Aug 2014
14 answers
1.8K+ views
hello ,
i am using radgrid and i would like to set a default insert value at bounded column value .but in insert mode the defualt value didn't set to the text box in edit form.. 
please help me to find out the issue. 
shervinrv
Top achievements
Rank 1
 answered on 01 Aug 2014
5 answers
76 views
I have a page which displays a number of images in a RadRotator set in CoverFlowButtons mode. I've recently upgraded the controls to the latest release and added the RenderMode="Auto" option but when run in a modern browser (so using Lightweight or Mobile rendering) the left and right buttons display inside the area of the control where the images reside. So, in its initial state the right button is displayed over by an image and if I scroll the images so that the early images scroll off the left side, in the process they overdisplay the left button. If I switch the Rotator back to "Classic" RenderMode then the buttons correctly display outside the main control area correctly. Is this a bug or something I can manipulate in the styles?

If it helps, the Rotator is full width of the page along the bottom. The containing div has left and right padding of 10px.

Thanks in advance
PaulH
Top achievements
Rank 1
 answered on 01 Aug 2014
2 answers
111 views
I using a rad panel bar in which the the first rad panel item is a rad grid and hence i want to increase the width of the panel item to fit the width of the rad grid.
Please tell how i can achieve this when i click on the expand button.

Thank You
akpaga akpaga
Top achievements
Rank 1
 answered on 01 Aug 2014
3 answers
205 views
Hello,

I need to create a RadGrid object dynamically and be able to export the data to excel. Below is the simple class I created. No error occurs but nothing happens. No file is being created. Am I missing something?

==============================================

Public Class MyOwnClass
        Inherits MyBaseClass
        
        Dim WithEvents ExportBillRadGrid As New RadGrid

        Protected Sub RowControlInit(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Init
            Page.Controls.Add(ExportBillRadGrid)
        End Sub

        Public Overrides Sub imgDL_Click(ByVal sender As Object, ByVal args As ImageClickEventArgs)
        
            Try
                ExportBillRadGrid.DataSource = SetQueryStrings()
                ExportBillRadGrid.DataBind()
                
                ExportBillRadGrid.ExportSettings.ExportOnlyData = True
                ExportBillRadGrid.ExportSettings.IgnorePaging = True
                ExportBillRadGrid.ExportSettings.OpenInNewWindow = True
                ExportBillRadGrid.ExportSettings.FileName = "Exported-Billing-Data"
                ExportBillRadGrid.MasterTableView.ExportToExcel()


            Catch ex As Exception
                Me.Page.ErrorOnPage = True
                Utils.MiscUtils.RegisterJScriptAlert(Me, "BUTTON_CLICK_MESSAGE", ex.Message)

            Finally

            End Try

        End Sub

        Private Function SetQueryStrings() As DataTable

            Dim query As String = "select * from myTable"


            Dim dt As DataTable = New DataTable()
            Dim connString As String = ConfigurationManager.ConnectionStrings("connString").ToString()
            Dim conn As SqlConnection = New SqlConnection(connString)
            Dim adapter As SqlDataAdapter = New SqlDataAdapter()
            Dim qryCmd = New SqlCommand(query, conn)

            adapter.SelectCommand = qryCmd
            adapter.Fill(dt)

            Return dt
        End Function
    End Class

==============================================

I really need your help.

Thanks!
--
Matt
kith
Top achievements
Rank 1
 answered on 01 Aug 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?