Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
94 views

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"

Andy Green
Top achievements
Rank 2
 answered on 23 Sep 2016
9 answers
242 views
I have a RadComboBox with multiple columns of text shown, I have not found a solution to the virtual scrolling duplicating all items in the combo.

Here is the code - aspx:

<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>

and here is the code behind:

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();
        }


So I need to find a way to prevent the items duplicating on scrolling, while maintaining the multiple column text capability.   I have tried adding radcmbProduct.Items.Clear()  prior to the DataBind() in the Items Requested method, however, this had no effect.

I have tried using the attributes as suggested in a previous post however, there were issues with that where the multi-column would only populate the first column.  

I have not found a working solution.

joseph
Top achievements
Rank 1
 answered on 22 Sep 2016
3 answers
144 views

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

 

Vessy
Telerik team
 answered on 22 Sep 2016
2 answers
137 views
I am using Telerik RadGrid for AJAX UI. The grid is being used in batch edit mode. Grid has a column which needs to display dropdown in edit mode. In telerik forums, the approach is used by using SQLDatasource. But I wish to populate the dropdown when the the cell is clicked. I guess the only way to achieve is to use the client side api. Can somebody guide me on how to achieve this.
Shridhar
Top achievements
Rank 1
 answered on 22 Sep 2016
1 answer
87 views

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?

Dimitar
Telerik team
 answered on 22 Sep 2016
4 answers
230 views
Hi,

I'm trying to show more than one projects on a single GanttChart. I've tried using an xmlProvider an using the structure <Projects><Project><Tasks><Task>, but nothing happens. The xmlProvider throw me an exception "incorrect structure". There's any way to do that?

my code:
<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>
My code behind
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();


Any Idea?

Thanks,
Guss
Top achievements
Rank 2
Veteran
 answered on 22 Sep 2016
1 answer
140 views

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 .

 

 

Marin Bratanov
Telerik team
 answered on 22 Sep 2016
13 answers
178 views
Hi

I use telerik RadScheduler for application in which i have to make reservations using the scheduler.
The problem what i have is this. Due to our database design we have reservations that use multiple resources.
For example i have reservation in which i use Resource 1 and Resource 2.
Also the application is grouped by this resources: Resource 1, Resource 2, Resource 3  ...
In our database the relation between reservation - resource is many to many so when i make select to bind it to the scheduler i have the same reservation two times, one for Resource 1 and one for Resource 2. This reservation is show twice in the Resource 1 column and in Resource 2 column.
I have allowed drag and drop functionality. Before this on the scheduler everything worked fine.
When i drag and drop the reservation from Resource 1 to another time it's OK (Resource 1 is first column, than comes Resource 2 column). But when i try to drag the reservation from Resource 2 (this is basically the same reservation as that in Resource 1) appointment update method handler doesn't get executed.
I think this is because the two reservations (in the database is one reservation) have the same ID.
In the attachment you have the image of my scenario.

Can anybody tell me how to find work around this problem.

Thanks
Peter Milchev
Telerik team
 answered on 22 Sep 2016
1 answer
106 views

Hi, 

Is it possible to have RadLinkButton in Datalist? Because the OnItemCommand() event in DataList is not firing. 

Can anyone show me an example?

Marin Bratanov
Telerik team
 answered on 22 Sep 2016
1 answer
137 views

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.

 

Dimitar
Telerik team
 answered on 22 Sep 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?