Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
237 views
Hello
i am using javascript to select the Row ID using RowMouseOver.  This is working fine.
I am trying to send the Image of the 'hover' selected row to the RadWindow by clicking on
the hyperlink in the Grid Template column.
The Images are files on the server. The database only stores the file name.
All code is currently ASPX and Javascript. 
Is there a better way to transfer the hover 'selected' image direct to the RadWindow as the code below does not show the image.

Below is my RadGrid ASPX (Unfortunately the Code snippet tool didnt work here)

                    <telerik:GridTemplateColumn HeaderText="" SortExpression="XTV7_Categories_Image"
                        UniqueName="XTV7_Categories_Sub_Image">
                        <ItemTemplate>
                            <asp:HyperLink ID="btnImageDisplay" runat="server" Width="100px" Height="77px" 
                            CommandName="Select" 
                            ImageUrl='<%# "~/App_Portal/xTrain/Images/VideoThumbs/" + Eval("XTV7_Videos_Image") %>' 
                            NavigateUrl='<%# "~/App_Portal/xTrain/Images/VideoImages/" + Eval("XTV7_Videos_Image") %>'                  
                            onclick="openRadWin();return false;" />
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>

Below is my RadCodeBlock Javascript with the RowmouseOver and openRadWin samples.

            function RowMouseOver(sender, args) {
                document.getElementById("<%= Label1.ClientID %>").innerHTML =
                 "<b>XTV7_Videos_ID: </b>" + args.getDataKeyValue("XTV7_Videos_ID") +
                 "<br />" +
                 "<b>Title: </b>" + args.getDataKeyValue("XTV7_Videos_Title") +
                   "<br />" +
                 "<b>SubTitle: </b>" + args.getDataKeyValue("XTV7_Videos_SubTitle") +
                   "<br />" +
                 "<b>Image Name: </b>" + args.getDataKeyValue("XTV7_Videos_Image") +
                   "<br />" +
                 "<b>M4V Name: </b>" + args.getDataKeyValue("XTV7_Videos_Ipod_Filename") +
                   "<br />" +
                 "<b>SWF Name: </b>" + args.getDataKeyValue("XTV7_Videos_FileName");
            }
            function openRadWin() {
                radopen('<%# "~/App_Portal/xTrain/Images/VideoImages/" + Eval("XTV7_Videos_Image") %>', "RadWindow1");
            }


// OLD RadWindow CODE
//           function openRadWindow(url) {
//                var oWnd = radopen(url);
//                return false;
//            }

The basic RadWindow settings;

 <telerik:RadWindowManager ID="RadWindowManager1" runat="server" Modal="true" VisibleStatusbar="false"
        ForeColor="Black" BackColor="Black" Behaviors="Reload,Resize,Minimize,Maximize,Close"
        VisibleTitlebar="true" VisibleOnPageLoad="false" KeepInScreenBounds="True" Skin="Black"
        AutoSize="true" Animation="Resize">
        <Windows>
            <telerik:RadWindow runat="server" ID="RadWindow1" Title="XGIS Lesson Image Viewer"
                OnClientClose="onClose">
            </telerik:RadWindow>


Trent
Top achievements
Rank 2
 answered on 22 Oct 2011
2 answers
96 views
Hi,

Is it possible to combine an input contol like the RadNumericTextBox with the RadComboBox?

Cheers,
Jani
Jani
Top achievements
Rank 1
 answered on 22 Oct 2011
2 answers
289 views
Hi,

I have list box control with transferable items working.
I would like to see all items transferred to the right (destination) listbox to be automatically sorted by text of the item.

So I attached JavaScript handler to "OnClientTransferred" client side event of the source listbox.

This is portion of my code:

                    //Sorting items in the right list box -----------------------
                    var items = e.get_destinationListBox().get_items();                                                     
                    arrTexts = new Array();
 
                    for (var i = 0; i < items.get_count(); i++) {
                        arrTexts[i] = items.getItem(i).get_text();                     
                    }
 
                    arrTexts.sort();              
                                                 
                    for (var i = 0; i < arrTexts.length; i++) {
                        //alert(arrTexts[i]);                       
                    }

As you see, I can get text values from destination listbox, put them into string array and sort that array. 
I just need advise on how I can now sort the content of the destination listbox.

Thanks!
brian
Top achievements
Rank 1
 answered on 21 Oct 2011
3 answers
76 views
Hello,

i'm using the GridClientSelectColumn in the radGrid.  Is there anyway to not show the checkbox in the header? and display a header text?

My column is definate below, but the header text doesn't show.  I want to hide the checkbox in the header as well.  Thanks in advance for any help.

<

 

 

telerik:GridClientSelectColumn HeaderText="Incl" HeaderStyle-Width="5%" UniqueName="ClientSelectColumn" />

 


Jayesh Goyani
Top achievements
Rank 2
 answered on 21 Oct 2011
3 answers
131 views
Hello,

I read that we can also add a RadWindow now like this:
Dim window1 As New Telerik.Web.UI.RadWindow
With window1
    .VisibleOnPageLoad = True
    .ID = "UniqueDialogWindowID"
    .Width = 450
    .Height = 550
    .AutoSize = True
    .Modal = True
    .VisibleStatusbar = False
    .ContentContainer.Controls.Add(New LiteralControl("Dynamic loaded control"))
    .Title = "Test"
End With
Page.Controls.Add(window1)

And this workes fine (when you also load this in init on postback of course)

The closing I do on the Page_PreRender, by removing the RadWindow from the controls collection.

In the AJAXed version of my application however, this couses problems. The Windows is loaded and displayed, but afeter the close (server side, remove RadWindow control in PreRender thus) and ReOpening, the control is loaded but not shown...

Is this not correct use of functionality?

Erik
Erik
Top achievements
Rank 2
 answered on 21 Oct 2011
2 answers
129 views
I got a nice version working of this working:

http://demos.telerik.com/aspnet-ajax/tooltip/examples/usingwithimagemap/defaultcs.aspx 


So to start, have a look at my sample page here:  ONLY OPEN IN new version of Firefox, Chrome or Safari:
http://www.icp-org.com/dynamic/OrgWorldMap/

There is a lot going on here, but try hovering over 'Hover here to reveal which countries have Organizations' and it will highlight the countries.  Try hovering over USA and you will see the pop up functionality.  Awesome page huh?  All driven from a database.  Thats what I thought until I opened in any version of IE, so try the same in IE.

- Actually everything works except the 'Hover here to reveal...."   This is with Telerik.Web version 2009.3.1... something.

- I tried it with version 2011.2.712.40   
and then it does not even work in FF, Chrome, etc, so upgrading actually brought me backwards.   And I know this is an issue with the RadToolTip and/or RadTooltip manager since when I remove all telerik from the page the 'Hover to Reveal...'   works fine in all browsers.  Any help?  THANK YOU THANK YOU THANK YOU
Joe
Top achievements
Rank 1
 answered on 21 Oct 2011
1 answer
78 views
Hi Team,

I'm currently working on UI issues that are appearing in Telerik Tree View Control. We are displaying a hierarchy but the vertical spacing in between links are more.

After analysis, we came to know, There is a "Empty Text Node" is displayed after each node. This is equivalent to &nbsp;. Kindly see the attached images. I just wanted to remove that extra space but I'm not getting how to resolve it. As per our client requirement, we need to reduce this gap.

Can you please help me to fix it? Please find attached images.

Environment: SharePoint 2010

Thanks,
Tarun
Plamen
Telerik team
 answered on 21 Oct 2011
1 answer
56 views
In my code behind I'm specifying the width of certain columns (not all), for example:

ColumnName.HeaderStyle.Width = Unit.Pixel(40);

This works fine when you set AllowScroll equal to true (see attached image - allowscroll-true.jpg):

<Scrolling AllowScroll="True" UseStaticHeaders="True"  />

The problem is when you set AllowScroll equal to false it removes the width of the column (see attached image - allowscroll-false.jpg)

Is there any way to define the column width while still having allowscroll equal to false?

Mira
Telerik team
 answered on 21 Oct 2011
7 answers
173 views
Hello! How do you change the timeslot background color on Client side? I found some sample using server side but none with client side. I'm using Radschduler .net ajax Q3 2010 and the data is fed using Web Services. Also, when using Web services for RadScheduler, some server side event as TimeSlotContextMenuItemClicking, AppointmentDataBound ... stop working. Is this a bug? Thank you.
Ivana
Telerik team
 answered on 21 Oct 2011
1 answer
107 views
I dynamically create a table with  comboboxes and add it to PlaceHolder.
private void CreateDynamicTable(string ProductCode)
{
//<skipped>
    RadComboBox combo = new RadComboBox();
    RadComboBoxItem l = new RadComboBoxItem();
    combo.EmptyMessage = "- PASIRINKITE -";
    string[] items = result.Expression.ToString().Split('|');
    string[] values = result.PriceCoefficient.ToString().Split('|');
    int itemsCount = result.Expression.ToString().Count();
    foreach (var item in items.Zip(values, (ix, v) => new { ix, v }))
    {
        l = new RadComboBoxItem(item.ix, item.v);
        combo.Items.Add(l);
    }
    tc.Attributes.Add("width", "145px");
    combo.Attributes.Add("Style", "font-family: verdana; width: 140px; font-size : 7pt");
    combo.ID = "cboAttributeName_" + i.ToString();
    combo.ClientIDMode = ClientIDMode.Static;
    combo.OnClientSelectedIndexChanged = "SelectedIndexChanged";
    combo.Attributes.Add("AtributeName", result.AttributeName);
    tc.Controls.Add(combo);
<skipped>
}
then I use a js script:
var attributes_array = new Array();
 
function SelectedIndexChanged(sender, eventArgs) {
    var item = eventArgs.get_item();
    var dblCofficient = parseFloat(item.get_value());
    var dblActualPrice = document.getElementById('lblActualPrice').innerHTML;
    if (dblCofficient > 0) {
        var strlblYourPrice = document.getElementById('lblYourPrice').innerHTML;
        var strlblUsualPrice = document.getElementById('lblUsualPrice').innerHTML;
        document.getElementById('lblYourPrice').innerHTML = roundNumber(dblActualPrice * (dblCofficient / 100), 2).toFixed(2).toString().replace(".", ",") + ' Lt.';
        document.getElementById('lblActualPriceDb').innerHTML = roundNumber(dblActualPrice * (dblCofficient / 100), 2).toFixed(2);
        document.getElementById('lblUsualPrice').innerHTML = roundNumber(dblActualPrice * 1.25 * (dblCofficient / 100), 2).toFixed(2).toString().replace(".", ",") + ' Lt.';
    }
    var AtributeName = sender.get_attributes().getAttribute("AtributeName");
    var AtributeValue = item.get_text();
    var field = document.getElementById('txtAttributes').value;
    attributes_array[AtributeName] = AtributeValue;
    var str;
    for (var key in attributes_array) {
        if (attributes_array.hasOwnProperty(key)) {
            str += " " + key + ": " + attributes_array[key] + ";" //существующий формат, или:
        }
    }
    str = str.substr(10);
    document.getElementById('txtAttributes').value = str;
}


The problem is, that when I first time select a value in any of dinamically created combo - the value changes, but if I then try to change the value to another - it seems, like it changes, but when combo closes it stays with the value, that was selected first time. I mean, I cannot change selected value. What is wrong?
Ivana
Telerik team
 answered on 21 Oct 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?