Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
203 views

Good day. I am currently using diagram in our application. I use Server-Side Programming and bring all data from database. It builds diagram when I add a new shape to it, but when I added connection to existing shape (from 3 to 2) I've gotten the error( see attached files)

 private void BuildProcess()
    {
        ProcessDiagram.ShapesCollection.Clear();
        ProcessDiagram.ConnectionsCollection.Clear();
        string primaryEventGUID = SetPrimaryEvent();
        if (primaryEventGUID != string.Empty)
        {
            ProcessEvent primary = new ProcessEvent(primaryEventGUID);
     
            List<ProcessConnection> connecList = new List<ProcessConnection>();
            string vSQL = "SELECT ProcessConnectionGUID FROM tblBPM_ProcessConnections WHERE ProcessGUID='" + processGUID + "' ORDER BY OrderNumber";
            IDataReader getList = DB.GetRS(vSQL);
            while (getList.Read())
            {
                connecList.Add(new ProcessConnection(DB.RSFieldGUID(getList, "ProcessConnectionGUID")));
            }
            getList.Close();
            if (connecList.Count > 0)
            {
                foreach (ProcessConnection conn in connecList)
                {
                    DiagramConnection connection = new DiagramConnection();
                    connection.FromSettings.ShapeId = conn.eventGUID;
                    connection.ToSettings.ShapeId = conn.nextEventGUID;
                    connection.ContentSettings.FontWeight = "bold";
                    connection.Editable = false;
                    connection.EndCap = Telerik.Web.UI.Diagram.ConnectionEndCap.ArrowEnd;
                    connection.StrokeSettings.Width = 8;
                    connection.HoverSettings.StrokeSettings.DashType = Telerik.Web.UI.Diagram.StrokeDashType.DashDot;
                    connection.Id = conn.guid;
                    connection.ContentSettings.Text = conn.connection;
                    connection.FromSettings.Connector = "Bottom";
                    connection.ToSettings.Connector = "Top";
                    ProcessDiagram.ConnectionsCollection.Add(connection);
                }
            }

            List<ProcessEvent> eventList = new List<ProcessEvent>();
            vSQL = "SELECT ProcessEventGUID FROM tblBPM_ProcessEvents WHERE ProcessGUID='" + processGUID + "'";
            getList = DB.GetRS(vSQL);
            while (getList.Read())
            {
                eventList.Add(new ProcessEvent(DB.RSFieldGUID(getList, "ProcessEventGUID")));
            }
            getList.Close();
            if (eventList.Count > 0)
            {
                foreach (ProcessEvent item in eventList)
                {
                    EventType type;
                    if (item.guid == primary.guid)
                    {
                        type = EventType.PRIMARYEVENT;
                    }
                    else if (item.type == 3)
                    {
                        type = EventType.EVENT;
                    }
                    else
                    {
                        type = EventType.TERMINATE;
                    }
                    DiagramShape shape = GetShape(type, item.events, item.guid);
                    ProcessDiagram.ShapesCollection.Add(shape);
                }
            }
        }
    }

 private string SetPrimaryEvent()
    {
        string primaryGUID = string.Empty;
        string vSQL = "SELECT StartEventGUID FROM tblBPM_Processes WHERE ProcessGUID='" + processGUID + "'";
        IDataReader getPrimary = DB.GetRS(vSQL);
        if (getPrimary.Read())
        {
            primaryGUID = DB.RSField(getPrimary, "StartEventGUID");
        }
        getPrimary.Close();
        StartEventGUID = primaryGUID;
        ViewState["StartEvent"] = primaryGUID;
        return primaryGUID;
    }

 private DiagramShape GetShape(EventType type, string text, string value)
    {
        if (text.Length > 25)
        {
            text = text.Substring(0, 25) + "...";
        }
        if (type == EventType.TERMINATE)
        {
            text = "Ending Event";
        }
        DiagramShape shape = new DiagramShape();
        shape.Id = value;
        shape.ContentSettings.Text = text;
        shape.MinWidth = 10;
        shape.Width = 275;

        shape.Selectable = false;
        shape.ContentSettings.FontFamily = CobbleStoneCommon.AppLogic.AppConfig("UI_AppFontName");
        shape.Editable = false;
        shape.ContentSettings.Color = "#fff";
        shape.ContentSettings.FontStyle = "fill:white";

        switch (type)
        {
            case EventType.PRIMARYEVENT:
                {
                    shape.FillSettings.Color = "#4286f4";
                    break;
                }
            case EventType.EVENT:
                {
                    shape.FillSettings.Color = "#F18100";
                    break;
                }
            case EventType.TERMINATE:
                {
                    shape.FillSettings.Color = "#13d86f";
                    break;
                }
        }
        return shape;
    }

If it is possible to connect existing shape and what cause this error? Thank you.

Vessy
Telerik team
 answered on 06 Nov 2019
1 answer
111 views

I'm using v2019.2.514 and I noticed that the height of my RadWindow differs between IE and Chrome. I set a static height and do not use AutoSize.

Here's my how I define the window:

 

            <Telerik:RadWindow 
                ID="wndJobUsers" 
                runat="server" 
                Width="1050px" 
                Height="820px" 
                Modal="true"
                VisibleStatusbar="false" 
                AutoSize="false" 
                ReloadOnShow="true" 
                OnClientClose="OnShowUsersClose"
                ShowContentDuringLoad="false"
                meta:resourcekey="wndJobUsers"/>  

 

In IE developer tools, I see that the height is set to 820px and all looks fine.

In Chrome, I see that the computed to 859px.

 

I did search the forums and did find some posts that referred to this extra 39px but they are quite old and the response to these post note that there's an issue with Chrome and iframes but only refer to windows that are smaller than 150px. In my case, the window way beyond this threshold.

 

Any ideas?

 

Thanks

Loy.

 

Rumen
Telerik team
 answered on 06 Nov 2019
3 answers
225 views

Hello Guys,

i need to use MaxLength Property in GridBoundColumn But it is not working,

Is there any other way to limit the length in Clientside

Thank you

Ravi

Eyup
Telerik team
 answered on 06 Nov 2019
4 answers
217 views
I have documents stored within a column in a table.  I want to be able to search the documents for a string and return the documents that contain the string with the string highlighted within the document.  Can this be done with the Grid?  If so, please provide me with an example.  
Eyup
Telerik team
 answered on 05 Nov 2019
5 answers
106 views

Hey everyone,

Recently we have upgraded Telerik controls in our application to latest version and run into a few bugs with RadMaskedTextBox that can be reproduced on latest version of MS Edge.

I provided Telerik demo web-page instead of source code.

Case 1:  Cursor changes position after entered letter

  1. Focus on 'Phone' field
  2. Enter any letter

Expected result: cursor doesn't change position as it works in Chrome or Firefox.
Actual result: cursor change position and moves to right side.

Case 2: Page freezes while entering value

  1. Focus on 'Phone' field
  2. Enter '1234' repeatedly and press Home button in the end of the field and enter value again

Expected result: new value is replacing the old one
Actual result: at some point page freezes, user unable to do anything on the current page

Last case can be reproduced only on latest MS Edge:
Microsoft Edge 41.16299.15.0
Microsoft EdgeHTML 16.16299

Do you have any ideas how to fix these issues? Any help is appreciated.

Thank you!

Rumen
Telerik team
 answered on 05 Nov 2019
1 answer
88 views
I need to filter through files on a hard drive and return the results.  Do you have a code sample of this functionality?
Vessy
Telerik team
 answered on 05 Nov 2019
2 answers
62 views
I need to search within several thousand files within a directory for a particular string and then return those files containing the search string within a grid.  Can you provide me with an example?
Eyup
Telerik team
 answered on 04 Nov 2019
2 answers
113 views

Hi!

I tried the project in this link: https://www.telerik.com/support/code-library/implement-insensitive-diacritic-filtering-for-radgrid#IRL2f4xltESetWnM-ORejw 
I noticed that if I type more than, for instance, 10 characters like 'oliveiria' the "w3wp.exe" process crashes with a 'System.StackOverflowException'.  
Any clues why this is happening?
Thanks

Eyup
Telerik team
 answered on 04 Nov 2019
10 answers
459 views
I have a radgrid with advanced databinding. it has a template column with combobox on edit mode as follows.

 <telerik:GridTemplateColumn HeaderText="MemberType" EditFormColumnIndex="0" UniqueName="MemberType" SortExpression="MemberType">
                <ItemTemplate>                
                    <asp:Label ID="lblMemberType" runat="server" Text='<%# Eval("MemberType") %>'></asp:Label>                    
                </ItemTemplate>
                <EditItemTemplate>
                <telerik:RadComboBox runat="server" ID="cmbMemberTypes" DataTextField="Description" DataValueField="MemberTypeId" 
                    AppendDataBoundItems="true" MarkFirstMatch="true" OnSelectedIndexChanged="cmbMemberTypes_SelectedIndexChanged" >
                    <Items>
                        <telerik:RadComboBoxItem Text="" Value="" />
                    </Items>
                </telerik:RadComboBox>
                </EditItemTemplate>
            </telerik:GridTemplateColumn>

 
Now, depending on the item selected in the Member Type combobox, i want to change the text of the column 'MemberIdentifier' on Edit mode. I dont need to change Header Text. I just need to change the auto-generated label of this column in edit mode based on Member Type Selected Item.

        <telerik:GridBoundColumn DataField="MemberIdentifier" HeaderText="MemberIdentifier" UniqueName="MemberIdentifier"
                SortExpression="MemberIdentifier" FilterControlAltText="Filter Member Identifier Column" EditFormColumnIndex="1"/>

Thanks for the help in advance!!
Sri
Attila Antal
Telerik team
 answered on 04 Nov 2019
1 answer
193 views

hi,

 

could you please help how i can insert radgrid data to the database such as attached image ?

 

Thanks

Eyup
Telerik team
 answered on 04 Nov 2019
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?