Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
93 views
I am using Telerik RadGrid which adds hyperlink controls on ItemDataBound. Below code used to work with Telerik.Web.UI(2012.2.912.35).
When I upgraded it to 2014.1.225.35 or  2014.1.403.35 the links lose hyperlink url.

  protected void RadGrid_ItemDataBound(object sender, GridItemEventArgs e)
        {          
            try
            {
                if (e.Item is GridDataItem)
                {
                    GridDataItem item = (GridDataItem)e.Item;
                    foreach (string hlc in hyperlinksColumns)
                    {
                        HyperLink link = new HyperLink();
                        link.Text = item[hlc].Text; 
                        link.NavigateUrl = item[hlc + "_URL"].Text; //This Does not work
                        link.NavigateUrl = "javascript:callFunctionA('parameter1','parameter2');"; //This works. Same text is present in item[hlc + "_URL"].Text
                        item[hlc].Controls.Add(link);                                          
                    }
}
    }                        
    catch (Exception ex)
             {                   
                    Utils.WriteLog(ex);
             }
         }
Kostadin
Telerik team
 answered on 13 May 2014
1 answer
369 views
Hi

I have created a RadGrid and a RadButton.
For the RadGrid, I have attached a javascript:

            var script = @"
function RowDblClick(sender, eventArgs) {
$find(""" + btnEdit..ClientID + @""").click();
}";
            var javaScript = new HtmlGenericControl("script");
            javaScript.Attributes["type"] = "text/javascript";
            javaScript.InnerHtml = script;
            Controls.Add(javaScript);

            this.DataGrid.ClientSettings.ClientEvents.OnRowDblClick = "RowDblClick";

For the btnEdit (this is my RadButton), I have attached a EventHandler on the Serverside, which should deactivate the RadGrid:

            this.btnEdit.AutoPostBack = true;
            this.btnEdit.Click += BtnEditOnClick;

        private void BtnEditOnClick(object sender, EventArgs eventArgs) {
                this.DataGrid.Enabled = false;
                this.DataGrid.ClientSettings.EnablePostBackOnRowClick = false;
                this.DataGrid.ClientSettings.Resizing.AllowColumnResize = false;
                this.DataGrid.ClientSettings.Selecting.AllowRowSelect = false;
                this.DataGrid.ClientSettings.AllowKeyboardNavigation = false;
        }

But it doesn't work. When I click on the Button, it work great - but not when I doubleclick the row. But the javascript RowDblClick will be executed - I have checked this with an alert().
Konstantin Dikov
Telerik team
 answered on 13 May 2014
2 answers
153 views
Hi,

I need to autoclose radwindow after lets say 5 seconds.

but I have to use following method to open radwindow:

  RadWindowtest.VisibleOnPageLoad = True

I need to use ContentTemplate, I need to change controls in ContentTemplate from code behind. its'a must for me so I choose this method.
I can open/close window with javascript events but its not usefull to me in this problem.

any ideas ?
best regards.

aykut
Top achievements
Rank 1
 answered on 13 May 2014
1 answer
159 views

Hi there
I am trying to implement MediaPlayer in my Sitefinity project and it seems that mp4 is widely supported now. Even my opera plays it.

mp4 should play on ipad and iPhone as well but mine is not working.

Now http://demos.telerik.com/aspnet-ajax/media-player/examples/overview/defaultcs.aspx does not work for me on iPad either.

Can anyone check if the demo is running on their iPad, iPhone?

-------------
If not I found some stuff on the web. Anyone with some know-ledger?

- iOs doesn't support all the profiles that h.264 provides. You have to encode your h264 with a baseline profile only in order for it to be playable on iphone/ipad.

- One important thing to note is that "iDevices" doesn't support all the varieties of mp4. Here is a small list about MPEG-4 and H.264 supported varieties.According to Apple official website, iPad or iPhone 4S is only compatible with H.264 or MPEG-4 video format with the following specifications:

If it is H.264 video, it should meet: up to 1080p, 30 frames per second, High Profile level 4.1 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats;
If it is MPEG-4 video, it should meet: up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps per channel, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats;

But there are some forums saying that in fact, the iPad specifications are these:
iPad Supported Video FormatH.264 video (up to 720p, 30 frames per second; main profile level 3.1 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats)
MPEG-4 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats.

Markus

Markus
Top achievements
Rank 2
 answered on 13 May 2014
2 answers
95 views
I have set up a Rad DatePicker, with a Calendar and a DateInput field, however I want the date input field to show on the left of the calendar, currently the Calendar is showing to the right of the dateInput control. Is there any simple way of doing this?


<telerik:RadDatePicker ID="dpDate" runat="server" Skin="TestSkin" EnableEmbeddedSkins="false">
                            <DateInput ID="diInput" DateFormat="dd/MM/yyyy" DisplayDateFormat="dd/MM/yyyy" runat="server" Enabled="false"
                                DisabledStyle-ForeColor="Black" BorderStyle="None" BackColor="White">
                            </DateInput>
                            <Calendar ID="calDate" ShowRowHeaders="false" runat="server" EnableEmbeddedSkins="false"
                                Skin="TestSkin">
                                <ClientEvents OnDateSelecting="DateSelected" />
                                <SpecialDays>
                                    <telerik:RadCalendarDay Repeatable="Today" Date="" ItemStyle-CssClass="rcToday" />
                                </SpecialDays>
                            </Calendar>
                        </telerik:RadDatePicker>
Lex
Top achievements
Rank 1
 answered on 13 May 2014
7 answers
254 views
Hi,
Actually my requirement is quit similar to the below demo link, Let me explain my requirements step by step

1. Very First I want to show TreeView / ListView which contains the ID, Name ,Detail & Picture for each record and this should bind with DataSet automatically on page load or button click event. DataSet contain ID, Name, Detail and PictureURL.

2. Second : I can Drag & drop the Item from TreeView / ListView on RadScheduler so it should add that appointment with date & time and remove that itme from TreeView / ListView.

3. Third : Once I press the SAVE Button on the page all those appointments which I have drag from TreeView / ListView, I should able to store into database with that ID.

3. Fourth : same Radscheduler also show already SAVED appointments, those appointments also available in DATASET, that DataSet contain the following fields ID,Subject(Name+Detail), and somother fields for navigation url link.

http://demos.telerik.com/aspnet-ajax/scheduler/examples/creatingappointmentswithdraganddrop/defaultcs.aspx#


 Thank you waiting for your quick and prompt response.
Plamen
Telerik team
 answered on 13 May 2014
6 answers
228 views
Hi All,
I have problem with radeditor under Chrome (v 34.0.1847.131). I try to put a disabled input but it leads to disable everything. I even try here http://demos.telerik.com/aspnet-ajax/editor/examples/overview/defaultcs.aspx and in html view put Password:<input disabled="disabled" type="text" value="Template" />. After some clicks I cannot change "Password" text. With Mozilla there is no problem. 
Can you suggest any workaround or provide some solution that prevent editing part of the text.

Best Regards,
Diyan
Ianko
Telerik team
 answered on 13 May 2014
2 answers
165 views
Have 2 RadNumericTextBox's for user to input a min year and max year. 
Have set MinValue as 1960 and MaxValue programmatically to current year (2014).
ShowSpinButtons is set to TRUE.

If a user chooses to use the spin buttons before entering a date, the text displays and starts at 1960. 
In most cases the date to be set in the application is more likely to be user input between 2000 and 2014, however there will be times where the year input may go as low as 1960.  Is there anyway to set a start date of say 2000 (as oppose to 1960) for when the user selects the spin button?
Obviously the MinValue would need to remain at 1960.

It may even be more helpful to have a start value for the UP spin button (could be set at 2000) and a separate value for the DOWN button (could be set at 2014).

Thanks

Glenn


Glenn
Top achievements
Rank 1
 answered on 13 May 2014
2 answers
154 views
Hi,

I am trying to fire the itemcommand server event on RowDoubleClick client event. 

Javascript
function RowDblClick(sender, eventArgs) {
      var dataKeyVal = eventArgs.getDataKeyValue("UserName")
      sender.get_masterTableView().fireCommand("EditUser", dataKeyVal);
}

Code Behind
if (e.CommandName == "EditUser")
{
    GridDataItem item = e.Item as GridDataItem;
    item.Selected = true;
    string uName = item.GetDataKeyValue("UserName").ToString();
}

This gets me the DataKeyValue no problem in Javascript and runs the ItemCommand, but when the ItemCommand fires in the code behind it is acting on the first row in the grid rather than the double clicked row.

How would I have the ItemCommand run on the row that was doubleclicked?

Thanks,
Marc
Marc
Top achievements
Rank 1
 answered on 13 May 2014
8 answers
235 views
I really like the tokens that are available with autocomplete.

Can I get tokens with the combobox when using checkboxes?

This seems like a logical feature to add. Can it be done already and I am not aware of it?

Thanks, Marty
Nencho
Telerik team
 answered on 13 May 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?