HI
What would cause this line to return Undefined. This was working in the VB version, but I'm redoing it in C# binding to an oData webservice deserialised using NewtonSoft.json library.
function OnClientAppointmentClick(sender, eventArgs) {
var booking_id = eventArgs.get_appointment().get_attributes().getAttribute("Id");
alert(booking_id);
I have the id in the datasource and the following markin in the control.
DataKeyField="Id"
CustomAttributeNames="Id"
DataSubjectField="Descrption"
DataStartField="SlotStart"
DataEndField="SlotEnd"
<
telerik:RadComboBox
ID
=
"radcmbProduct"
runat
=
"server"
Width
=
"400px"
Height
=
"200px"
AllowCustomText
=
"false"
EmptyMessage
=
"Select a Product"
EnableLoadOnDemand
=
"True"
ShowMoreResultsBox
=
"true"
DropDownWidth
=
"600px"
EnableVirtualScrolling
=
"true"
HighlightTemplatedItems
=
"true"
MarkFirstMatch
=
"true"
ItemsPerRequest
=
"60"
NoWrap
=
"true"
OnItemsRequested
=
"radcmbProduct_ItemsRequested"
OnItemDataBound
=
"radcmbProduct_ItemDataBound"
>
<
HeaderTemplate
>
<
ul
>
<
li
class
=
"col1"
>Title</
li
>
<
li
class
=
"col2"
>System</
li
>
<
li
class
=
"col3"
>Price</
li
>
</
ul
>
</
HeaderTemplate
>
<
ItemTemplate
>
<
ul
>
<
li
class
=
"col1"
>
<%# DataBinder.Eval(Container.DataItem, "Title") %></
li
>
<
li
class
=
"col2"
>
<%# DataBinder.Eval(Container.DataItem, "GameSystemName")%></
li
>
<
li
class
=
"col3"
>
<%# DataBinder.Eval(Container.DataItem, "DisplayPrice")%></
li
>
</
ul
>
</
ItemTemplate
>
</
telerik:RadComboBox
>
private DataSet GetProductDataSet(string productText)
{
string errorMsg = string.Empty;
DataSet DS = new DataSet();
Product.GetByName(FacilityID, productText, ref DS, ref errorMsg);
return DS;
}
protected void radcmbProduct_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
{
DataSet data = GetProductDataSet(e.Text);
radcmbProduct.DataSource = data;
radcmbProduct.DataBind();
}
protected void radcmbProduct_ItemDataBound(object sender, RadComboBoxItemEventArgs e)
{
e.Item.Text = ((DataRowView)e.Item.DataItem)["Title"].ToString() + " | " + ((DataRowView)e.Item.DataItem)["GameSystemName"].ToString() + " | " + ((DataRowView)e.Item.DataItem)["DisplayPrice"].ToString();
e.Item.Value = ((DataRowView)e.Item.DataItem)["ProductID"].ToString();
}
Hi
is it possible to show custom images / image files in the chart, over the scatterlineseries?
If possible, could you provide some examples
Regards,
Auvo
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.