Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
95 views
Hi,
for me this is a bug (I'm using version 2010Q2).
I'm calling client side method set_text of a menu item and I've noticed it works only if the menu item has actually a not null text.

So in this scenario
<rad:RadMenuItem Text="Text1" />
the set_text("NewText") works.

On the opposite, in this scenario
<rad:RadMenuItem Text="" />
the set_text("NewText") doesn't work.

Best regards, Andrea Pirola
Yana
Telerik team
 answered on 03 Sep 2010
2 answers
182 views
Hello,

I use the serverside OnItemDataBound event to apply custom format condition logic.

In some columns I prefix the .Text-property of the TableCell with additional Information.

This works fine, but fails with HyperLinkColumns, as the .Text-Property only contains "&nbsp;". When I know change the Text property by prefixing it with something, the actual Hyperlink is not rendered, but myprefix + "&nbsp;"

How can I change this behaviour?

best regards and thanks in advance

Ulrik
Ulrich
Top achievements
Rank 1
 answered on 03 Sep 2010
1 answer
191 views

I have a problem, where if DataStartFiend and Dataendfield is null in db will throw an exception. Please advise thank you

aspx
<telerik:RadScheduler ID="RadScheduler1" runat="server"
    HoursPanelTimeFormat="htt" ValidationGroup="RadScheduler1" Width="100%" Height="600px"
    MinutesPerRow="5" Skin="Office2007" DayStartTime="08:00:00" DayEndTime="15:00:00" ColumnWidth="200px"
    DataKeyField="ID" DataStartField="Start" DataEndField="End" DataSubjectField="Subject"
    DataRecurrenceField="RecurrenceRule" DataRecurrenceParentKeyField="RecurrenceParentID"
    AllowDelete="false" AllowEdit="false" AllowInsert="false" FirstDayOfWeek="Monday" LastDayOfWeek="Sunday"
    DayHeaderDateFormat="d MMMM yyyy" WeekHeaderDateFormat="d MMMM yyyy" TimelineView-HeaderDateFormat="d MMMM yyyy"
    TimelineView-ColumnHeaderDateFormat="d MMMM yyyy" MonthHeaderDateFormat="MMMM yyyy" SelectedView="WeekView">
   
</telerik:RadScheduler>

aspx.cs

public List<TimetablePeriod> TimetableCollection
{
  set
  {
            RadScheduler1.DataSource = value;
  }
}

TimetablePeriod.cs

 public TimetablePeriod(long studentId,  string startDate, string endDate,
            string weekDay, string startTime, string endTime, string teacherTitle, string roomCode)
        {
            this.studentId = studentId;
            this.startDate = startDate;
            this.endDate = endDate;
            this.weekDay = weekDay;
            this.startTime = startTime;
            this.endTime = endTime;
            this.roomCode = roomCode;
            this.recurParentID = null;
        }

public DateTime Start
        {
            get { return GetDate(startDate, startTime); }
        }

        public DateTime End
        {
            get { return GetDate(startDate, endTime); }
        }

  private DateTime GetDate(string date, string time)
        {
            int year, month, day, hour, minute, second;

            string[] dateParts = date.Split(new char[] { '-' });
            year = Convert.ToInt32(dateParts[0]);
            month = Convert.ToInt32(dateParts[1]);
            day = Convert.ToInt32(dateParts[2]);

            string[] timeParts = time.Split(new char[] { ':' });
            hour = Convert.ToInt32(timeParts[0]);
            minute = Convert.ToInt32(timeParts[1]);
            second = Convert.ToInt32(timeParts[2]);

            DateTime dt = new DateTime(year, month, day, hour, minute, second);
            dt = dt.AddDays(this.GetDayOffset());
            return dt;
        }

Jayesh Goyani
Top achievements
Rank 2
 answered on 03 Sep 2010
1 answer
78 views
We are encountering a strange browser issue.  We have a page that checks for the existence of a querystring on page load.  If it does not exist, the page_load event calls the following:

                RadAjaxManager1.ResponseScripts.Add("OpenDialog();");

This is the javascript called:
        function OpenDialog() {
            var url = "dialogs/NewDialog.aspx";
            var windowName = "NewDialog";
            var window = GetRadWindowManager().getWindowByName(windowName);

            modalWindow = GetRadWindowManager().open(url, window);
            modalWindow.set_width(400);
            modalWindow.set_height(200);
            modalWindow.set_modal(true);
            modalWindow.center();
            modalWindow.set_behaviors(Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Close);
            modalWindow.setActive(true);
        }

This works fine in IE8 and Chrome.  It does not open the modal window in IE 7 or FF 3.6.8.

BUT - as soon as I add a debug statement in the javascript like this:
        function OpenDialog() {
            alert("We are here");
            var url = "dialogs/NewDialog.aspx";
            var windowName = "NewDialog";
            var window = GetRadWindowManager().getWindowByName(windowName);

            modalWindow = GetRadWindowManager().open(url, window);
            modalWindow.set_width(400);
            modalWindow.set_height(200);
            modalWindow.set_modal(true);
            modalWindow.center();
            modalWindow.set_behaviors(Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Close);
            modalWindow.setActive(true);
        }
It starts working fine in all browsers.

Can anyone help me out as to where I am going wrong?  Thanks.
Georgi Tunev
Telerik team
 answered on 03 Sep 2010
2 answers
665 views
Dear community,

i want to make a preselection on a combobox based on custom attributes on clientside, each time i enter new values to numeric Text boxes.

I have created the attributes on ItemDataBound

Protected Sub cbxKonfektion_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadComboBoxItemEventArgs) Handles cbxKonfektion.ItemDataBound
       Dim dataItem As DataRowView = CType(e.Item.DataItem, DataRowView)
       e.Item.Attributes("Gewicht_UG") = dataItem("Gewicht_UG")
       e.Item.Attributes("Gewicht_OG") = dataItem("Gewicht_OG")
       e.Item.Attributes("KGR_UG") = dataItem("KGR_UG")
       e.Item.Attributes("KGR_OG") = dataItem("KGR_OG")
   End Sub

Now i want to compare my custom attributes with two other textboxes each time i have entered a new value in the textbox

As far as i know, there is no method FindItemsByAttribute, right ?

So how to check if my textboxvalue are in the range of the attribute values on clientside, and find the first match.

Any suggestion how to do this task.

Kind regards

Martin Gartmann


Martin Gartmann
Top achievements
Rank 2
 answered on 03 Sep 2010
5 answers
150 views
When right click mouse, it is possible to actually add an appointment to the calendar.   Knowing that we do not want the user to be able to add an actual appointment to the calendar,  we would like to  change it where it allows you to click the calendar day and time with your mouse- and it launched the “add new”  screen, actually we would like "New Appointment" link to another page, when user click this "Add New Appointment", it will directly to another page. Is it possible to do it? Also we would like only show "New Appointment" and disable the rest of 3 choices when right click mouse on the calendar.

Thanks
Veronica
Telerik team
 answered on 03 Sep 2010
3 answers
251 views
Hi,

I am able to play video in telerik rad editor webpart, however when i place this telerik rad editor control in my article page [custom page layout] with video embeded in telerik rad editor control along with content and save the page. It does not save the video [code to integrate video in telerik rad editor control], however it saves the content placed along with the video.

Please Suggest.

Ketan
Stanimir
Telerik team
 answered on 03 Sep 2010
2 answers
96 views
Hi,

I'm trying to come up with a generic approach in setting the data resources for the combo box.  Instead of always setting the following properties:

prioritylist.DataSource = "";
           prioritylist.DataValueField = ARConstants.PriorityListName;
           prioritylist.DataTextField = ARConstants.PriorityListId;            
           prioritylist.DataBind();
           prioritylist.Items.Insert(0, new ListItem("", "0"));
           prioritylist.SelectedIndex = 0;

In my code behind, I'd like to pass the control and since I always know that my datasource will alway have id and name.  I want the call to be a single instance.

I have a controller class call DDLController that does the following:
public void LoadLookup(Page page, DropDownList ddlPriority, DropDownList ddlRM, DropDownList ddlBSE, DropDownList ddlDataType)
       {
           LoadPriorityList(page,ddlPriority);
           LoadRFMList(page, ddlRM);
           LoadBSEList(page, ddlBSE);
           LoadSystemList(page, ddlDataType);
       }
       private void LoadPriorityList(Page page,DropDownList prioritylist)
       {
           prioritylist.DataSource = "";
           prioritylist.DataValueField = ARConstants.PriorityListName;
           prioritylist.DataTextField = ARConstants.PriorityListId;            
           prioritylist.DataBind();
           prioritylist.Items.Insert(0, new ListItem("", "0"));
           prioritylist.SelectedIndex = 0;
       }
       private void LoadRFMList(Page page, DropDownList rfmlist)
       {
           rfmlist.DataSource = "";
           rfmlist.DataValueField = ARConstants.RFMId;
           rfmlist.DataTextField = ARConstants.RFMName;            
           rfmlist.DataBind();
           rfmlist.Items.Insert(0, new ListItem("", "0"));
           rfmlist.SelectedIndex = 0;
       }
As you can see above I created 2-3 separate methods that will render the different combo box.  However this methodology seems to redunant where I want to render the control only once.  I'm not really sure how to make this generic.  Any help on this design would be very helpful.

Thanks,
Joe
Top achievements
Rank 1
 answered on 03 Sep 2010
10 answers
921 views
EDIT - title is misleading - sorry - there is just a single repeater in the template column.

Hi,

I have a repeater inside a GridTemplateColumn with the datasourceid set declaratively.

<telerik:GridTemplateColumn UniqueName="tcRoles">
         <ItemTemplate>
         <ul>
            <asp:Repeater ID="rpRoles" runat="server" DataSourceID="ods_UsersInRoles">
            <ItemTemplate><li>
                <asp:Label ID="lblRoleName" runat="server" Text='<%#Eval("role_name") %>' /> (<asp:Label ID="lblApplicationName" runat="server" Text='<%#Eval("application_name") %>'/>)</li>
            </ItemTemplate>
            </asp:Repeater>
            </ul>
            <asp:ObjectDataSource ID="ods_UsersInRoles" runat="server"
        SelectMethod="GetByUserID"
        TypeName="mhs.bll.UsersInRoles">
        <SelectParameters>
            <asp:Parameter Name="user_ID" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>   
        </ItemTemplate>
        </telerik:GridTemplateColumn>

I am getting an error that the repeater cannot find the datasource:

The DataSourceID of 'rpRoles' must be the ID of a control of type IDataSource.  A control with ID 'ods_UsersInRoles' could not be found.

This logic works using standard GridView - is there something I am missing when using RadGrid?

I am setting the user_ID parameter in code behind on the RadGrid ItemDataBound event.

Thanks
Tom
Tsvetoslav
Telerik team
 answered on 03 Sep 2010
1 answer
106 views
Hi,

I am trying to use the RAD editor in a list, with some customizations of the toolbars. We have the editor installed, and the feature is activated on the site. The editor does show up correctly on the page. However, as a test I made one small change to the ListToolsFile.xml file which I found here: C:\Program Files\Common Files\Microsoft Shared\web server extensions\wpresources\RadEditorSharePoint\5.6.0.0__1f131a624888eeed\Resources\.

I did an iisreset but the change does not show up... what am I missing?

Thanks,
Alon
Stanimir
Telerik team
 answered on 03 Sep 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?