Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
253 views
Hi all,

I have a RadComboBox which is inside an absolutely positioned div with overflow set to auto. The problem is that when you expand the RadComboBox and then scroll down with the cursor outside of the ComboBox, the list it items in the combo box becomes detached from the base of the Combo Box.

Here is my test code:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
<head runat="server"
    <title>Test Page</title> 
</head> 
<body style="overflow: hidden"
    <form id="form1" runat="server"
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" /> 
    <div style="position: absolute; top: 25px; left: 25px; right: 25px; bottom: 100px; 
        overflow: auto"> 
        test<br /> 
        <telerik:RadComboBox ID="RadComboBox1" runat="server"
            <Items> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
                <telerik:RadComboBoxItem Text="Test" /> 
            </Items> 
        </telerik:RadComboBox> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
        test<br /> 
    </div> 
    </form> 
</body> 
</html> 
 

Does anyone know of a solution to this?

Cheers!

Brent

PS I've already tried all of the solutions in this thread to no avail

PPS I'm using the Q3 2009 version of the ASP.Net AJAX controls.
Brent
Top achievements
Rank 1
 answered on 25 Feb 2010
1 answer
150 views

I'm having problems re-creating this demo of the ComboBox Template: http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/templates/defaultcs.aspx

I've copied the pages on to my test site but I'm trying to re-create it with my own data and with out a "TreeView" in the second RadComboBox.  I've even tried with it.  I don't know if my db tables are not right, as I'm not sure how yours are created but it seems straightforward.   The closet I can get, is Combo1 populating and Combo2 shows nothing, unless I remove the tree view then I get just get "datarows"

Ideally I wouldn't want the combo2 to be hierarchical.

Also, how and when does the second combo ever databind? 

My Tables I'm trying to use:

Table State: (This would populate Combo 1, Value/Text)
StateID Abbreviation
1 FL
2 NY
3 CA



This table has "CreditTypes" that are assigned to different states.
Not sure if I bind Combo 2 to table StateCreditType or CreditType, I think StateCreditType but either way can't get it working or where to put the values in the front-end.  

Table StateCreditType:
StateCreditTypeID StateID CreditTypeID CreditTypeName
1 1 2 Bravo
2 1 3 Charlie
3 2 1 Alpha
4 2 3 Charlie


Table CreditType:
CreditTypeID CreditTypeName
1 Alpha
2 Bravo
3 Charlie
4 Delta


Any help or thoughts?
Fred
Top achievements
Rank 1
 answered on 24 Feb 2010
2 answers
183 views
Hi,

Is there something I am missing.  My images won't display.  I have a datalist that is bound from code behind.  Here is what it looks like:

.ascx
<asp:DataList ID="dlProducts" runat="server" RepeatColumns="4" RepeatDirection="Horizontal" 
            RepeatLayout="Table" ItemStyle-CssClass="ItemBox"
            <ItemTemplate> 
                <ul> 
                    <li> 
                        <telerik:RadBinaryImage ID="rbiGridImage" runat="server" DataValue='<%# DataBinder.Eval(Container.DataItem, "PictureBinary") %>' /> 
                    </li> 
                    <li> 
                        <%# DataBinder.Eval(Container.DataItem, "Name") %></li
                    <li> 
                        <%# DataBinder.Eval(Container.DataItem, "OldPrice") %></li
                    <li> 
                        <%# DataBinder.Eval(Container.DataItem, "Price") %></li
                    <li> 
                        <%# DataBinder.Eval(Container.DataItem, "MName") %></li
                </ul> 
            </ItemTemplate> 
        </asp:DataList> 
 All other fields display correctly and if I remove the RadBinaryImage and bind the raw data I get "<Binary Data>" so I know I am binding correctly.

Any ideas?
One more thing, if I the run query that loads my data the "PictureBinary" field data looks like this:
0xFFD8FFE000104A46494600010101004800480000FFE1118545.....
Which looks pretty binary to me.
Thanks. Joe.


Joe
Top achievements
Rank 1
 answered on 24 Feb 2010
2 answers
415 views
I'm using a custom user control in my RadGrid to add new customer using the below markup.

<EditFormSettings EditFormType="WebUserControl" UserControlName="~/controls/customer/Details.ascx">  
<PopUpSettings Width="600px" Height="400px" Modal="true" /> 
</EditFormSettings> 

In the user control I have a save button which saves the data to the database and once this is done I want it to close the (modal edit) window and navigate the browser (parent) window to the customer preview screen.

So in my code behind I've placed the following (I've used this code for RadWindows before and it works fine).

string script = "<script language='javascript' type='text/javascript'>CloseAndRedirect('" + VOPCustomerID.ToString() + "');</script>";  
Page.ClientScript.RegisterStartupScript(this.GetType(), "Close", script); 

I have the below in the page (again, used this before with RadWindows and all is fine).

<script type="text/javascript">  
    function CloseAndRedirect(ss)  
    {  
        //Redirect to new url  
        GetRadWindow().BrowserWindow.location.href = '../Customer/Default.aspx?CustID=' + ss;  
        //closes the window  
        GetRadWindow().close();  
    }  
      
    //Get reference to window  
    function GetRadWindow()  
    {  
        var oWindow = null;  
        if (window.radWindow)  
            oWindow = window.radWindow;  
        else if (window.frameElement.radWindow)  
            oWindow = window.frameElement.radWindow;  
        return oWindow;  
    }          
</script> 

As I've said, I've used the above two pieces of code before with RadWindows and all is fine, they close and the browser window navigates to the new screen.

However with the Edit Form, the modal popup does close and then reopens and the browser does not navigate to the preview screen. When I tried removing the redirection in the JavaScript and only close the popup window the same happens, the window closes and then opens again.

Is there some other setting I need to set here?

Thanks.


Liam
Dustin Blair
Top achievements
Rank 1
 answered on 24 Feb 2010
4 answers
191 views
I have a couple of questions about exporting a grid as CSV.

  1. All columns appear to be exported as strings (i.e. surrounded by quote-marks) - is this by design, or can I control this?
  2. I have AutoGeneratedColumns that are hidden initially, i've tried to set them to Visible, but yet they do not appear in the exported csv file?
  3. My grid only loads 1 page of information at a time, I'd like to export ALL pages.  Now I can call my stored procedure and tell it to fetch all data rather than just a single page, i've tried reassigning the DataSource & issuing a DataBind() prior to executing the ExportToCSV(), but still only 1 page of information is shown  -- how can I refresh the datasource prior to export?

thanks
Brian.

Daniel
Telerik team
 answered on 24 Feb 2010
2 answers
154 views
hi

I have following
 <telerik:RadGrid ID="RadGrid1"
....


<DetailTables>
          <telerik:GridTableView
          .
          . {columns here}
          .
          <CommandItemTemplate>
              <div style="text-align:right;">
                <asp:Button ID="LinkButton6" runat="server"
                    CommandName="SetSelected" text="Set"                    CausesValidation="false"/>
              </div>
            </CommandItemTemplate>

I need to react to the command here and iterate through all item in the sub grid that the command template belongs to. How do I get access and what method is it - the itemcommand on the main grid and filter by command name?


Thanks
Kieran
donoho
Top achievements
Rank 1
 answered on 24 Feb 2010
2 answers
221 views
Hi there,

I'm trying to get the RadScheduler to work in an ASP.NET MVC 2 project running locally on IIS 7 Integrated Mode (on Windows Vista).

But I'm always getting this (famous) error message:

"The WebResource.axd handler must be registered in the configuration to process this request

<!-- Web.Config Configuration File -->

<configuration>
   <system.web>
       <httpHandlers>
           <add path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" validate="True" />
       </httpHandlers>
   </system.web>
</configuration>"

I went through all the troubleshooting topics in the documentation and lots of threads in this forum and checked my web.config entrys a thousand times. Still the same problem. This is the part of my web.config relevant for IIS 7 (Integrated Mode):

<system.webServer> 
    [...] 
    <handlers> 
      <remove name="WebServiceHandlerFactory-Integrated" /> 
      <remove name="ScriptHandlerFactory" /> 
      <remove name="ScriptHandlerFactoryAppServices" /> 
      <remove name="ScriptResource" /> 
      <remove name="MvcHttpHandler" /> 
      <remove name="UrlRoutingHandler" /> 
      <!--<add name="Telerik_Web_UI_WebResource" verb="*" path="Telerik.Web.UI.WebResource.axd" preCondition="integratedMode" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2009.3.1314.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"/>--> 
      <add name="Telerik_Web_UI_WebResource" verb="*" path="Telerik.Web.UI.WebResource.axd" preCondition="integratedMode" type="Telerik.Web.UI.WebResource" /> 
      <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
      <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
      <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
      <add name="MvcHttpHandler" preCondition="integratedMode" verb="*" path="*.mvc" type="System.Web.Mvc.MvcHttpHandler, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
      <add name="UrlRoutingHandler" preCondition="integratedMode" verb="*" path="UrlRouting.axd" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> 
    </handlers> 
</system.webServer> 

It doesn't work for both the commented and uncommented "Telerik_Web_UI_WebResource" line.

If I run my project on the VS Development Server it works perfectly.

The error only arises in Views where I have the RadScheduler (or another RadControl). Here's a View which gives an error:

<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Coach.Master" Inherits="System.Web.Mvc.ViewPage" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"
    Scheduler 
</asp:Content> 
 
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"
 
    <h1>Scheduler</h1> 
     
     
    <telerik:RadScheduler ID="CoachScheduler" runat="server" ProviderName="CoachSchedulerProvider"
    </telerik:RadScheduler> 
 
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
    </telerik:RadScriptManager> 
</asp:Content> 


I even tried the demo attached here, but I get the same error when running on IIS 7, but not on Development Server.

My conclusion was that either something is wrong in the configuration of IIS 7 or the error arises from the fact that the URLs are different on IIS 7 (e.g. "http://localhost:50000/..." on Development Server but "http://localhost/MvcApplication/..." on IIS).

I can see all the handlers registered in the above web.config section in the handlers list in IIS, so I don't think I've done anything wrong here..

Thanks in advance.
Fabian Gehri
Top achievements
Rank 1
 answered on 24 Feb 2010
3 answers
136 views
Hi,

I need to dynamically create my columns in a radgrid, because I do not know how many columns I need to display.

The data to be displayed is fetched in the event handler of a button. When I receive that data I know how many columns to create. Problem is, this event handler is run after Page_Load, which as I understand it is the place where you have to create your grid columns for them to show up.

The result at the moment is that the grid is not shown until I click the button again, at which point the data is available at Page_Load and the columns is created accordingly. How can I solve this problem? I obviously want the result to be displayed after only one post back!

Best regards
R N
Top achievements
Rank 1
 answered on 24 Feb 2010
3 answers
239 views
I have the following telerik:RadPanelBar Declared in a default.aspx page 

 

<telerik:RadPanelBar runat="server" ID="radIdentifyPanel" Skin="WebBlue" Width="100%" Height="100%" ExpandMode="FullExpandedItem">  
<Items> 
<telerik:RadPanelItem Text="Details" Expanded="true" runat="server">  
<Items> 
<telerik:RadPanelItem runat="server">  
<ItemTemplate>   
<telerik:RadColorPicker ID="RadColorPicker1" runat="server" AutoPostBack="True" Preset="Standard">   
</telerik:RadColorPicker>   
<asp:Label ID="lblTest" runat="server" Text="Change me"></asp:Label>   
<asp:Panel ID="IdentifyFSDetails" runat="server">   
Dynmanic Details here!   
</asp:Panel>   
</ItemTemplate>   
</telerik:RadPanelItem>   
</Items> 
</telerik:RadPanelItem> 
....  
</Items>   
<ExpandAnimation Type="None" />   
</telerik:RadPanelBar> 

I am trying to dynamically insert some html into the asp:Panel IdentifyFSDetails but can not seem to get access to it using the following javascript clientside. 

var panelbar = $find("radIdentifyPanel");   
var item = panelbar.findItemByText('Details');   
var test1 = item.findControl("IdentifyFSDetails");   
var test2 = item.findControl("lblTest");  
 
 

 

both test1 and test2 return null while if I try getting the reference to the color picker like the example it does get a reference to it.
All I am trying to do is insert the dynamic html into the panel.
What am I doing wrong?

 

 

 

Andrew
Top achievements
Rank 1
 answered on 24 Feb 2010
2 answers
168 views

Hi:

We've had an ongoing issue that your associate, Daniel, has spoken to in the past. Unfortunately the issue still persists and it would be helpful if we could figure it out and move on. We appreciate any help you can provide.

We desire to bind to a RadGrid using Client-side techniques to avoid long waits for our users.

The binding needs to support adding rows to the grid, updating information currently in the grid, and deleting rows from the grid.

We have followed your examples and have produced JavaScript routines and Web Services to do what is needed. We are confident that this code is correct because much of the client-side functionality works very well.

We can delete any row in our grid and, if we choose delete all of the rows. This functions perfectly.

We can update any row in the grid. Again this functions perfectly.

The problem comes when we try and insert new rows into the grid. When we do this the grid actually does contain the newly added row. We can see the data in the JavaScript Object. However when the Grid is ‘redrawn’ on the page, the newly added row never appears. The following code snippet is where we believe the problem to be occurring (or not such as the case may be)…

 

        var numofRows = new Number(result.length);

 

        var tableView = $find("<%= SummaryGrid_West.ClientID %>").get_masterTableView();

        tableView.set_dataSource(result);

        tableView.set_virtualItemCount(numofRows);

        tableView.dataBind();

 

        if (result.length != 0)

        {   

            var row = tableView.get_dataItems()[numofRows-1]

            row.set_selected(true);

            row.set_visible(true);

        }       

        tableView.dataBind();

       

        var grid = $find("<%= SummaryGrid_West.ClientID %>");

        grid.repaint();

 

 

 As you can see, we  acquire a reference to the last row in the grid --- the one that was just added, select it, and explicitly  make it visible. This does not allow us to see the newly added row.

Curiously if we change the second dataBind() call to be instead tableView.rebind(), the new row is displayed --- after a long delay. I am told that this happens because the server side code is called. This is precisely what we are trying to avoid doing and, although it does suggest that the other mechanics of the process are working correctly, we would really prefer to keep all of this functionality on the server side.

It should be noted that, although we have active licenses for your product, we have been unable to utilize the latest release (Q4) because of some serious issues with the cosmetic rendering of your controls. I believe we are still on the Q3 – 2008 controls and perhaps this might explain some of our issues.

Hopefully you can help us with these issues. If, in fact, the best solution involves moving to the Q4 2009 controls, then we would need help in assuring thet they render correctly.

Thanks for your efforts in this matter.

Daniel
Telerik team
 answered on 24 Feb 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?