Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
74 views
itemcreated not fire when radmenu sits in a radgrid template column, should this be the case or i am doing something wrong?
Peter
Telerik team
 answered on 11 Nov 2010
1 answer
124 views
We put the Radtooltip control associate with Listbox, but tooltip only shows the empty box without contents. Could you login our site to take a look? Thanks

www.ocmtesting.com

Login: demouser@telserv.com

Password: p


Under Service/Mac menu, Click Ticket Resource View to test.

Thanks a lot.

Peter
Telerik team
 answered on 11 Nov 2010
6 answers
281 views
Hi Telerekians!

I had one little request... is there a way to control where the validation text appears?  Currently it is displaying above and below the control, but I'd rather be able to pick one or the other.  Is that possible/going to be possible?

Thank you!
Karl
Top achievements
Rank 1
 answered on 11 Nov 2010
4 answers
207 views
I've a page with a RadScheduler on it and I'm trying to get ToolTips working with the scheduler.

I've got all the relevant code from this example but the tooltip manager isn't firing its OnAjaxUpdate event. For information, my RadToolTipManager definition is shown below.

<telerik:RadToolTipManager runat="server"
                           ID="RadToolTipManager1"
                           Width="320"
                           Height="210"
                           Skin="Office2007"
                           Animation="None"
                           HideEvent="LeaveToolTip"
                           Text="Loading..."
                           RelativeTo="Element"
                           OnAjaxUpdate="RadToolTipManager1_AjaxUpdate"
                           OnClientBeforeShow="SchedulerToolTipBeforeShow"
                           EnableShadow="true"/>


I know that the relevant controls are being added to the TargetControls collection, I can watch it happen in the debugger and I can see that the ID of the control added to the TargetControls collection is the same as the appointment that is rendered on the page.

Putting a breakpoint in the server-side event handler fires nothing, but then I guess that that is because no Ajax request is ever made. I know this 'cos I added the alert call in to the following JS code from the page.
Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginRequestHandler);
function beginRequestHandler(sender, args) {
    alert("!");
    if (args.get_postBackElement().id.indexOf('RadScheduler1') != -1) {
        hideActiveToolTip();
    }
}

and I don't get the alert or my expected tooltip. All I get is the standard HTML tooltip.

Is there a reason why the Ajax event wouldn't be called?

-- 
Stuart
Svetlina Anati
Telerik team
 answered on 11 Nov 2010
3 answers
352 views
When I export grid to excel column headers always centered. I cannot change it. radgrid's all column headersactuallt left aligned. this situation exists even in live demos. http://localhost:8301/radcontrols_aspnetajax/grid/examples/generalfeatures/exporting/defaultcs.aspx
can I change the headers's alignment while exported ? there's only one ticket at this forum and there's no answer to that. (I already tried offered solutions)
thanks.
Jörgen Hyving
Top achievements
Rank 1
 answered on 11 Nov 2010
1 answer
193 views

I have a form in which i am using dataGrid to acess the data from the database.

Now on clicking the button a new Detailview page is open in which i want to retrieve value according to the button in which click.


My Default.aspx coding is


<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>


<!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">
    
    <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
    
    
     <script type="text/javascript" language="javascript">

   function OpenPopUp()
   {
   window.showModalDialog("child.aspx", ' ', 'dialogHeight:10; dialogWidth: 300px; dialogTop: 125px; dialogLeft: 100px; edge: Raised; center: Yes; resizable: No; status: Yes;');
    }
</script>

</head>
<body>
    <form id="form1" runat="server">
        
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />

<telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />


       
   
        <telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" OnNeedDataSource="RadGrid1_NeedDataSource"  GridLines="None" Height="750px" AllowSorting="True"  PageSize="8" AllowPaging="True">
            <MasterTableView AllowMultiColumnSorting="True" AutoGenerateColumns="False">
            <Columns>
            
                    <telerik:GridBoundColumn UniqueName="CITY_CODE" DataField="CITY_CODE" HeaderText="City Code" >
                        <HeaderStyle Width="200px" />
                    </telerik:GridBoundColumn>
                        
                        <telerik:GridBoundColumn UniqueName="NAME" DataField="NAME" HeaderText="Hotel Name" >
                            <HeaderStyle Width="200px" />
                        </telerik:GridBoundColumn>
                        
                         <telerik:GridBoundColumn UniqueName="ADDRESS_3" DataField="ADDRESS_3" HeaderText="City" >
                             <HeaderStyle Width="200px" />
                         </telerik:GridBoundColumn>
                        
                        <telerik:GridBoundColumn UniqueName="PHONE" DataField="PHONE" HeaderText="Phone Number" >
                            <HeaderStyle Width="200px" />
                        </telerik:GridBoundColumn>
                        </Columns>
                        
                        
                        
                        
                        
                        
                        
                        
             <ItemTemplate>
                    <%# (((GridItem)Container).ItemIndex != 0) ? "</td></tr></table>" : "</td></tr></table>"%>
                    <asp:Panel ID="ItemContainer" CssClass='<%# (((GridItem)Container).ItemType == GridItemType.Item)? "item" : "alternatingItem" %>'
                        runat="server" Width="326px" Height="122px">
                        
                        <asp:Label ID="titleLabel" runat="server" Text="City Code:" Font-Bold="true" style="float:left;width:30%;text-align:right"/>
                         <asp:Label ID="lblCityCode" runat="server" Text='<%# Eval("CITY_CODE") %>'/><br />
                         
                         
                        <asp:Label ID="Label6" runat="server" Text="Hotel Name:" Font-Bold="true" style="float:left;width:30%;text-align:right"/>
                         <asp:Label ID="Label1" runat="server" Text='<%# Eval("NAME") %>'/><br />
                         
                         
                        <asp:Label ID="Label7" runat="server" Text="Address:" Font-Bold="true" style="float:left;width:30%;text-align:right"/>                                                  
                          <asp:Label ID="lblAddress" runat="server" Text='<%# Eval("ADDRESS_1")+ ", " %>' /><br />
                          
                          
                          
                        <asp:Label ID="Label8" runat="server" style="float:left;width:30%;text-align:right"/>                                                  
                        <asp:Label ID="lblAddress2" runat="server" Text='<%# Eval("ADDRESS_2")+ ", " %>' /><br />
                        
                              
                              
                          <asp:Label ID="Label9" runat="server" style="float:left;width:30%;text-align:right"/>
                          <asp:Label ID="Label4" runat="server" Text='<%# Eval("ADDRESS_3")+ ", " %>' /><br />
                          
                          
                          <asp:Label ID="Label10" runat="server" style="float:left;width:30%;text-align:right"/>
                          <asp:Label ID="Label5" runat="server" Text='<%# Eval("ADDRESS_4") %>' /><br />
                          
                          
                        <asp:Label ID="Label11" runat="server" Text="Phone Number:" Font-Bold="true" style="float:left;width:30%;text-align:right"/>
                         <asp:Label ID="Label2" runat="server" Text='<%# Eval("PHONE") %>'/><br />
                         
                         
                         
                        <asp:Label ID="Label12" runat="server" Text="Fax:" Font-Bold="true" style="float:left;width:30%;text-align:right"/>
                        <asp:Label ID="Label3" runat="server" Text='<%# Eval("FAX") %>'/>
                        <br />
                        
                        <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
                        </telerik:RadWindowManager>
                        
                        
                        
                        
                         
                                             
                        
                        <button style="width: 40px; margin-bottom: 3px;" onclick="OpenPopUp()">More</button><br style="clear:both" /><br style="clear:both" />
                        

                    </asp:Panel>
                    </ItemTemplate>
                
            </MasterTableView>
            
            <GroupingSettings CaseSensitive="False" />
        </telerik:RadGrid>
    

    </form>
</body>
</html>



default.aspx.cs is

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

        SqlConnection sqlConnection = new SqlConnection("Data Source = DELLVOSTRO; Initial Catalog = ALPHA; User Id= sa; Password= intransit");
        
        string selectString = "SELECT CITY_CODE,NAME,PHONE,ADDRESS_1,ADDRESS_2,ADDRESS_3,ADDRESS_4,FAX " + "FROM HOTELS ";

        SqlDataAdapter dataAdapter = new SqlDataAdapter(selectString, sqlConnection);
        DataTable table = new DataTable();
        dataAdapter.Fill(table);
        RadGrid1.DataSource = table;
        RadGrid1.DataBind();

    }



child.aspxis

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="child.aspx.cs" Inherits="child" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<!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 id="Head1" runat="server">
 <title>Message Deatils</title>
</head>
<body>
    
    <script type="text/javascript">
    function GetRadWindow()
    {
        var oWindow = null;
        if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
        else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;//IE (and Moz as well)
          
        return oWindow;
    }
    function CloseWnd()
    {
        GetRadWindow().close();
    }

    function OnClientLoad(sender,args)
    {
        window.setTimeout(function()
        {
            sender.set_mode(2);
            sender.set_mode(1);
        }, 0);
    }
    </script>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
        <telerik:RadSkinManager ID="RadSkinManager" runat="server" Skin="Outlook">
        </telerik:RadSkinManager>
        <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" />
        
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server"
            LoadingPanelID="RadLoadingPanel1">
            
            
<asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" Width="33%"
CellPadding="0" Height="100%" GridLines="None" OnPageIndexChanging="DetailsView1_PageIndexChanging">
                <Fields>
                    <asp:BoundField DataField="CITY_CODE" HeaderText="City Code:" SortExpression="CITY_CODE" >
                        <HeaderStyle Width="30%" />
                    </asp:BoundField>
                    <asp:BoundField DataField="NAME"  HeaderText="Hotel Name:" SortExpression="NAME" />
                    <asp:BoundField DataField="ADDRESS_1"  HeaderText="ADDRESS:" SortExpression="NAME" />
                    <asp:BoundField DataField="ADDRESS_2" SortExpression="NAME" />
                    <asp:BoundField DataField="ADDRESS_3" SortExpression="NAME" />
                    <asp:BoundField DataField="ADDRESS_4" SortExpression="NAME" />
                    <asp:BoundField DataField="PHONE"  HeaderText="Phone Number" SortExpression="NAME" />
                    <asp:BoundField DataField="FAX"  HeaderText="Fax" SortExpression="NAME" />    
                </Fields>
            </asp:DetailsView>
            <div style="text-align: right; margin-top:8px;">
               
                
            </div>
        </telerik:RadAjaxPanel>
        
  
        <telerik:RadAjaxLoadingPanel ID="RadLoadingPanel1" runat="server" >
        </telerik:RadAjaxLoadingPanel>
    </form>
</body>
</html>


child.aspx.cs is

public partial class child : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        SqlConnection sqlConnection = new SqlConnection("Data Source = DELLVOSTRO; Initial Catalog = ALPHA; User Id= sa; Password= intransit");

        string selectString = "SELECT CITY_CODE,NAME,PHONE,ADDRESS_1,ADDRESS_2,ADDRESS_3,ADDRESS_4,FAX " + "FROM HOTELS "+ "Where FAX = '"+label3.text+"'";

        SqlDataAdapter dataAdapter = new SqlDataAdapter(selectString, sqlConnection);
        DataTable table = new DataTable();
        dataAdapter.Fill(table);
        DetailsView1.DataSource = table;
        DetailsView1.DataBind();
    }
    protected void DetailsView1_PageIndexChanging(object sender, DetailsViewPageEventArgs e)
    {

    }
}

Veli
Telerik team
 answered on 11 Nov 2010
1 answer
102 views
Hi,
I am using RadDatePicker and have written the below given java script function to handle OnError event.
Now if I enter 505050 as the input i am getting the error "Enter a Valid Date in YYYY/MM/DD Format" multiple times if I press the "Enter" key to close the alert dialog which is very annoying. 
I am new to ASP.NET as well as Telerik controls. Please let me know what is going wrong.

ASPX
<telerik:RadDatePicker ID="dtmFromDt" runat="server" Width="100px"
   Visible="true" MinDate="1500/01/01" MaxDate="3000/01/01" DateInput-DateFormat="yyyy/MM/dd"                                                     Skin="WebBlue">
        <ClientEvents OnPopupClosing="OnPopupClosing"/>
<DateInput  runat="server" EmptyMessage="YYYY/MM/DD" Visible="true" ClientEvents-OnError="ShowDateError" >                     </DateInput>
<Calendar Skin="WebBlue" runat="server" UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False"                                                    ViewSelectorText="x">
</Calendar><DatePopupButton HoverImageUrl="" ImageUrl="" />
</telerik:RadDatePicker>
JavaScript 
function ShowDateError(sender, args)  
{  
alert ("Enter a Valid Date in YYYY/MM/DD Format");  
sender.focus();   
return false;
}

Please find attached image of code from a sample solution

Regards,
Murthy Meka
Dimo
Telerik team
 answered on 11 Nov 2010
1 answer
112 views
I've added a RadAjaxPanel around a custom control, called YesNoControl, which shows radio buttons for Yes, No, N/A (N/A is optional).

The YesNoControl has a Changed event that fires when the Value changes, and I've told this event to hide or show a div from just underneath it. This works perfectly, as far as I can tell.

The issue I have is with the LoadingPanel.  It only appears when clicking No.  When I click Yes, the div appears correctly, but no Loading Panel.  When I click No, the Loading Panel appears and the div is hidden.

I've got it showing the N/A radio button to test it further, and the Loading Panel only appears when Yes has been selected and No or N/A is then clicked.

Has anyone got an idea what may be causing this or how to get around it?

Thanks,
Guy
Dimo
Telerik team
 answered on 11 Nov 2010
1 answer
94 views
I want to use LoadOnDemand for a combobox. The comboBox is:

<telerik:RadComboBox ID="rcbProva" runat="server" EmptyMessage="Seleziona..." EnableLoadOnDemand="true" OnItemsRequested="rcbProva_ItemsRequested">
</telerik:RadComboBox>

I want to bind the radComboBox with a selectedValue but it seems not to work .
How can I set the SelectedValue of a RadComboBox using EnableLoadOnDemand=true? Anyone has an example?
Shinu
Top achievements
Rank 2
 answered on 11 Nov 2010
13 answers
284 views
Hello, i'm having some problems with the TabStrip control...

I'm trying to make a tabstrip linked to a MultiPageView using Ajax... the fact is that when I load the page, i can see the first tab with everything ok; when I click on the second tab, I get all the data and is working OK... but if I try to return to the first tab I can't, it simply doesn't do anything.

I'm using a RadAjaxManager like this:
    <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1">  
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="Tabs1">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="Tabs1" /> 
                    <telerik:AjaxUpdatedControl ControlID="Pages" LoadingPanelID="LoadingPanel" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="Pages">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="Pages" LoadingPanelID="LoadingPanel" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 

If I delete de Manager everything is working fine, excepting the fact that it's reloading the entire page.

This is the code behind:
protected void Page_Load(object sender, EventArgs e)  
        {  
            if (!Page.IsPostBack)  
            {  
                AddTab("Vista en Arbol");  
                AddPageView(Tabs1.FindTabByText("Vista en Arbol"));  
                AddTab("Vista en Tabla");  
            }  
        }  
        private void AddTab(string tabName)  
        {  
            RadTab tab = new RadTab();  
            tab.Text = tabName;  
            Tabs1.Tabs.Add(tab);  
        }  
        private void AddPageView(RadTab tab)  
        {  
            RadPageView pageView = new RadPageView();  
            pageView.ID = tab.Text;  
            Pages.PageViews.Add(pageView);  
            tab.PageViewID = pageView.ID;  
        }  
        protected void Tabs1_TabClick(object sender, RadTabStripEventArgs e)  
        {  
            AddPageView(e.Tab);  
            e.Tab.PageView.Selected = true;  
        }  
        protected void Pages_PageViewCreated(object sender, RadMultiPageEventArgs e)  
        {  
            string userControlName="";  
            if (e.PageView.ID == "Vista en Arbol")  
            {                   
                userControlName ="~/visitas/conexionesAJAX.ascx";  
            }  
            else if (e.PageView.ID == "Vista en Tabla")  
            {  
                userControlName ="~/visitas/conexionesGRID.ascx";  
            }  
 
            Control userControl = Page.LoadControl(userControlName);  
            userControl.ID = e.PageView.ID + "_userControl";  
 
            e.PageView.Controls.Add(userControl);  
        } 

I don't know where is my error... hope u can help me.

Thanks
Yana
Telerik team
 answered on 11 Nov 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?