Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
204 views
Hi, I use the RadDataform to manage some company news within my application. (NewsData object - )

I was able to manage the addition of a RadAsyncUpload in the ItemInsertTemplate mixed with a RadBinaryImage.
When the user upload an image, a preview of the image is shown by the BinaryImage (using this example http://demos.telerik.com/aspnet-ajax/imageeditor/examples/imageupload/defaultcs.aspx?product=asyncupload)

Using the RadDataForm, I went with the manual CRUD approch. I read your article about the manual CRUD using the _ItemInserting method.
So my code is

protected void RadDataForm1_ItemInserting(object sender, RadDataFormCommandEventArgs e)
    {
        RadDataFormInsertItem insertedItem = e.DataFormItem as RadDataFormInsertItem;
        Hashtable newValues = new Hashtable();
        insertedItem.ExtractValues(newValues);
 
        RPKNewsData test = new RPKNewsData(newValues);
        test.Save();
    }

This is my code when the ImageUploadEvent is raised on the server side when the user upload an image.
protected void Test2_FileUploaded(object sender, FileUploadedEventArgs e)
    {
        RadDataFormEditableItem editItem = ((Telerik.Web.UI.RadWebControl)(sender)).NamingContainer as RadDataFormEditableItem;
        RadBinaryImage bImg = editItem.FindControl("RadBinaryImage1") as RadBinaryImage;
        byte[] image;
        long fileLength = e.File.InputStream.Length;
        image = new byte[fileLength];
        e.File.InputStream.Read(image, 0, image.Length);
        bImg.DataValue = image;
    }

My problem is: the Image key in my hashtable is null. But all the other properties are filled correctly according to my Business object. 
I even tried to browse RadDataForm1.FindControl("RadBinaryImage1") and the binaryimage is set to an URL.

Is there a way to get the binary data of the image so i can save it in my database manually.







Riad
Top achievements
Rank 1
 answered on 16 Jan 2015
2 answers
61 views
Hi Telerik Admin, I want to develop Drag & Drop of Rows in Telerik Grid. But I need to achieve that @ the row level now what do I mean @ the row level means.
User being able to select a nested/merge row and drop it. 

Example 1: check this image : http://s17.postimg.org/osoays467/Pic_1.png

If a user wants to add Row “Doc Type 2” which is currently associated with “Property Two”. User can drag row “Doc Type 2” and drop that row under “Doc Type 3”. This will essentially present the view below to the user

Example 2: check this image : http://s24.postimg.org/qubp19apx/Pic_2.png

Here is the view that the user currently has. User now drags Doc Type 2 (selected section) and tries to paste it under Utilities. This functionality will not be allowed since there is no category and sub category selected (highlighted)

Example 3: check this image : http://s17.postimg.org/ds3ruwhzz/Pic_3.png

Current view for the user is : 

Example 4: check this image : http://s23.postimg.org/73ospdfaz/Pic_4.png 

User now has the ability to sort Doc Type 1 and Doc Type 2 for Property Two i.e. User will drag “Doc Type 2” row and drop it over “Doc Type 1” to get the view as shown above : Example 4: check this image : http://s30.postimg.org/aljpjmojl/Pic_5.png

















Pavlina
Telerik team
 answered on 16 Jan 2015
2 answers
177 views
Hi Telerik Admin,

I want to implement the row + cell drag and drop functionality, Please let me know the step by step instructions to implement the same. I am struggle to find about in your website.
Pavlina
Telerik team
 answered on 16 Jan 2015
2 answers
114 views
We’re starting a business application that is centered on
charting data for huge projects and as we migrate from the standard Chart to
the HtmlChart I need to understand what limitations we’ll face (please note we
have been using Telerik products since 2008):

1. It seems there is a Date limitation on the Y axis,
could you please verify

2. Are the elements on the chart clickable (we need to
click on a Line and provide the breakdown of its data)

3. Can we draw a line with (x1,y1) and (x2,y2)

4. Are we able to zoom in and out

5. Is the user able to move the lines and get an event
triggered to take action on the server-side

6. What other limitations can tell us about

7. Where can I find your plans for this control for 2015

8. If we can solve these issues with the old RadChart, would you support us with it

I really appreciate your help with this – the module will be
used for very large projects (first project is $4bil) to monitor the
performance of specific segments of the projects with something called
Lines-Of-Balance.

Thank you,
-Sam
Sam
Top achievements
Rank 1
 answered on 16 Jan 2015
5 answers
213 views

I have the below markup, and in IE11, I get a horizontal scroll, which is equivalent to the width of my MasterTableView Border if the Grid is in a Tooltip.  This does not happen in Chrome.

Version: 2014.3.1024.40

The only way I can get rid of the Horizontal scroll, is to specifically set the width of the MasterTableView to be the width of
my grid minus my border width times 2 , then the width is correct and I get NO scroll.  

The rendered html shows 100% if I omit the width on the MasterTableView, but yet I get a border if the grid's in a Tooltip and I don't specify the width as defined above.


 
<telerik:RadToolTip ID="rttPerformanceData" runat="server" HideEvent="ManualClose"
       Modal="False" Title="Select To View Performance Data Being Returned" Position="BottomCenter"
       RelativeTo="BrowserWindow" ShowEvent="FromCode" EnableViewState="True" ShowCallout="false"
       ShowDelay="0" AutoCloseDelay="0" Visible="false">
       <telerik:RadGrid ID="rgAirSoundModels" runat="server" AutoGenerateColumns="False"
           BorderWidth="0" GridLines="Both" Visible="true" AllowSorting="true" Width="500px"
           CommandItemStyle-HorizontalAlign="Right" EnableLinqExpressions="false" MasterTableView-TableLayout="Fixed">
           <MasterTableView DataKeyNames="pm_ProductModelID" TableLayout="Fixed" BorderWidth="1" BorderStyle="Solid" BorderColor="Gray">
Galin
Telerik team
 answered on 16 Jan 2015
7 answers
192 views
Is there a way or method for displaying the error message/warning for RadDateInput1 from a Javascript function?  For example, the user does not enter a value in RadDateInput1, and my Javascript function returns dateInput.get_SelectedDate = null; return false;  - so it doesn't postback to the server.  But I would like my RadDateInput1 to show the user that they need to add/change a value by displaying the error you would normally get if you entered a value that was not a date.
Vasil
Telerik team
 answered on 16 Jan 2015
1 answer
89 views
Hello,

I am using Radscheduler with telerik version 2014.3.1209.40. I have inline template with one textbox and two combobox. What I want to do is when the user click enter after fill in details, I want to save the appointment. Currently, when we click enter, the page redirected to Home page. Is there any possible ways to save when user click enter? My requirement is not to have save button inside template. 

There is another problem also. I don't allow user to drag and drop to another timeslot. But it can still see something like " || " on both side of timeslot. We will have cancel button on right side of timeslot. The problem is when we click between cancel button and this " || " marking, timing becomes 00:00. And sometimes the timeslot shift to another employee's slot. How can I prevent it? 

Thanks in advance.

Best regards,
Ei Wai
Boyan Dimitrov
Telerik team
 answered on 16 Jan 2015
5 answers
903 views
Hi all,

I need, if possibile, an example of how to add an "OK" button inside a notification to close it (instead of using the X on the top right corner).

I'm playing around with it, but it doesn't work.

Thank you.
Marin Bratanov
Telerik team
 answered on 16 Jan 2015
1 answer
89 views
I used this code to add a 2nd y axis
Dim axis As Telerik.Web.UI.AxisY = New Telerik.Web.UI.AxisY
axis.Name = "AdditionalAxis"
Rad1.PlotArea.AdditionalYAxes.Add(axis)

and when creating series I can tell a series to bond to the 2nd additional axis with
oSeries.AxisName = "AdditionalAxis"

but my 2nd axis is on the left side - how do I tell it (with API) to dock to the right side of the chart?
I see it in the example here but don't see how it is done.
http://demos.telerik.com/aspnet-ajax/htmlchart/examples/functionality/multipleyaxes/defaultvb.aspx?show-source=true
Danail Vasilev
Telerik team
 answered on 16 Jan 2015
1 answer
152 views
Hi

We are having lots of trouble with trying to set labels for a stacked bar chart.
Here is the C# code to generate the chart.

foreach (var jItem in jobsViewModels)
{
RadHtmlChartJobsProgress.Visible = true;
for (var i = 0; i < jItem.JobStepsBreakdownList.Count; i++)
{
var newSeries1 = new BarSeries();
newSeries1.GroupName = jItem.JobName;
foreach (var jItem in jobsViewModels)
{
RadHtmlChartJobsProgress.Visible = true;
for (var i = 0; i < jItem.JobStepsBreakdownList.Count; i++)
{
var newSeries1 = new BarSeries();
newSeries1.GroupName = jItem.JobName;
newSeries1.DataFieldX = newSeries1.GroupName;
if (i == 0)
{
newSeries1.Stacked = true;
// var newAxis = new AxisItem();
// newAxis.LabelText = jItem.JobName;
// RadHtmlChartJobsProgress.PlotArea.XAxis.Items.Add(newAxis);
                        
                    }
// newSeries1.Name = jItem.JobName;
RadHtmlChartJobsProgress.PlotArea.Series.Add(newSeries1);
var item = new CategorySeriesItem();
item.BackgroundColor = Color.Green;
item.Y = 1;
if (jItem.JobStepsBreakdownList[i].RagStatusName == "Red")
{
item.BackgroundColor = Color.Red;
}
else if (jItem.JobStepsBreakdownList[i].RagStatusName == "Amber")
{
item.BackgroundColor = Color.Orange;
}
else if (jItem.JobStepsBreakdownList[i].RagStatusName == "Complete")
{
item.BackgroundColor = Color.LightBlue;
}
else
{
item.BackgroundColor = Color.Green;
}
newSeries1.TooltipsAppearance.ClientTemplate = "Milestone: " +
jItem.JobStepsBreakdownList[i].WorkflowStepName;
newSeries1.SeriesItems.Add(item);
newSeries1.LabelsAppearance.Visible = false;
// RadHtmlChartJobsProgress.PlotArea.Series[i].Items.Add(item);
}
RadHtmlChartJobsProgress.PlotArea.XAxis.LabelsAppearance.Visible = true;
RadHtmlChartJobsProgress.DataBind();
}
if (i == 0)
{
newSeries1.Stacked = true;
// var newAxis = new AxisItem();
// newAxis.LabelText = jItem.JobName;
// RadHtmlChartJobsProgress.PlotArea.XAxis.Items.Add(newAxis);
newSeries1.DataFieldX = newSeries1.GroupName;
}
// newSeries1.Name = jItem.JobName;
RadHtmlChartJobsProgress.PlotArea.Series.Add(newSeries1);
var item = new CategorySeriesItem();
item.BackgroundColor = Color.Green;
item.Y = 1;
if (jItem.JobStepsBreakdownList[i].RagStatusName == "Red")
{
item.BackgroundColor = Color.Red;
}
else if (jItem.JobStepsBreakdownList[i].RagStatusName == "Amber")
{
item.BackgroundColor = Color.Orange;
}
else if (jItem.JobStepsBreakdownList[i].RagStatusName == "Complete")
{
item.BackgroundColor = Color.LightBlue;
}
else
{
item.BackgroundColor = Color.Green;
}
newSeries1.TooltipsAppearance.ClientTemplate = "Milestone: " +
jItem.JobStepsBreakdownList[i].WorkflowStepName;
newSeries1.SeriesItems.Add(item);
newSeries1.LabelsAppearance.Visible = false;
// RadHtmlChartJobsProgress.PlotArea.Series[i].Items.Add(item);
}
RadHtmlChartJobsProgress.PlotArea.XAxis.LabelsAppearance.Visible = true;
RadHtmlChartJobsProgress.DataBind();
}


If we enable the Add Axis code, we get all of the series items stuffed into 1 axis item. If we do not we cannot get a stacked series to have an X-Axis name but the series do display correctly.
How can we can do this? Help please!
Danail Vasilev
Telerik team
 answered on 16 Jan 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?