Hi,
I am trying to achieve what is shown in the KendoUi version screenshot in my WebUi project.
Is this possible?
I currently have grouping by resource vertically but would like to be able to add sub resources that each have their own lane as in the Kendo example.
Is this possible?
<
telerik:RadGantt
runat
=
"server"
ID
=
"GanttChart"
CssClass
=
"GanttChart"
OnDataBound
=
"GanttChart_DataBound"
Skin
=
"Silk"
ListWidth
=
"400px"
Height
=
"450px"
Width
=
"1000px"
SelectedView
=
"WeekView"
AutoGenerateColumns
=
"false"
WorkWeekStart
=
"Monday"
WorkWeekEnd
=
"Friday"
>
<
Columns
>
<
telerik:GanttBoundColumn
DataField
=
"Title"
HeaderText
=
"Attivita"
DataType
=
"String"
UniqueName
=
"Title"
Width
=
"150px"
AllowEdit
=
"false"
></
telerik:GanttBoundColumn
>
<
telerik:GanttBoundColumn
DataField
=
"Start"
HeaderText
=
"Inizio"
DataType
=
"DateTime"
UniqueName
=
"Start"
DataFormatString
=
"dd/MM/yy"
Width
=
"65px"
AllowEdit
=
"false"
/>
<
telerik:GanttBoundColumn
DataField
=
"End"
HeaderText
=
"Fine"
DataType
=
"DateTime"
UniqueName
=
"End"
DataFormatString
=
"dd/MM/yy"
Width
=
"65px"
AllowEdit
=
"false"
/>
<
telerik:GanttBoundColumn
DataField
=
"PercentComplete"
HeaderText
=
"Completamento"
DataType
=
"Number"
UniqueName
=
"PercentComplete"
Width
=
"110px"
AllowEdit
=
"false"
/>
</
Columns
>
<
YearView
UserSelectable
=
"true"
/>
<
DataBindings
>
<
TasksDataBindings
IdField
=
"ID"
ParentIdField
=
"ParentID"
StartField
=
"Start"
SummaryField
=
"Summary"
EndField
=
"End"
TitleField
=
"Title"
PercentCompleteField
=
"PercentComplete"
OrderIdField
=
"OrderID"
/>
<
DependenciesDataBindings
TypeField
=
"Type"
IdField
=
"ID"
PredecessorIdField
=
"PredecessorID"
SuccessorIdField
=
"SuccessorID"
/>
</
DataBindings
>
</
telerik:RadGantt
>
public
XElement GetGantTasksByProjectId(
int
projectId)
{
using
(var db =
new
HrNoteEntities())
{
var tasks = (from t
in
db.vw_sw_GanttTasks
where t.ProjectId == projectId
orderby t.ParentId, t.Start
select
new
{
ID = t.ID,
ParentId = t.ParentId,
Start = t.Start,
End = t.End,
PercentComplete = t.PercentComplete ==
null
? 0 : t.PercentComplete,
Summary = t.Summary == 1 ?
true
:
false
,
ProjectId = t.ProjectId,
Title = t.Title
});
XElement tasksList =
new
XElement(
"Tasks"
);
int
hasNext = 0;
foreach
(var item
in
tasks)
{
XElement task;
if
(item.ParentId > 0)
hasNext = 0;
else
hasNext = 1;
task =
new
XElement(
"Task"
,
new
XElement(
"ID"
, item.ID),
new
XElement(
"ParentID"
, item.ParentId),
new
XElement(
"Start"
, item.Start.ToString()),
new
XElement(
"End"
, item.End.ToString()),
new
XElement(
"Title"
, item.Title),
new
XElement(
"PercentComplete"
, ((
decimal
)item.PercentComplete).ToString(
"G"
)),
new
XElement(
"Summary"
, item.Summary),
new
XElement(
"Expanded"
,
true
),
new
XElement(
"OrderID"
, item.ProjectId)
);
if
(hasNext == 1 && tasksList.HasElements)
tasksList.Add(
new
XElement(
"NextID"
, item.ID));
tasksList.Add(task);
}
return
tasksList;
}
}
public
XDocument GetGanttByProjectId(
int
projectId)
{
XDocument xdoc =
new
XDocument();
XElement project =
new
XElement(
"Project"
);
xdoc.Declaration =
new
XDeclaration(
"1.0"
,
"utf-16"
,
"true"
);
project.Add(GetGantTasksByProjectId(projectId));
xdoc.Add(project);
return
xdoc;
}
// Binding
GanttChart.DataSource = model.GetGanttDataSource(selectedProjectId);
GanttChart.DataBind();
Hello I hope you can help me.
I want to show fixed hours in xaxis, but graphic all values in datasource
In this example, I want to have in xaxis 10:00, 11:00, 12:00, 13:00, 14:00, but maybe in my datasource i'll have values: 10:02, 10:10, 11:15 .
Hi,
Is it possible to have RadLinkButton in Datalist? Because the OnItemCommand() event in DataList is not firing.
Can anyone show me an example?
Hi there.
I just upgraded to 2016.3.914.35 and now a blue border appears around my radmenu when clicking on it to expand an option. Please refer to the attached screen shot.
This is only in chrome.
It doesn't appear in MS Edge, MS Internet Explorer or Firefox.
Please help.
Thanks in advance.
Hi ,
I have a tab strip with five "li" tags.Two tabs contains grids in it.The last tab which is also having the grid is not loading as it is not hitting the "onTabSelect" function.
All other tabs are hitting this function but last one does not.This is happening only in Microsoft Edge Browser.
function onTabSelect(e) {
$("#load").text("Loading ...");
uncheckedSelectedTab();
if (e.item.innerText == "ABC") {
Method1();
} //Added for 105423 - end
else if (e.item.innerText == "DEF") {
Method2();
}
else if (e.item.innerText == "PQR") {
Method3();
}
.....
}
Please help.
Regards,
Sandhya.
I need to add an image icon in GridColumnGroup near the column text.
Is there a way to add it?
Hi Team,
I am facing a issue in RadGrid, when EditMode="Batch",BatchEditingSettings-EditType="Cell" BatchEditingSettings-OpenEditingEvent="Click".
If I have result of 10 rows, I click on a cell in a columns and I need to choose a value from dropdown, but I do not select any value and click on another cell in same column, then I receive a Error : Unable to get property 'replace' of undefined or null reference with below reference.
b.RadComboBox.htmlDecode=function(c){return b.RadComboBox.replace(c,{"<":"<",">":">",""":'"',"&":"&"});
};
b.RadComboBox.htmlEncode=function(c){return b.RadComboBox.replace(c,{"&":"&","<":"<",">":">"});
};
b.RadComboBox.isIEDocumentMode8=function(){return document.documentMode&&document.documentMode==8;
};
b.RadComboBox.replace=function(e,d){for(var c in d){e=e.replace(new RegExp(c,"g"),d[c]);
Can you please help me on this.
~
Sandeep