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.
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.
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
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
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
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!
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
hi,
could you please help how i can insert radgrid data to the database such as attached image ?
Thanks