Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
102 views
Hi,
 I have One Grid View when i click submit button whole grid values saved in database and showing one alert message. When Displaying Alert Message the gridview disappears in the background.
I m using below script to show Display message

ScriptManager.RegisterClientScriptBlock(

Me, Me.GetType, "clientScript", "alert('Rates has Updated Successfully');", True). Can any give me any solution for this.

 



Marin
Telerik team
 answered on 01 Jun 2011
3 answers
90 views
Hi,  By typing in starting letters, radcombo can auto complete selection for first match.  Is there any way to do auto complete for non starting letters ? For example:    If the dropdown list options are  "red apple"  "green apple" "red grape" "green grape".   user type in "red" and press Tab,  the "red apple"  will be auto selected.   Is there any way to auto select "red apple" by typing in "apple" ?

Thanks

-susan
Dimitar Terziev
Telerik team
 answered on 01 Jun 2011
5 answers
104 views

Hi,

I have a RadCombo with the following event : OnClientSelectedIndexChanging which contains a call to a web service which returns a value. Depending on the value I may need to cancel the change. I have a callback function attached to the webservice.

 

How would I going about cancelling the change if I needed to?

 

Thanks

Dimitar Terziev
Telerik team
 answered on 01 Jun 2011
5 answers
351 views
Hi,

I have a series of user control that inherit from RadComboBox. They are used throughout the app, so this is primarily for the purpose of consistency and code re-use. However, I cannot seem to get my default 'Select a <xyz>' item to be the selected item upon the first page load. They show up in the drop-down but the text area of the combo box is blank until Postback, at which time it shows the 'Select a <xyz>' item correctly (assuming the user didn't pick anything).

Everything else seems to be working fine. Frankly, though, my OOP chops are a bit rusty and so I am wondering if I am doing this completely wrong.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using OSIRISModel;
 
namespace Telerik.Web.UI.OSIRIS
{
  /// <summary>Summary description for OS_JobStatusComboBox</summary>
  public class OS_JobStatusComboBox : RadComboBox
  {
    #region Constructor
    public OS_JobStatusComboBox()
    {
      //
      // TODO: Add constructor logic here
      //
    }
    #endregion
 
    #region Control Events
    protected override void OnLoad(EventArgs e)
    {
      if (!Page.IsPostBack)
      {
        OSIRISEntities context = ((OSIRISPage)Page).OSIRISContext;
 
        List<JobStatu> items = context.JobStatus.ToList<JobStatu>();
        this.DataTextField = "Description";
        this.DataValueField = "ID";
        this.DataSource = items;
        this.RegisterWithScriptManager = false;
 
        this.AppendDataBoundItems = true;
        this.Items.Insert(0, new RadComboBoxItem("Select a Job Status", ""));
        this.SelectedIndex = 0;
      }
    }
 
    // This is to prevent double-binding in cases where this control is used inside another control that causes Child Databinding (such as Formview)
    private bool Bound = false;
    protected override void OnDataBound(EventArgs e) { Bound = true; }
    protected override void OnPreRender(EventArgs e) { if (Bound == false) { this.DataBind(); } }
 
    #endregion
  }
}


Little help?
Kalina
Telerik team
 answered on 01 Jun 2011
1 answer
129 views
When you click on an anchor tag, it leaves a small dotted border around it. This is also true of the dates in a RadCalender.

However, because I have set the height of my calendar the rows have increased in height and when I click on a date the anchor tags has its border, but this is only an nth of the height of the row and looks unatractive. I've looked at the css that makes the date and row up and can't see how i'd set it up to display the whole date item as a block?

Can anyone help?

I've attached a screen shot to highlight my issue.

Vasil
Telerik team
 answered on 01 Jun 2011
7 answers
234 views
Hello Telerik Team,

I referred this blog and was able to load UserControls dynamically from code-behind.
Even this blog shows how to close the tabs.
But, I would like to know how can I close the tabs if I create and tabs dynamically from code-behind.
Please help with a working code to this.

MyCode:
 Protected Sub Page_Load(ByVal sender As ObjectByVal e As System.EventArgs) Handles Me.Load  
        If Not Page.IsPostBack Then 
            AddTab("Custom1")  
            AddTab("Custom2")  
        End If 
    End Sub 
    Private Sub AddTab(ByVal tabName As String)  
        Dim tab As New RadTab()  
        tab.Text = tabName  
        RadTabStrip1.Tabs.Add(tab)  
        Dim pageView As New RadPageView()  
        pageView.ID = tabName  
        RadMultiPage1.PageViews.Add(pageView)  
    End Sub 
 
    Protected Sub RadMultiPage1_PageViewCreated(ByVal sender As ObjectByVal e As Telerik.Web.UI.RadMultiPageEventArgs) Handles RadMultiPage1.PageViewCreated  
        Dim userControlName As String = e.PageView.ID + ".ascx" 
        Dim userControl As Control = Page.LoadControl(userControlName)  
        userControl.ID = e.PageView.ID + "_userControl" 
        e.PageView.Controls.Add(userControl)  
    End Sub 
aspx:
 <script type="text/javascript">  
       var tabStrip = $find("<%= RadTabStrip1.ClientID %>");  
       var multiPage = $find("<%= RadMultiPage1.ClientID %>");  
       var tab = tabStrip.findTabByText(tabText);  
       var pageView = tab.get_pageView();  
 
       var tabtabToSelect = tab.get_nextTab();  
       if (!tabToSelect)  
           tabtabToSelect = tab.get_previousTab();  
 
       tabStrip.get_tabs().remove(tab);  
       multiPage.get_pageViews().remove(pageView);  
 
       if (tabToSelect)  
           tabToSelect.set_selected(true);  
 
   </script> 
 
 <telerik:RadTabStrip Style="position: absolute; top: 84px;" ID="RadTabStrip1" SelectedIndex="0" 
                runat="server" MultiPageID="RadMultiPage1">  
                <TabTemplate> 
                      <%# DataBinder.Eval(Container, "Text") %> 
        <img style="margin-left: 10px" src="img/close.png" alt="delete" onclick="deleteTab('<%# DataBinder.Eval(Container, "Text") %>')" /> 
    </TabTemplate> 
 
            </telerik:RadTabStrip> 
            <telerik:RadMultiPage Style="position: absolute; top: 134px;" ID="RadMultiPage1" 
                runat="server" SelectedIndex="0">  
            </telerik:RadMultiPage> 
    </div> 

This doesn't work for tabs instantiated from code-behind.

Thanks
Veronica
Telerik team
 answered on 01 Jun 2011
2 answers
88 views
Hi,

I have RadGrid in UserControl which is placed in a MasterPage.

Code in .aspx page:

 

 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat
="server">
<ClientEvents OnRequestStart="onRequestStart" />
 <AjaxSettings>
 <telerik:AjaxSetting AjaxControlID="RadGridClntResult">
 <UpdatedControls>
 <telerik:AjaxUpdatedControl ControlID="RadGridClntResult" LoadingPanelID="RadAjaxLoadingPanel1"/>
 <%--<telerik:AjaxUpdatedControl ControlID="btnSrch" LoadingPanelID="RadAjaxLoadingPanel1" />--%>
 </UpdatedControls>
 </telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="btnEdit">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGridClntResult" LoadingPanelID="RadAjaxLoadingPanel1" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
</telerik:RadAjaxLoadingPanel>

<telerik:RadTabStrip ID="rTabStrip" runat="server" SelectedIndex="0" 
                                        Width="950px" MultiPageID="radMultiPage" Skin="Outlook"
                                        OnClientTabSelecting="tabSelecting"
                                        OnClientTabUnSelected="tabUnSelect"
                                        OnClientTabSelected="tabSelected">
                                         <Tabs>
                                            <telerik:RadTab Text="Contact Information" Selected="True" runat="server">
                                            </telerik:RadTab>
                                           <telerik:RadTab Text="Customers" runat="server">
                                            </telerik:RadTab>
                                            <telerik:RadTab Text="Orders" runat="server">
                                            </telerik:RadTab>
                                           
                                         </Tabs>
                                    </telerik:RadTabStrip>
                                    <telerik:RadMultiPage ID="radMultiPage" runat="server" SelectedIndex="0" onOnPageViewCreated="radMultiPage_PageViewCreated" >
                                         <telerik:RadPageView ID="RPVCDetail" runat="server">
                                            <uc1:contactDet ID="ucCntDet" runat="server" />  <!-- control contains the grid -->
                                         </telerik:RadPageView>
                                         <telerik:RadPageView ID="rpcData" runat="server">
                                            <uc1:gDataFeed ID="ucBetaData" runat="server"></uc1:gDataFeed>
                                         </telerik:RadPageView>
                                        
                                    </telerik:RadMultiPage>

Web UserControl code:
<telerik:RadGrid ID="radCntDets" runat="server" GridLines="None" Width="938px"
AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
OnNeedDataSource="radCntDets_OnNeedDataSource" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates
="True" HorizontalAlign="NotSet">
<ClientSettings EnableRowHoverStyle="True">
<Scrolling AllowScroll="True" UseStaticHeaders="True" />
</ClientSettings>
<MasterTableView GridLines="None" CommandItemDisplay="Top" DataKeyNames="ContactID" EditMode
="InPlace">
<Columns>
<telerik:GridEditCommandColumn UniqueName="EditCommandColumn" ItemStyle-Width="100px" HeaderStyle-Width
="100px">
</telerik:GridEditCommandColumn> 
<telerik:GridBoundColumn UniqueName="First Name" HeaderText="First Name" DataField="FirstName" HeaderStyle-Width="100px" ItemStyle-Width="100px" > 
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="Last NAme" HeaderText="Last Name" DataField="LastName" HeaderStyle-Width="100px" ItemStyle-Width
="100px">
</telerik:GridBoundColumn>

<telerik:GridBoundColumn UniqueName="Contact Type" HeaderText="Contact Type" DataField="ContactType" HeaderStyle-Width="100px" ItemStyle-Width
="100px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="vchEmail" HeaderText="Email" DataField="EmailAddress" HeaderStyle-Width="100px" ItemStyle-Width
="100px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="Phone Number" HeaderText="Phone" DataField="PhoneNumber" HeaderStyle-Width="100px" ItemStyle-Width
="100px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="Role" HeaderText="Role" DataField="PhoneNumber" HeaderStyle-Width="100px" ItemStyle-Width
="100px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="Notes" HeaderText="Notes" DataField="Notes" HeaderStyle-Width="220px" ItemStyle-Width
="220px">
</telerik:GridBoundColumn>
</Columns>
<%--<EditFormSettings ColumnNumber="3" CaptionFormatString="Edit details for employee with ID {0}"
CaptionDataField="ContactID">
<FormTableItemStyle Wrap="False"></FormTableItemStyle>
<FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle>
<FormMainTableStyle GridLines="None" CellSpacing="0" CellPadding="3" />
<FormTableStyle GridLines="Horizontal" CellSpacing="0" CellPadding="2" CssClass="module"
Height="110px"/>
<FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>
<FormStyle BackColor="#eef2ea"></FormStyle>
<EditColumn UpdateText="Update" UniqueName="EditCommandColumn1" CancelText="Cancel" ItemStyle-Font-Size="Smaller">
</EditColumn>
<FormTableButtonRowStyle HorizontalAlign="Left" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>
</EditFormSettings>--%>
</MasterTableView>
</telerik:RadGrid>

codebehind:

protected void radCntDets_OnNeedDataSource(object source, GridNeedDataSourceEventArgs e)
{

 radCntDets.DataSource = (DataSet)Session["CDetails"];

}

 

RadGrid control start jumping up and down when I mouse over on the grid or grid heading.
I am using VS2010 on windows7 OS.

Thanks in advance for your response.

-regards
Indra

 

 

Indranath
Top achievements
Rank 1
 answered on 01 Jun 2011
7 answers
114 views

Hi,

I have hard time finding some resources how to implement custom provider, in past I found this article

http://www.telerik.com/help/aspnet-ajax/schedule_databindingimplementingaprovider.html

but now I can’t access it.

Do you have any workaround to get that information, or it’s unavailable on purpose?

Thanks for info

Veronica
Telerik team
 answered on 01 Jun 2011
3 answers
53 views
I have a control which contains a telerik RadTabStrip.  There are 7 blank tabs which have the text dynamically set at runtime.  This control is used on 3 .aspx pages and one .ascx control.  On the three pages, everything works perfectly.  On the control, the tab appears blank.  But when you mouse over it, the tab text appears.  It then disappears again once you move the mouse off the tab.

Since this code is in a control, the same code is used in all 4 places.  But it's only working properly in 3.  So the only thing I can think of is how the control is being used between the 4 objects.  In the pages, the control is wrapped in an <asp:content><table><tr><td><div> section.  In the one control, it's in an <asp:panel><div> which is ultimately used by an <AJAXext:ModalPopupExtender>.

We are using version 2010.2.826.35.  Are there any known issues with that version's tabs being displayed properly within modal popups?

Thanks,
Donnovan
Kate
Telerik team
 answered on 01 Jun 2011
4 answers
109 views
Hi

Is there a way where i can preserve radgrid and its Template data.

My Scenario is

I retrieve  information from Database and bind it to Radgrid and there are few values i bind them to Template columns in ItemDataBound
I am saving Radgrid to Session When i come back to the same page second time i am able to bind the Radgrid with the session howevere  not the Template Columns.
Its binding all the template columns all over again which is a time consuming process. If its done for the first time can we just  Is there a way i can preserve the complete Radgrid along with Template coulmns
I am not sure if that can be done but just wanted to find out if there is an option

Thank you
Kavya

Kavya
Top achievements
Rank 2
 answered on 01 Jun 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?