Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
203 views
Hello,

I am looking for an example where I can show a tooltip when I leave a textbox.  (onblur)

I have a tooltip defined as in one of your examples.  However, it fires onmouseover.  How do I change to have control on when it fires.
 

<telerik:RadToolTip ManualClose="true"
ID="RadToolTip1"
Skin="Vista"
runat="server"
TargetControlID="txtPartyName">
Rich content:
<asp:Button ID="btnA" runat="server" Text="Button in a ToolTip"/>
</telerik:RadToolTip>

<asp:TextBox ID="txtPartyName" runat="server" onblur=????></asp:TextBox>

Thanks,
Feizal

 

 

 

 

 

 

 

 

 

Svetlina Anati
Telerik team
 answered on 10 Jun 2010
6 answers
213 views
Hi,

I created dynamic tab creation application using telerik radstrip. I can delete the tabs that are creating dynamically using crossbar option. When i am deleting the tabs its just deleting the tabs but not pageview corresponding to the tab. I have tried to delete the pageviews but i am getting error like "Microsoft JScript runtime error: Object doesn't support this property or method" and pointing to

multiPage.get_pageViews().remove(pageView); code. Can anyone help me how to delete pageviews.

Thanks in advance.

Javascript code.

   
<script type="text/javascript"> 
        /* <![CDATA[ */
        function deleteTab(tabText) {
            var tabStrip = $find("<%= RadTabStrip1.ClientID %>");
            
            var multiPage = $find("<%= RadMultiPage1.ClientID %>");
            var tab = tabStrip.findTabByText(tabText);
            var pageView = tab.get_pageView();
            var tabToSelect = tab.get_nextTab();
            if (!tabToSelect)
                tabToSelect = tab.get_previousTab();
            tabStrip.get_tabs().remove(tab);
            
            multiPage.get_pageViews().remove(pageView);
            if (tabToSelect)
                tabToSelect.set_selected(true);
        }
        /* ]]> */ 
    </script>  

Babu Puchakayala
Top achievements
Rank 1
 answered on 10 Jun 2010
1 answer
141 views
Hello,
The fact that the width of the Bar is set by BarWidthPercent and not by pixels, causes me a lot of headache.
But I would expect it to be calculate as percentage of the PlotArea.Appearance.Dimensions.Width and not the radChart.width.

(The reason is that I need a wide title on a small and thin bar chart - please see attached file)

Any way to help me?
Thanks,
Niv.

 
Velin
Telerik team
 answered on 10 Jun 2010
2 answers
143 views
Hi
I have a ListView that shows some rows with some columns.
The columns goes as follows; productId, product name, product picture, more pictures, price, in stock and so forth

The column: "Product Picture" shows a picture of the product!
When the ListView is in ItemEditCommand mode (that is when someone has clicked on the Edit button of a row) it should be possible to upload a picture. This is were the upload control comes. I want the RADupload control to appear here inside this little table cell, when this Edit button is clicked. However there is not much place for this upload control. So what should I do?

Note It has to be inside this table cell, cause I need the row ID of the row which Edit button has been clicked.

Thanks for reading

P.S. My DLL version is 2009.3.1208.35 > Telerik.Web.UI.dll (ASP.NET Ajax)
 

sammy ymmas
Top achievements
Rank 1
 answered on 10 Jun 2010
2 answers
202 views
Hello all,

first of all, let me say that your controls are really great. I am using version: 2009.2.701.35

There's one issue i want to ask you about.

Inside a RadWindow, a RadGrid is used with the following parameters:
<ClientSettings>
    <Scrolling AllowScroll="True" UseStaticHeaders="True" />
</ClientSettings>

The grid works fine in the RadWindow without a decorator. After inserting the RadFormDecorator, the size of RadWindow's client area increases and the window gets a vertical scrollbar. The vertical space added seams to be of the same size as the grid would need without scrolling. The vertical scrollbar of the RadWindow also appears when I only decorate buttons. Is there a solution to this?

Regards,
Michael
Oliver Cox
Top achievements
Rank 1
 answered on 10 Jun 2010
2 answers
158 views
I have a page with a variable number of inputs on screen.
I create them as input types with a cssClass called numeric.
Once all the inputs are created I load them into the input manager

        elements = $('input.numeric', someContextDiv); 
        var numericSettings = $find('RadInputManager').get_inputSettings('NumericSettings'); 
        generateInputIds(elements); 
        for (var idx = 0; idx < elements.length; ++idx) { 
            numericSettings.addTargetInput(elements[idx].id); 
        } 


Is there a way to now dynamically enable the SpinButtons on these inputs?
I'd like to set ShowSpinButtons = true & ButtonsPosition="Right"

cheers

Dimo
Telerik team
 answered on 10 Jun 2010
3 answers
159 views
Hi, I'm trying to get a numerictextbox from client. I always get the message "Microsoft JScript runtime error: 'null' is null or not an object"

My JAVASCRIPT
<div id="Div1" runat="server"> 
<script language="javascript" type="text/javascript"> 
 
function Itinerario()  
{ 
     
     var CUENTAS = $find('<%=TxtNroCtas.ClientID%>');  
     
    if (document.getElementById('RBTipoItinerario_0').checked==true) 
    { 
        div = document.getElementById('HORARIOS'); 
        div.style.display=''; 
        CUENTAS.set_visible(false); 
         
    } 
     
    if ( document.getElementById('RBTipoItinerario_1').checked==true) 
    { 
        div = document.getElementById('HORARIOS'); 
        div.style.display='none'; 
        CUENTAS.set_visible(true); 
    } 
    
} 
 
 
</script> 
</div> 


My INPUT
<telerik:RadNumericTextBox ID="TxtNroCtas" Runat="server" Skin="Office2007"> 
   <NumberFormat DecimalDigits="0" GroupSeparator="" /> 
</telerik:RadNumericTextBox> 

Dimo
Telerik team
 answered on 10 Jun 2010
1 answer
219 views
Hi!
I have a RadGrid with a checkbox inside a template column. When I place the grid inside a RadWindow and the checkbox is marked as checked in codebehind it don't become checked when displayed. It works fine when it's not placed inside a RadWindow. Anyone has any suggestions?
Example code below.

/HÃ¥kan

<asp:Button ID="Button1" runat="server" Text="Open" OnClick="Button1_Click" />      
          
<telerik:RadWindow ID="RadWindow1" runat="server">  
    <ContentTemplate> 
        <telerik:RadGrid id="RadGrid1" runat="server">  
            <MasterTableView AutoGenerateColumns="false">  
                <Columns> 
                    <telerik:GridTemplateColumn>                              
                        <ItemTemplate>                                  
                            <asp:CheckBox id="chkSelect" runat="server" /> 
                        </ItemTemplate> 
                    </telerik:GridTemplateColumn> 
                    <telerik:GridBoundColumn DataField="Name" /> 
                </Columns> 
            </MasterTableView> 
        </telerik:RadGrid>         
    </ContentTemplate> 
</telerik:RadWindow> 
protected void Button1_Click(object sender, EventArgs e)  
{  
    List<object> list = new List<object>();  
    list.Add(new { ID = 1, Name = "Item A" });  
    list.Add(new { ID = 2, Name = "Item B" });  
    list.Add(new { ID = 3, Name = "Item C" });  
 
    RadGrid1.DataSource = list;  
 
    RadGrid1.DataBind();  
 
    ((CheckBox)RadGrid1.Items[1].FindControl("chkSelect")).Checked = true; //Select Item B  
    RadWindow1.VisibleOnPageLoad = true;  
} 
Svetlina Anati
Telerik team
 answered on 10 Jun 2010
2 answers
1.4K+ views
Hi Telerik,

I'm having trouble with Eval () function in the RadGrid. The function works properly when used like this:

<a href="productdetails.aspx?sid=<%#Eval("Stock Number") %>"> 

The reason I am doing all this is because I want to know if the unit displayed has a image for it, if not, then I display  error image (using javascript). In order for me to read the directory i have to know the stock number, and that is why I am using Eval Expression in this fashion:

                                <img id="imgItem1"  alt="" src="<% 
                        
                                Dim pathUrlFirst as String = "" 
                                Dim stockNumber as String = Eval("Stock Number")
                                Dim ImagePath As String = AppConfig("ImagePath") 
                                Dim pathLocal as String = ImagePath & "pictures\001270\" & stockNumber & "\"   
                                Dim di As New System.IO.DirectoryInfo(pathLocal) 
                                Dim fi As System.IO.FileInfo() = di.GetFiles() '("*.jpg") 
                                Dim fitemp As System.IO.FileInfo 
                                Dim Count As Integer = UBound(fi) + 1 
                                Dim Name As String = "" 
                                 
                                Dim pathURL as String = "pictures/001270/" + stockNumber 
                                 
                                If fitemp.Extension.ToLower = ".jpg" OrElse fitemp.Extension = ".gif" Then 
                                Name = fitemp.Name 
                                pathUrlFirst = pathURL & Name 
                                Response.Write(pathUrlFirst) 
                                End If 
                                 
                                 %>" style="width: 120px; border: 1px solid rgb(195, 195, 195);"  /> 

It gives me "System.InvalidOperationException: Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control." error.

What should I do in order to use the Eval statement?

The code for entire ItemTemplate is here:
 
<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" AllowMultiRowSelection = "True"   
    AllowSorting="True" DataSourceID="SqlDataSource1" GridLines="None"  
    Width="850px" Height="100%" Skin="Telerik" PageSize="20" > 
<MasterTableView autogeneratecolumns="False" datasourceid="SqlDataSource1"  
        PageSize="50"> 
    <NoRecordsTemplate> 
       <asp:CheckBox ID="CheckBox1" runat="server" AutoPostBack="True"  
            OnCheckedChanged="ToggleRowSelection" /> 
    </NoRecordsTemplate> 
    <Columns> 
         
         
        <telerik:GridBoundColumn DataField="ID" HeaderText="ID"  
            SortExpression="ID" UniqueName="ID" DataType="System.Int32"  
            ReadOnly="True" Visible="False" AutoPostBackOnFilter="True"> 
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="Sys2KNum" HeaderText="Sys2KNum"  
            SortExpression="Sys2KNum" UniqueName="Sys2KNum" Visible="False"> 
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="Stock Number" HeaderText="Sort by:"  
            SortExpression="Stock Number" UniqueName="Stock Number"> 
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="Year" HeaderText="Year"  
            SortExpression="Year" UniqueName="Year"> 
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="Make"  
            HeaderText="Make" SortExpression="Make"  
            UniqueName="Make"> 
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="Model" HeaderText="Model"  
            SortExpression="Model" UniqueName="Model"> 
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="Veh Type" HeaderText="Veh Type"  
            SortExpression="Veh Type" UniqueName="Veh Type"> 
        </telerik:GridBoundColumn>         
        <telerik:GridBoundColumn DataField="Body Style" HeaderText="Body Style"  
            SortExpression="Body Style" UniqueName="Body Style"> 
        </telerik:GridBoundColumn> 
        
    </Columns> 
    <ItemTemplate> 
     
    <div style="height: auto; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px;"> 
        <table width="95%" border="0" cellspacing="0" cellpadding="0"> 
            <tr style="border-right-width: 0px; border-bottom-width:    0px; border-left-width: 0px">  
                <td style="border-right-width: 0px; border-bottom-width:    0px; border-left-width: 0px"> 
                    <div style="font-size: medium; font-weight: bold; text-align: left;">&nbsp;&nbsp;<%#Eval("Year") & " " & Eval("Make") & " " & Eval("Model") & " " & Eval("Unit Trim") & " " & Eval("Fuel Type") & " " & Eval("WheelbaseCode") & " " & Eval("Custom1")%></div> 
                 
                </td> 
            <tr style="border-right-width: 0px; border-bottom-width:    0px; border-left-width: 0px"> 
                <td style="border-right-width: 0px; border-bottom-width:    0px; border-left-width: 0px"> 
                    <table border="0" > 
                        <tr style="border-right-width: 0px; border-bottom-width:    0px; border-left-width: 0px"> 
                        <td style="border-right-width: 0px; border-bottom-width:    0px; border-left-width: 0px"> 
                        <asp:CheckBox id="CheckBox1" OnCheckedChanged="ToggleRowSelection"  AutoPostBack="True"   runat="server"></asp:CheckBox>  
                        <div runat="server" visible ="false" id="myDiv"><%#Eval("Stock Number") %></div> 
                        <br /> 
                         
                        </td> 
                            <td  style="border-right-width: 0px; border-bottom-width:0px; border-left-width:    0px"> 
                             
                       
                            <a href="productdetails.aspx?sid=<%#Eval("Stock Number") %>"> 
                             
                                <img id="imgItem1"  alt="" src="<%  
                                
                                Dim pathUrlFirst as String = "" 
                                Dim stockNumber as String = Eval("Stock Number") 
                                Dim ImagePath As String = AppConfig("ImagePath") 
                                Dim pathLocal as String = ImagePath & "pictures\001270\" & stockNumber & "\"   
                                Dim di As New System.IO.DirectoryInfo(pathLocal) 
                                Dim fi As System.IO.FileInfo() = di.GetFiles() '("*.jpg") 
                                Dim fitemp As System.IO.FileInfo 
                                Dim Count As Integer = UBound(fi) + 1 
                                Dim Name As String = "" 
                                 
                                Dim pathURL as String = "pictures/001270/" + stockNumber 
                                 
                                If fitemp.Extension.ToLower = ".jpg" OrElse fitemp.Extension = ".gif" Then 
                                Name = fitemp.Name 
                                pathUrlFirst = pathURL & Name 
                                Response.Write(pathUrlFirst) 
                                End If 
                                 
                              %>" style="width: 120px; border: 1px solid rgb(195, 195, 195);"  /> 
                          
                          
                         
                          
                            </a> 
                             
                            </td> 
                            <td  style=" text-align: left;  border-right-width: 0px; border-bottom-width: 0px; border-left-width:   0px"> 
                            <table  style="border-right-width: 0px; border-bottom-width:    0px; border-left-width: 0px"> 
                            <!-- 
                            <tr style="border-right-width: 0px; border-bottom-width:    0px; border-left-width: 0px"> 
                            <td colspan="4" style="border-right-width: 0px; border-bottom-width:0px; border-left-width: 0px" > 
                            <span id="lblDescription" >  
                                <%#IIf(Eval("Sales Description") <> "", Eval("Sales Description").ToString().Substring(0, Math.Min(150, Eval("Sales Description").Length)) & "...&nbsp;&nbsp;<a href=""productdetails.aspx?sid=" & Eval("Stock Number") & """>[View More]</a>", "")%> 
                            </span> 
                            </td> 
                            </tr> --> 
                            <tr style="border-right-width: 0px; border-bottom-width:    0px; border-left-width: 0px" > 
                            <td  width="125px" style="border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px"> 
                            Engine:<br /> 
                            Transmission:<br /> 
                            Wheel Drive:<br /> 
                            Stock #:<br /> 
                            </td> 
                            <td  width="100px" style="border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px"> 
                            <%'#Eval("Engine Model")%><br /> 
                            <%'#Eval("Transmission")%><br /> 
                            <%'#Eval("Wheel Base")%><br /> 
                            <%#eval("Stock Number") %><br /> 
                            </td> 
                            <td  width="80px" style="border-right-width: 0px; border-bottom-width:  0px; border-left-width: 0px"> 
                            Color:<br /> 
                            Package:<br /> 
                            VIN:<br /> 
                            Mileage:<br /> 
                            </td> 
                            <td  width="100px" style="border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px"> 
                             
                            <%#Eval("Ext2 Color")%><br /> 
                            <%#Eval("Unit Trim")%><br /> 
                            <%#Eval("Primary Serial Number")%><br /> 
                            <%#IIf((Eval("Custom2") <> "" Or Eval("Odometer") = "0"), "Please Call", Eval("Odometer"))%><br /> 
                            </td> 
                            </tr>  
                            </table>   
                             
                            <table> 
                            <tr> 
                                <td><%#IIf(Eval("Certified") = 1, "<img src=""images/warranty.jpg""> ", "")%></td> 
                            </tr> 
                            </table> 
                                                   
                            </td> 
                            <td width="250px" style="border-right-width: 0px; border-bottom-width:  0px; border-left-width: 0px"> 
                                <table style="border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px"> 
                                    <tr> 
                                        <td width="140px" style="border-right-width: 0px; border-bottom-width:  0px; border-left-width: 0px"> 
                                            <div align="center"> 
                                            <div style="font-size: large; font-weight: bold; vertical-align: top"> 
                                            <%#IIf(Eval("OurPrice") & 0 <> 0, FormatCurrency(Eval("OurPrice"), 2), "In Service")%> 
                                            <br /><br /><br /> 
                                            </div> 
                                            <a href="productdetails.aspx?sid=<%#Eval("Stock Number") %>"><img src="images/button/viewdetails.gif" alt="" border="0" style="margin-bottom: 5px" /></a><br /> 
                                            </div> 
                                        </td> 
                                        <td width="110px" style="border-right-width: 0px; border-bottom-width:  0px; border-left-width: 0px"> 
                                        <div align="center"> 
                                
                                            <br /><br /> 
                                            <div id="carfax" runat="server" visible="True"> 
                                                <img src="images/carfax_1owner.png" alt="" border="" /> 
                                            </div> 
                                            <br /> 
                                            </div> 
                                        </td> 
                                    </tr> 
                                    <tr> 
                                    <td colspan="2" style="border-right-width: 0px; border-bottom-width:    0px; border-left-width: 0px"> 
                                        <div align="center"> 
                                            <div id="uwm_<%#Eval("Primary Serial Number")%>" style="width:150px; height:54px; cursor:hand"></div> 
                                        </div> 
                                    </td> 
                                    </tr> 
                                </table> 
                            </td> 
                        </tr> 
                    </table> 
                 </td> 
            </tr> 
             
        </table> 
    </div> 
    </ItemTemplate>               
    <EditFormSettings> 
        <FormTemplate> 
            <asp:CheckBox ID="CheckBox1" runat="server" AutoPostBack="True"  
                OnCheckedChanged="ToggleRowSelection" /> 
        </FormTemplate> 
    </EditFormSettings> 
    <PagerStyle Mode="NextPrevNumericAndAdvanced" Position="TopAndBottom" /> 
</MasterTableView> 
    <ActiveItemStyle BorderStyle="None" /> 
</telerik:RadGrid> 
<asp:SqlDataSource ID="SqlDataSource1" runat="server"  
    ConnectionString="<%$ ConnectionStrings:TestString %>"  
    SelectCommand="SELECT * FROM Vehicles WHERE Sys2KNum = '001270'" > 
</asp:SqlDataSource> 
 


Nikita Yaroshevsky
Top achievements
Rank 1
 answered on 10 Jun 2010
1 answer
99 views
Hello,

I have implemented the RadMenu on a page with a fixed set of 4 menu items. I have followed an example I found where I set the right click and trigger the client side code to show the RadMenu.  This works great -- especially for an Add,Edit,Delete which applies to all rows. 

How do I further customize this to make it row specific. FOr example, for row 1 I might want to show 2 options, versus row 2, 3 options.  depends on the row.  I thought of using the web service, but passing the row is tricky -- or creating a RadMenu per row --- but before I go down either of these paths I wanted to see if I was missing something and there is an easier way.

Thanks,
Todd.
Princy
Top achievements
Rank 2
 answered on 10 Jun 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?