Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
145 views
I am probaly missing something but how does one expand child items of a child of a root item when the child is clicked when using a databound radpanel?
<telerik:RadPanelBar ID="RadPanelBar1" Runat="server" DataFieldID="DataFieldID"
    DataFieldParentID="DataFieldParentID"
    DataNavigateUrlField="DataNavigateUrlField" DataSourceID="sds_ITC_MenuConsole"
    DataTextField="DataTextField" DataValueField="DataTextField" Width="250px"
    PersistStateInCookie="True" Skin="WebBlue" ExpandMode="MultipleExpandedItems">
    <DataBindings>
        <telerik:RadPanelItemBinding SelectedImageUrlField="ImageURL"
            ExpandedImageUrlField="ImageURL" HoveredImageUrlField="ImageURL"
            ImageUrlField="ImageURL" />
        <telerik:RadPanelItemBinding ImageUrlField="ImageURL" />
    </DataBindings>
</telerik:RadPanelBar>


Root 32 NULL Network Operations Center ~/ITC_Console/noc/noc.aspx
Child 33 32 NOC Tools NULL
Child Item 34 33 Server Room Check Log ~/ITC_Console/noc/server_room_check_log.aspx
Child Item 35 33 Master Projects ~/ITC_Console/noc/master_projects.aspx
Child Item 36 33 Projects ~/ITC_Console/noc/projects.aspx
Child Item 37 33 Tasks ~/ITC_Console/noc/tasks.aspx
Child Item 38 33 Parts on Order ~/ITC_Console/noc/parts.aspx
Child Item 39 33 Procedures Calendar ~/ITC_Console/noc/procedures/procedures.aspx
Child Item 40 33 NOC Notes ~/ITC_Console/noc/noc_notes/noc_notes.aspx





Peter
Telerik team
 answered on 05 Jul 2012
1 answer
87 views
Hi,

I have a Chart set up to use rotated labels on the X axis:

      chartAxis.Appearance.LabelAppearance.RotationAngle = 45;
      chartAxis.Appearance.LabelAppearance.Position.Auto = false;
      chartAxis.Appearance.LabelAppearance.Position.AlignedPosition = AlignedPositions.Top;
      chartAxis.AutoScale = false;

The result is very much like the demo that can be seen here:
http://demos.telerik.com/aspnet-ajax/controls/examples/integration/chartandtooltip/defaultcs.aspx?product=chart

The actual x-axis labels don't line up with their corresponding points. Is there a way to shift or align the labels so the top of the text is level with the point marker for the correct point.

Regards
Liz
Evgenia
Telerik team
 answered on 05 Jul 2012
6 answers
111 views
Hi,

I was wondering if the AJAX Q2 2012 is compatible with VS 2012 RC as I am having issues.

many thanks,

Francis
Aylin
Telerik team
 answered on 05 Jul 2012
1 answer
180 views
Hi I urgantly need some help
I have a RadGrid with myltiple Fields of which 2 is DateTimeColumns
I use the NeedDataSource to get data from a DataTable in the Database.
I need the EndDate Column to be able to Take nulls and Display Nulls When Returned from Database.
I can Insert Send Null Values To the Database When Inserting. But When I Need to Get The Null Date Back From The Database
I keep getting the Error: Specified cast is not valid.  regarding the DateTime of EndDate.

This is my Form Code:
<telerik:RadGrid ID="rgParameters" runat="server"
          AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True"
          AlternatingItemStyle-BackColor="white" GridLines="None"
          GroupingEnabled="False" Width="100%" Height="500px"
          AutoGenerateColumns="False"
          ondeletecommand="rgParameters_DeleteCommand"
          oninsertcommand="rgParameters_InsertCommand"
          onneeddatasource="rgParameters_NeedDataSource"
          onupdatecommand="rgParameters_UpdateCommand"
          oniteminserted="rgParameters_ItemInserted">
          <AlternatingItemStyle BackColor="White" />
          <MasterTableView Caption="Parameters"
              CommandItemDisplay="TopAndBottom"
              DataKeyNames="ScheduleParaID,StartDate,EndDate,WeekScheduled,WEPHScheduled"
              ShowFooter="true">
              <Columns>
                  <telerik:GridBoundColumn AllowFiltering="False" AllowSorting="False"
                      DataField="ScheduleParaID" HeaderText="ScheduleParaID"
                      ReadOnly="true" UniqueName="ScheduleParaID" Visible="False">
                  </telerik:GridBoundColumn>
                  <telerik:GridDateTimeColumn AllowFiltering="False" DataField="StartDate"
                      HeaderText="Start Date" UniqueName="StartDate" DataFormatString="{0:dd/MM/yyyy}">
                  </telerik:GridDateTimeColumn>
                  <telerik:GridDateTimeColumn AllowFiltering="False" DataField="EndDate"
                      HeaderText="End Date" UniqueName="EndDate" DataFormatString="{0:dd/MM/yyyy}" Reorderable="True">
                  </telerik:GridDateTimeColumn>
                  <telerik:GridNumericColumn AllowFiltering="False" DataField="WeekScheduled"
                      HeaderText="Trains Scheduled (Week Days)" UniqueName="WeekScheduled" AllowRounding="False">
                  </telerik:GridNumericColumn>
                  <telerik:GridNumericColumn AllowFiltering="False" DataField="WEPHScheduled"
                      HeaderText="Train Scheduled (WE and Public Holidays)" UniqueName="WEPHScheduled"  AllowRounding="False">
                  </telerik:GridNumericColumn>
              </Columns>
              <EditFormSettings EditFormType="AutoGenerated"></EditFormSettings>
          </MasterTableView>
      </telerik:RadGrid>

This is my Code Behind part one.
protected void rgParameters_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            TrainOperationParameters tparam = new TrainOperationParameters();
            rgParameters.DataSource = tparam.Select();
            tparam = null;  
        }

This is my Code Behind For My DataEntity
[DataObjectMethod(DataObjectMethodType.Select, true)]
        public List<TrainOperationParameters> Select()
        {
            List<TrainOperationParameters> list = new List<TrainOperationParameters>();
            DataTable dt;
 
            try
            {
                dt = DataMethods.ReturnMultipleRowResultSet("[IM].[GetTrainOpParameters]", String.Empty);
                if (dt.Rows.Count > 0)
                {
                    foreach (DataRow dr in dt.Rows)
                    {
                        TrainOperationParameters param = new TrainOperationParameters();
                        param.ScheduleParaID = Convert.ToInt32(dr["TrainOpParaID"]);
                        param.StartDate = (DateTime)dr["StartDate"];
                        param.EndDate = ((DateTime)dr["EndDate"]);
                        param.WeekScheduled = Convert.ToInt32(dr["WeekScheduled"]);
                        param.WEPHScheduled = Convert.ToInt32(dr["WEPHScheduled"]);
                        list.Add(param);
                    }
                }
            }
            catch (Exception)
            {
 
                throw;
            }
            finally
            {
                dt = null;
            }
 
            return list;
        }

Any Advice on why I keep Getting the Error and how I might be able to Fix it.
Andrey
Telerik team
 answered on 05 Jul 2012
2 answers
196 views
Hello,

I have a little problem with RadGrid and 2 columns of type GridDateTimeColumn.
 
Extract data from the database server and bind it to the RadGrid.

There are two GridDateTimeColumn columns. I set both to have PickerType="DateTimePicker" as property. Also set EditMode="InPlace" for the RadGrid.
I put this RadGrid in aspx page which uses MasterPage. When the page loaded and I put the RadGrid into edit mode the columns look like ( before.png). When I press on the horisontal scroll in the RadGrid these two columns change there position. Please see the attached photo ( after.png). It looks like these two columns have absolute position? Any ideas how to fix that?

If I change RadGrid's property EdidMode to "PopUp" and after that change I press on RadGris's vertical scroll this problem does not exists. But I have many columns so this edit mode does not works for me.

Thanks in advance.
Mina
Top achievements
Rank 1
 answered on 05 Jul 2012
3 answers
226 views
I've got a WCF Data Service which is correctly publishing data (checked in the browser), yet when I hook it up to a RadTreeView or a RadMenu, nothing is rendered in the Browser...

My markup looks like this (generated by smart tags): 

<telerik:RadODataDataSource ID="RadODataSource1" runat="server">
  <Transport>
    <Read Url="http://localhost:8989/ODService.svc/" DataType="XML" />
  </Transport>
  <Schema>
    <telerik:DataModel ModelID="Thing" Set="Things">
      <telerik:DataModelField FieldName="Id" />
      <telerik:DataModelField FieldName="Name" />
      <telerik:DataModelField FieldName="Value" />
    </telerik:DataModel>
  </Schema>
</telerik:RadODataDataSource>
 
 
<telerik:RadTreeView ID="RadTreeView1" Runat="server" DataFieldID="Id" DataModelID="Thing" ODataDataSourceID="RadODataSource1"></telerik:RadTreeView>


The output in the browser when directed  to http://localhost:8989/ODService.svc/Things looks like this:

<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
  <title type="text">Things</title>
  <id>http://localhost:8989/ODService.svc/Things</id>
  <updated>2012-07-03T10:27:17Z</updated>
  <link rel="self" title="Things" href="Things" />
  <entry>
    <id>http://localhost:8989/ODService.svc/Things(0)</id>
    <title type="text"></title>
    <updated>2012-07-03T10:27:17Z</updated>
    <author>
      <name />
    </author>
    <link rel="edit" title="Thing" href="Things(0)" />
    <category term="RadApp.Data.Model.Thing" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
    <content type="application/xml">
      <m:properties>
        <d:Id m:type="Edm.Int32">0</d:Id>
        <d:Name>Thing0</d:Name>
        <d:Value>e55187e0-1439-4ac8-984b-504236caf274</d:Value>
      </m:properties>
    </content>
  </entry>
  <entry>
    <id>http://localhost:8989/ODService.svc/Things(1)</id>
    <title type="text"></title>
    <updated>2012-07-03T10:27:17Z</updated>
    <author>
      <name />
    </author>
    <link rel="edit" title="Thing" href="Things(1)" />
    <category term="RadApp.Data.Model.Thing" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
    <content type="application/xml">
      <m:properties>
        <d:Id m:type="Edm.Int32">1</d:Id>
        <d:Name>Thing1</d:Name>
        <d:Value>cfb491c8-9a07-4393-a539-5d7078cc9ded</d:Value>
      </m:properties>
    </content>
  </entry>
  <entry>
    <id>http://localhost:8989/ODService.svc/Things(2)</id>
    <title type="text"></title>
    <updated>2012-07-03T10:27:17Z</updated>
    <author>
      <name />
    </author>
    <link rel="edit" title="Thing" href="Things(2)" />
    <category term="RadApp.Data.Model.Thing" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
    <content type="application/xml">
      <m:properties>
        <d:Id m:type="Edm.Int32">2</d:Id>
        <d:Name>Thing2</d:Name>
        <d:Value>7daecdaa-4a69-4f61-87f6-55eaca455ccc</d:Value>
      </m:properties>
    </content>
  </entry>
</feed>

 
and finally, the source from the rendered web page where the control should be, looks like this:

<div id="RadTreeView1" class="RadTreeView RadTreeView_Clear">
    <input id="RadTreeView1_ClientState" name="RadTreeView1_ClientState" type="hidden" autocomplete="off" value="{"expandedNodes":[],"collapsedNodes":[],"logEntries":[],"selectedNodes":[],"checkedNodes":[],"scrollPosition":0}">
</div>


Is there something I'm doing wrong?

I can post up the code from the data classes or the context, but the fact that the service is outputting into the browser (as above) without problems, allowing me to correctly query it, would suggest that the problem isn't in the service itself.
Genady Sergeev
Telerik team
 answered on 05 Jul 2012
2 answers
389 views
I need to be able to have a calendar which only allows the user to select a saturday if a 7 nights is chosen from a combo box on a form and to allow the user to just select a monday if an 4 nights is chosen from the combo box.

I am currently using the RadDatepicker and have set it up to add the disabled dates for the year to the special days. So if a 7 is selected the dt variable will be every day except a saturday.
RadCalendarDay holiday = new RadCalendarDay();
        holiday.Date = dt;
        holiday.IsSelectable = false;
        holiday.IsDisabled = true;
        CalendarPopup1.Calendar.SpecialDays.Add(holiday);

I don't seem to be able to get this to work. I am also trying to reset the calendar whenever the combo box value changes. But can't get this to work either.
public void ResetCalendar()
{
    CalendarPopup1.Clear();
    CalendarPopup1.Calendar.SpecialDays.Clear();
}

Katie
Top achievements
Rank 1
 answered on 05 Jul 2012
3 answers
225 views
Hi Forum,
I have a RADGrid with a RADComboBox column with EnableLoadOnDemand=true and ItemsRequest event defined.

<telerik:RadComboBox ID="cboLocalita"

EnableVirtualScrolling="true"

OnItemsRequested="cboLocalita_ItemsRequested"

ShowMoreResultsBox="true"

EnableLoadOnDemand="true"

DataTextField ="descrizione"

DataValueField ="idlocalita"

runat="server">

</telerik:RadComboBox>

Protected Sub cboLocalita_ItemsRequested(ByVal o As Object, ByVal e As Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs)
    Dim context As New JLogTabelleDataContext
    Dim allLocalita = From localita In context.localita _
     Order By localita.descrizione _
     Select localita
    If Not [String].IsNullOrEmpty(e.Text) Then
        allLocalita = From localita In context.localita _
         Where localita.descrizione.StartsWith(e.Text) _
         Order By localita.descrizione _
         Select localita
    End If
    Dim Lstlocalita = allLocalita.Skip(e.NumberOfItems).Take(10)
    CType(o, RadComboBox).DataSource = Lstlocalita
    CType(o, RadComboBox).DataBind()
    Dim endOffset As Integer = e.NumberOfItems + Lstlocalita.Count()
    Dim totalCount As Integer = allLocalita.Count()
    If endOffset = totalCount Then
        e.EndOfItems = True
    End If
    e.Message = [String].Format("Rec <b>1</b>-<b>{0}</b> Tot <b>{1}</b>", endOffset, totalCount)
End Sub

The automatic CRUD operation enabled on the Grid doesn't work, so the value of RADComboBox never change after update of then EditForm and is setted to NULL when I perform a created operation.

If I bind the Combobox to a Datasource object by the property DataSourceID and I disable EnableLoadOnDemand without implement OnItemsRequest event , CRUD works fine. I have a lot of records to show in ComboBox therefore Loading data on demand is very important.
Thanks to all for any response.
Gaetano
Tsvetina
Telerik team
 answered on 05 Jul 2012
3 answers
385 views
How can I make RadNotification stay in 1 place at all times despite scrolling? I would like to position it relative (below) an image.
Princy
Top achievements
Rank 2
 answered on 05 Jul 2012
1 answer
141 views

How can i get the Add Expression or Remove item ID of the RadFilter in server side.
It's Urgent
See The Image

Thanks Advance,
Mohamed.
Martin
Telerik team
 answered on 05 Jul 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?