Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
208 views
Hi,
Anybody can help me how to make drag and drop cell inside grid view? I would like to publish my sample code. I appricate any help or any tutorial.

Script.
function AssignDragandDrop() {
                $telerik.$('.RmEmtpyRoom').each(function () {
                    $telerik.$(this).droppable({ drop: celldrop });
                });
                $telerik.$('.RmReservation').each(function () {
                    $telerik.$(this).draggable({ helper: 'clone' });
                });
            }
            function celldrop(e, a) {
                //var oWnd = radopen(null, "winMove");
                var targetCell = $telerik.$(this);
                var targetCellIndex = targetCell.context.cellIndex;
                var targetRow = targetCell.context.parentElement;
                var targetRowIndex = targetRow.rowIndex;
                var newdate = $find('<%=grdAvailability.ClientID%>').MasterTableView.get_columns()[targetCellIndex].get_uniqueName();
                var roomkey = $find('<%=grdAvailability.ClientID%>').MasterTableView.get_dataItems()[targetRowIndex].getDataKeyValue("RoomKey");
                var reservationkey = a.draggable.context.id.split('_')[1];
                var url = '../Reservation/Update/NewMoveReservation.aspx?RK=' + reservationkey + '&D=' + newdate + '&R=' + roomkey;

                ShowRadWindow('Move Reservation', url, 650, 650);
                //var oWnd = radopen('../Reservation/Update/NewMoveReservation.aspx?RK=' + reservationkey + '&D=' + newdate + '&R=' + roomkey, "winMove");

                //var oWnd = radopen('../Reservation/Test.aspx?RK=' + reservationkey + '&D=' + newdate + '&R=' + roomkey, "winMove");
            }
Viktor Tachev
Telerik team
 answered on 24 Apr 2014
4 answers
199 views
Hello,
I have a dropdown that contains time zones. I would like change the time zone of the radscheduler client side without doing a post back. Is this possible?

Thanks,
Ron
Plamen
Telerik team
 answered on 24 Apr 2014
1 answer
80 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
166 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
144 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
324 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
312 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
258 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
101 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
902 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
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?