Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
65 views
Why is support for Dynamic Data not included in the Telerik assemblies by default? It seems that the only way to get controls that actually work with Dynamic Data is to post a question to this forum and hope you get a sample back with code that supports the features you intend to use.

Do you ever intend to rectify this? Is there a package I'm missing that will fill in the holes in your base product?
Danail Vasilev
Telerik team
 answered on 24 Apr 2014
1 answer
119 views
Please help me how to open PDF file on moust over on Template column

Shinu
Top achievements
Rank 2
 answered on 24 Apr 2014
1 answer
113 views
Hi there

I have a grid that exports to Excel, the data in the SQL Server table are NVARCHAR(4000) fields. It displays correctly, but when exporting it changes some of the diacritics to foreign characters, for example:

DB: André Letoit
Excel:  Andr頌etoit

The code I am using to export is:

/// <summary>
/// Export the Grid to XLS on Server instead of Clientside
/// </summary>
/// <param name="source"></param>
/// <param name="e"></param>
protected void uxExportRequests_GridExporting(object source, GridExportingArgs e)
{
    User currentUser = new User(HttpContext.Current.User.Identity.Name.ToString());
    string fileName = currentUser.UserID.ToString() + "_TitleRequests_" + DateTime.Now.ToShortDateString().Replace("/", "").Replace("-", "") + ".xls";
    string path = Server.MapPath("~/Requests/") + fileName;
 
    using (FileStream fs = File.Create(path))
    {
        Byte[] info = System.Text.Encoding.Default.GetBytes(e.ExportOutput);
        fs.Write(info, 0, info.Length);
    }
}
and
protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
    {               
            uxExportRequests.GridLines = GridLines.Both;
            uxExportRequests.GridExporting += new OnGridExportingEventHandler(uxExportRequests_GridExporting);
            uxExportRequests.ExportSettings.Excel.Format = GridExcelExportFormat.ExcelML;
            uxExportRequests.ExportSettings.ExportOnlyData = true;
    }
}
Is there any setting I need to change for this to keep the database characters?

Thank you.
Daniel
Telerik team
 answered on 24 Apr 2014
1 answer
291 views
Hi,

I am using RadGrid for ASP.NET. It contains a function to export data to PDF. I could achieve most of what I want but it seems it is not possible to change the font size and style of PageTitle.

Any help or comment is welcome.


The code snippet of the code-behind is shown below.

            radGrid.ExportSettings.Pdf.Title = "My Data"
            radGrid.ExportSettings.Pdf.Subject = "My Data";
            radGrid.ExportSettings.Pdf.PageTitle = "This is a page title"
            radGrid.ExportSettings.Pdf.PageWidth = Unit.Parse("297mm");
            radGrid.ExportSettings.Pdf.PageHeight = Unit.Parse("210mm");
            radGrid.ExportSettings.Pdf.PageLeftMargin = Unit.Pixel(15);
            radGrid.ExportSettings.Pdf.PageRightMargin = Unit.Pixel(15);
            radGrid.ExportSettings.Pdf.DefaultFontFamily = "Segoe UI";
            radGrid.ExportSettings.Pdf.AllowModify = false;
            radGrid.ExportSettings.Pdf.FontType = Telerik.Web.Apoc.Render.Pdf.FontType.Embed;
            radGrid.ExportSettings.Pdf.ForceTextWrap = true;
            radGrid.ExportSettings.UseItemStyles = true;



Daniel
Telerik team
 answered on 24 Apr 2014
1 answer
286 views

Hi,

We are testing the radScheduler for ASP.NET AJAX, we need to drag a branch name and ID from the tree view and create a visit schedule for that branch. On the nodeDropping event  we are creating a new appointment, can we add a new attribute to the appointment from the client side other than set_start, set_end and set_subject, like below we need to add "SiteId" as an attribute to the appointment.

                    var newAppointment = new Telerik.Web.UI.SchedulerAppointment();
                    newAppointment.set_start(startTime);
                    newAppointment.set_end(endTime);
                    newAppointment.set_subject(text);
                    newAppointment.set_description(siteId);
                    newAppointment.get_attributes().setAttribute("SiteId", siteId);

And in the server-side on post back, we will get all the appointments and update the database accordingly.

   foreach (Appointment a in RadScheduler1.Appointments)
        {
            string strSiteID;
            string strSubjectSiteId = a.Subject;
            DateTime startDate = a.Start;           
           string siteID = a.Attributes["SiteId"];         
        }

There is no error thrown we set the attribute at the client side, but in server side we are getting null and this attribute count is set to 0.
We have added the CustomAttributeNames="SiteId" into the markup.

Can you please guide us how we can add a custom attribute to the a Telerik.Web.UI.SchedulerAppointment.

Thank you

Regards,
Majid

 

Boyan Dimitrov
Telerik team
 answered on 24 Apr 2014
1 answer
231 views
1.if (!Page.IsPostBack)
2.{
3.    DataTable table = agenda.GetMeetings(DateTime.Now.AddDays(-30), DateTime.Now.AddDays(30));
4.    var meetings = table.AsEnumerable().OrderByDescending(m => m.Field<DateTime>("StartTime"));
5. 
6.    RadGrid1.DataSource = meetings;
7.    RadGrid1.DataBind();
8.}

Above is the databinding code.

Here is the GridHyperLinkColumn:

1.<telerik:GridHyperLinkColumn Text="View Agenda" HeaderText="" DataNavigateUrlFields="MeetingID"
2.    DataNavigateUrlFormatString="~/Routing/ViewAgenda.aspx?MeetingID={0}">
3.</telerik:GridHyperLinkColumn>

The column does not populate the DataNavigateURLFields property if the table is bound after the AsEnumberable conversion. If binding directly to the DataTable type, the hyperlink will work.
Eyup
Telerik team
 answered on 24 Apr 2014
1 answer
85 views
I use version 2011.1.413.35
LinkManager is missing OK button in Internet Explorer 11 but the buttons are visible in Firefox and Chrome.

Jon
Top achievements
Rank 1
 answered on 24 Apr 2014
15 answers
827 views
I have 4 row fields defined in RadPivotGrid. I made all row fields colapsed initially by set RowGroupsDEfaultExpanded attribute to false. But once I click the expand button on top level, it expands all 4 level for me, but I expect just expand level 2. Is there any way to change it? Thanks.
Angel Petrov
Telerik team
 answered on 24 Apr 2014
1 answer
226 views
Prior to adding the OnClientClose event handler, closing the RadWindow did not cause a postback.  I added the following function to the RadWindow as the OnClientClose event handler, and now the parent window refreshes with a postback anytime the RadWindow is closed.  The event handler's purpose is to hide a the DropDownList of a RadComboBox within the RadWindow that isn't hidden properly if it's displayed and the user closes the RadWindow (The RadWindow closes, but the RadComboBox's DropDownList remains displayed until you click elsewhere on the page).  How can I prevent the postback?

There are no other Unload or Closing related events on the RadWindow.  Like I said, without the event handler for ClientClose, closing the RadWindow does not cause a postback of the parent window.  I didn't think hideDropDown() would cause a postback (at least, looking at its definition, it doesn't look like it should).

​function rwPOAOptionsDialog_ClientClose(sender, args) {
    $('#<%=luPatient.ClientID%>_cbLookup').hideDropDown();
}
Shinu
Top achievements
Rank 2
 answered on 24 Apr 2014
6 answers
136 views
Protected Sub RadGridProducts_ItemCommand(ByVal source As ObjectByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGridProducts.ItemCommand 
        ViewState("GridItem") = e.Item ' gets the selected row for detail 
        LblException.Text = "" 
        Select Case e.CommandName 
             
        End Select 
    End Sub 
 
Protected Sub RadGridProducts_DetailTableDataBind(ByVal source As ObjectByVal e As Telerik.Web.UI.GridDetailTableDataBindEventArgs) Handles RadGridProducts.DetailTableDataBind 
        Try 
            Dim item As GridItem = CType(ViewState("GridItem"), GridItem) 
            Dim ProductId As String = RadGridProducts.MasterTableView.DataKeyValues(item.ItemIndex)("Id").ToString() 
            Dim DTable As DataTable = DataAccess.Products.GetAllProductPricesById(ProductId) 
            RadGridProducts.MasterTableView.DetailTables(0).DataSource = DTable 
            RadGridProducts.MasterTableView.DetailTables(0).DataBind() 
        Catch ex As Exception 
        End Try 
    End Sub 
i want to bind the details table view  programmatically with the above code.
But This Gives an error as follows

Type 'Telerik.Web.UI.GridDataItem' in Assembly 'Telerik.Web.UI, Version=2008.3.1314.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4' is not marked as serializable.

Please Help me i dont want to use DataSource Controls as our Project DAL is written in classic way.
Thanks
Angel Petrov
Telerik team
 answered on 24 Apr 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?