Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
301 views
Hi,

As we are working on RAD DIAGRAM and we are trying to customise. Our requirement is to show the designed diagram even after zoom in and zoom out  but in the existing one once we zoom in and try to zoom out the designed diagram is going out of the RAD DIAGRAM window. So can you please suggest us to resolve this issue asap.

Thanks & Regards

Bhavya

Edited ShapesCollection

10 posts, 0 answers
  1. Hdereli
    Hdereli avatar
    1 posts
    Member since:
    Oct 2014

    Posted 17 Oct 2014 Link to this post

     Hi,

     RadDiagram is really nice component. I am trying to adapt this control to my project. After binding components using server-side methods, it worked fine. However I couldn't get edited shapes new properties (new title,X,Y). ShapesCollection has initial shapes. Is there any way that we can get the latest state of shapes at the server side.

     Thanks.
  2. Slav
    Admin
    Slav avatar
    1359 posts

    Posted 22 Oct 2014 Link to this post

    Hello,

    The changes that you make on the RadDiagram control are saved only on the client, so it is expected that the ShapesCollection will have the initial shapes.

    There is an option for exporting the diagram data as shown in the following demo: http://demos.telerik.com/aspnet-ajax/diagram/examples/saveload/defaultcs.aspx. Nevertheless, currently it has a bug with getting the information for modified connections. You could use the following bug item in our feedback portal to track the status of the issue, vote for it and comment it: http://feedback.telerik.com/Project/108/Feedback/Details/139644

    Regards,
    Slav
    Telerik
  3. Bhavya
    Bhavya avatar
    41 posts
    Member since:
    Aug 2015

    Posted 15 Dec 2016 in reply to Slav Link to this post

    Hi Slav,
    I am creating a raddigram as in this link "http://docs.telerik.com/devtools/aspnet-ajax/controls/diagram/functionality/shape-templates"
    but i am not using DiagramShape. i am able to get the data as shown in the picture pic1.
    later i am calling a function to check the value has been increased or not, if value increased i have to update the value. only value should be updated, i should not redraw whole shape. can i do that? if so how?
    Please help me in this context.
    in timer i am doing in this way but not able to update.
    aspx:
    <telerik:RadDiagram runat="server" ID="theDiagram" width="1330" RenderMode="Auto">
                            <ClientEvents OnClick="OnClick"  />
                            <ShapeDefaultsSettings Visual="ImageTemplate"></ShapeDefaultsSettings>
    </telerik:RadDiagram>
    ImageTemplate:
    function ImageTemplate(options) {
                       var dataviz = kendo.dataviz;
                        var group = new dataviz.diagram.Group({ autoSize: true });
                        var backGID = options.id;
                        if (backGID != "s1") {
                            group.append(new dataviz.diagram.Rectangle({
                                x: 0,
                                y: 0,
                                width: options.width,
                                height: options.height,
                                width: 195,
                                height: 75,
                                border_radius: 5,
                                background: "webkit-linear-gradient(top,  #bed2e2 0%,#abd3ee 94%,#d5ebfb 100%)",
                                fill: {
                                    color: "#bed2e2"

                                }
                            }));

                            var textWrap1 = options.content.substring(0, 12);
                            var textWrap2 = options.content.substring(12, 19);
                            group.append(new dataviz.diagram.TextBlock({
                                text: textWrap1,
                                color: "#000000",
                                x: 70,
                                y: 10
                            }));

                            if (textWrap2 != "") {
                                group.append(new dataviz.diagram.TextBlock({
                                    text: textWrap2,
                                    color: "#000000",
                                    x: 70,
                                    y: 25
                                }));
                            }


                            var img = options.content;
                            if (img.indexOf("ead") != -1) {
                                img = "../Images/Img_HeadCount.png";
                                group.append(new dataviz.diagram.TextBlock({
                                    text: options.Counter,
                                    color: "#FF0000",
                                    x: 100,
                                    y: 45
                                }));
                            }
                            else if (img.indexOf("oll") != -1) {
                                img = "../Images/Img_Rollcall.png";
                                group.append(new dataviz.diagram.TextBlock({
                                    text: options.Counter,
                                    color: "#FF0000",
                                    x: 100,
                                    y: 45
                                }));
                               
                            }
                            else {
                                img = "../Images/Img_Assembly_Point.png";
                                group.append(new dataviz.diagram.TextBlock({
                                    text: options.Counter,
                                    color: "#FF0000",
                                    x: 100,
                                    y: 45
                                }));
                            }
                            var image = new dataviz.diagram.Image({
                                source: img,
                                x: 5,
                                y: 5,
                                width: 60,
                                height: 60,
                            });
                            group.append(image);
                        }
                        else {
                            var jsonFilename = '<%=backImageUpload%>';
                            if (jsonFilename == null || jsonFilename == "") {
                                var imageFolder = "../backgroundImage/backgound.jpg";
                            }
                            else {
                                var imageFolder = "../backgroundImage/" + jsonFilename + ".jpg";
                            }

                            var wid = dataviz.DEFAULT_WIDTH;
                            var image = new dataviz.diagram.Image({
                                source: "../backgroundImage/" + options.content + ".jpg",
                                x: 10,
                                y: 7,
                                width: wid + 550,
                                height: 400 + 200,
                            });
                            group.append(image);
                        }
                        return group;
                    };
    timer function:
    function CountDownTimer() {
                        $.ajax({
                            type: "POST",
                            url: "Frm_MusteringMonitor.aspx/GetSessionValue",
                            contentType: "application/json;",
                            data: JSON.stringify(),
                            success: function (Data) {
                                if (Data.d != "") {
                               var diagramWidget1 = $find("<%= theDiagram.ClientID %>").kendoWidget;
                                    var listOfObject = JSON.parse(Data.d);
                                    var dectionaryItem = Data.d.replace(/[&\/\\#+()$~%.'"*?<>{}]/g, '');
                                    var getVal = dectionaryItem.split(',');
                                    var leng = diagramWidget1.shapes.length;
                                    var i = 1;
                                    for (i = 1; i < leng; i++) {
                                        var jsonObjName = getVal[i - 1].split(":");
                                        var DiaObjname = diagramWidget1.shapes[i].options.content;
                                        if (jsonObjName[0] === DiaObjname) {
                                            var NewValue = jsonObjName[1];
                                            diagramWidget1.shapes[i].options.Counter = NewValue ;
    // i have three shapes so doing loop here and i am able to get the value here but not updating on diagram
                                        }
                                    }
                                }
                               },
                               error: function (XMLHttpRequest, textStatus, errorThrown) {
                               }
                           });
                    }
    Thanks in advance.
  4. Slav
    Admin
    Slav avatar
    1359 posts

    Posted 20 Dec 2016 Link to this post

    Hello Bhavya,

    You can redraw the visual of the shape to show the new value. I have attached a short sample that demonstrates this approach.

    Regards,
    Slav
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  5. Bhavya
    Bhavya avatar
    41 posts
    Member since:
    Aug 2015

    Posted 20 Dec 2016 in reply to Slav Link to this post

    Hi Slav,

    Thanks for the solution. it is working now without flickering.

  6. Bhavya
    Bhavya avatar
    41 posts
    Member since:
    Aug 2015

    Posted 11 Jan Link to this post

    Hi Slav,

    There is a function CountDownTimer(),which is in previous message

    How can i change the image ,In the Attached file i have highlighted the image.

  7. Bhavya
    Bhavya avatar
    41 posts
    Member since:
    Aug 2015

    Posted 11 Jan in reply to Bhavya Link to this post

    You can redraw the visual of the shape to show the new image. I have attached a short sample that demonstrates this approach.


    Regards,
    Slav 
    Telerik by Progress
  8. Bhavya
    Bhavya avatar
    41 posts
    Member since:
    Aug 2015

    Posted 11 Jan in reply to Slav Link to this post

    Hi Slav

    How Can i redraw the visual of the shape to show the New Image.methods are same as in previous msg(count down timer). I have attached a template ,where it should affect.

    Thanx in advance

  9. Slav
    Admin
    Slav avatar
    1359 posts

    Posted 16 Jan Link to this post

    Hello Bhavya,

    You can create an Image object in the visual as shown in the following help article: http://docs.telerik.com/devtools/aspnet-ajax/controls/diagram/functionality/shape-templates

    Then you can pass the path of the new image via the options of the shape and redraw its visual similarly to how I update the content in my previous sample.

    Regards,
    Slav
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  10. Bhavya
    Bhavya avatar
    41 posts
    Member since:
    Aug 2015

    Posted 4 days and 3 hours ago in reply to Slav Link to this post

    Hi Slavs,

    Thank You For the Previous Solution,

    As we are working on RAD DIAGRAM and we are trying to customise. Our requirement is to show the designed diagram even after zoom in and zoom out  but in the existing one once we zoom in and try to zoom out the designed diagram is going out of the RAD DIAGRAM window. So can you please suggest us to resolve this issue asap.

    Thanks & Regards

    Bhavya

manjari
Top achievements
Rank 1
 answered on 31 Jan 2017
1 answer
82 views
When I add a Group using RadFilter, even when I select another operator (such as 'Or', 'Not And'  or 'Not Or'), the provider Result always shows 'And'.  I have verified that the ExpressionItem is a GroupExpression, and its GroupOperator is 'Or' when that is selected.  I can live with the display being in error, but I can't seem to access the GroupOperator = so that I can use it if that's the case.  Please advise- is this a bug?  Any actions or code to correct or at least access the values in the collection?  I have attached a screen shot showing the issue.
Milena
Telerik team
 answered on 31 Jan 2017
1 answer
214 views

Hi,

I have discovered an issue where the SelectedItem for a RadComboBox is null.

I use a System.Collections.Generic.IList to populate the RadComboBox.

When the IList has more than one item, then the RadComboBox works fine, and I can get the SelectedItem.

When the IList only has one item, then the RadComboBox has a SelectedItem of null.

Please see the attached to see how I populate the RadComboBox

Kinds regards,

Rob

 

Ivan Danchev
Telerik team
 answered on 31 Jan 2017
1 answer
86 views

Hi,

I have downloaded the Telerik components recently, but no skin is available for ComboBox although they are available in the directory (C:\Program Files\Telerik\UI for ASP.NET AJAX R1 2017\Skins)

Regards,

Sara

Ivan Danchev
Telerik team
 answered on 31 Jan 2017
9 answers
1.0K+ views

I have few text boxes and one RadAsyncUpload in the form.

When the form is submitted i am validating the text boxes in the server side and showing the validation message. 

when the validation message box is shown, The RadAsyncupload controls is getting cleared.
I want to have the radAsyncUpload Control values to be persisted for the subsequent submit.

 

Thanks

Ivan Danchev
Telerik team
 answered on 31 Jan 2017
0 answers
128 views

Hi,

I want to upgrade from RadChart to RadHtmlChart. I am using version 2014.2.724.

Below is my current code with RadChart:

<radc1:radchart id="chart1" Width="700px" Margins-Top="20%" Margins-Right="2%" Margins-Left="5%" 
Margins-Bottom="20%" Runat="server" align="centre" TextQuality="ClearTypeGridFit" ImageQuality="AntiAlias">
<Appearance FillStyle-MainColor ="White" FillStyle-SecondColor="AliceBlue"  Border-Color=""></Appearance>
<PlotArea Appearance-FillStyle-MainColor ="White" Appearance-Corners="Rectangle,Rectangle,Rectangle,Rectangle,6"
Appearance-FillStyle-SecondColor="White">
<XAxis
Appearance-TextAppearance-TextProperties-Font="Arial, 6pt"  Appearance-LabelAppearance-RotationAngle ="340" 
Appearance-MajorGridLines-Color ="DimGray" Appearance-MinorGridLines-Color ="DimGray" 
Appearance-MinorGridLines-Visible ="false" Appearance-MajorGridLines-Visible ="false" 
Appearance-MajorTick-Length=2 Appearance-MajorTick-Color ="#C9C9C7"></XAxis>

<YAxis  Appearance-TextAppearance-TextProperties-Font ="Arial, 6pt"  Appearance-Color="#C9C8C7" MaxValue="80" 
MinValue="-100"   MaxItemsCount="15" Step="20"  Appearance-MajorGridLines-Color ="DimGray" Appearance-MajorGridLines-Visible ="true" Appearance-MinorGridLines-Visible ="true" Appearance-MajorTick-Color ="#C9C8C7"  >
<AxisLabel   Visible="True"  TextBlock-Text ="Number of Cases" Appearance-Position-Auto="true" TextBlock-Appearance-TextProperties-Font ="Verdana, 11px" TextBlock-Appearance-TextProperties-Color ="Black">
</AxisLabel  >
</YAxis>
</PlotArea>
<Legend Visible="False">
<Appearance FillStyle-MainColor ="White"  FillStyle-FillType ="Solid"  Border-Color="227, 227, 227"></Appearance>
</Legend>
<ChartTitle TextBlock-Text ="Outstanding Cases - Number"  TextBlock-Appearance-TextProperties-Font ="Arial, 10pt, style=Bold"  TextBlock-Appearance-TextProperties-Color="128, 128, 255"
 TextBlock-Appearance-Position-AlignedPosition="center"  >
<Appearance FillStyle-FillType ="Solid"  FillStyle-MainColor ="White" Border-Color="White"></Appearance>
</ChartTitle>
</radc1:radchart>

 

I am binding the chart data at server side.

 

Please suggest

harshal
Top achievements
Rank 1
 asked on 31 Jan 2017
36 answers
1.6K+ views
Hello,

I want to add "ALL" option to my RadGrid Page Size combo. I want the options 50,100,150,ALL. I know we can customize the page size option. However when I am adding the "ALL" option, it is returning an error "Input string was not in correct format". The requirement is when selecting the "ALL" option I want to show all the records in the Grid.

Please advise!

Thank you,
Asok
Daniel
Top achievements
Rank 1
 answered on 30 Jan 2017
1 answer
62 views

We have an older version (2013.3.1010.45) of telerik and have recently started to see some errors with radchart.  How do we handle this type of error and what is the cause of this error?

Exception of type 'System.Web.HttpUnhandledException' was thrown.

Image could not be created    at System.Web.UI.Page.HandleError(Exception e)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest()
   at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
   at System.Web.UI.Page.ProcessRequest(HttpContext context)
   at ASP.search_mydashboard2_aspx.ProcessRequest(HttpContext context)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

John
Top achievements
Rank 1
 answered on 30 Jan 2017
2 answers
190 views

I can't seem to figure out how to keep the "Remove" button on the same line as uploaded media file.  When the file name is really short it stays on the same line but if the file name gets longer the "Remove" button drops down below.  There is plenty of horizontal space for both to be on the same line.

~Thx

Pavlina
Telerik team
 answered on 30 Jan 2017
1 answer
467 views

Okay, this took me a while to track down as the source of the problem, but I am out of options here and at my wits end. Every conversation I see even close to this is at best 2 years old, most 2010 or older, so I am desperate for help.

 

Short version:

-- radGrid on the page, GridClientSelectColumn set as first column, grud set to have AllowMultiRowSelection="true"

-- after multiple items selected, radwindow used to allow user to edit selected item(s)

If at any time after the window appears (whether it closes or not) any button that does a postback - partial or full - always throws a "Unable to cast object of type 'System.Int32' to type 'System.String'." error. I remove the "AllowMultiRowSelection="true"" (or otherwise set it to "false") everything works perfectly. If it is true, I always get the error, specifically when the grid refreshes. It does not fire any server-side code; the code dies well before it even gets to that point. The same happens is I set a radbutton to be AutoPostback="false" but then try to refresh the grid using client code; if I skip refreshing the grid completely, but I must refresh the grid each time to ensure I have the latest data on it.

Bryan
Top achievements
Rank 1
 answered on 30 Jan 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?