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

I created a simple page with two telerik controls, one per web part. I set up the controls to connect as do standard controls but the two rad controls display a greyed connection option... Isn't it enough to use this.allowconnect = true to authorize connections?

Thx,
Yipi!
Tsvetoslav
Telerik team
 answered on 06 Aug 2010
5 answers
128 views
I'm having trouble using the code in one of the demos that allows for the tabstrip to show the child elements of the initial tab onmouseout.  Here's the code I'm using.

<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="ScriptManager" runat="server" />
    <telerik:RadCodeBlock runat="server" ID="RadCodeBlock1">
    <script type="text/javascript" language="javascript">
        function SelectMyTab(sender, eventArgs) {
            var tab = eventArgs.get_tab();
            tab.select();
        }

        function UnSelectMyTab(e) {
            var tabStrip = $find('<%= RadTabStrip1.ClientID%>');
            if (!tabStrip) return;
            //Find the element which the mouse is over
            var destElement = e.relatedTarget || e.toElement;
            if ($telerik.isDescendant(tabStrip.get_element(), destElement))
                return;
            var initialTab = tabStrip.findTabByText(tabStrip.get_attributes().getAttribute("InitialTab"));
            initialTab.unselect();
            initialTab.selectParents();
        }
    </script>
    </telerik:RadCodeBlock>
    <div>
        <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadTabStrip1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadTabStrip ID="RadTabStrip1" runat="server" UnSelectChildren="True"
                                OnClientMouseOver="SelectMyTab"
                                OnClientMouseOut="UnSelectMyTab(event)"
                                ClickSelectedTab="True"
                                SelectedIndex="0"
                                AutoPostBack="True" >
            <Tabs>
                <telerik:RadTab runat="server" Text="Root RadTab1" Selected="true">
                    <Tabs>
                        <telerik:RadTab runat="server" Text="Child RadTab 1">
                        </telerik:RadTab>
                        <telerik:RadTab runat="server" Text="Child RadTab 2">
                        </telerik:RadTab>
                    </Tabs>
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Root RadTab2">
                    <Tabs>
                        <telerik:RadTab runat="server" Text="test">
                        </telerik:RadTab>
                        <telerik:RadTab runat="server" Text="test2">
                        </telerik:RadTab>
                    </Tabs>
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Root RadTab3">
                </telerik:RadTab>
            </Tabs>
        </telerik:RadTabStrip>
    </div>
    </form>
</body>



c# code:

protected void Page_Load(object sender, EventArgs e)
    {
        RadTabStrip1.Attributes["InitialTab"] = RadTabStrip1.InnermostSelectedTab.Text;
    }


Not sure what I'm missing but I get a javascript error that says "Object doesn't support this property or method".

- Kirk
Kirk Thomas
Top achievements
Rank 1
 answered on 06 Aug 2010
1 answer
121 views
Hi Telerik Team,

Can any one help me how to bind data for the Silver light Chart in asp.net.
is there any way to directly bind data to the silverlight chart without the Entity Framework databind method.
how do i bind my sql datatable to Chart?
Do i have have to learn silverlight for changing the datasource of the file ChartIntegrationApplication.xap

Plzz help aspd..

Thanks
K²

Vladimir Milev
Telerik team
 answered on 06 Aug 2010
1 answer
134 views
This may or may not be your problem as it only occurs using IE8, not IE7 or Firefox.  On the other hand, it only seems to happen with the RadComboBox, so I thought I'd bring it to your attention just in case.

I'm using ASP.NET 3.5 and when I select an item in a combobox, it changes the contents of a related combobox and label field.  I'm using the RadAjaxManager in it's simplest for for this.  The problem is that in IE8, it scrolls to the top of the page, and you have to scroll down to the control again as the page is longer than the screen. (The MaintainPositionOnScrollBack page directive has no effect)  To get around this, I have put in an ugly javascript hack to set the scroll position when the combobox is opened, and then update the scroll position in the ClientEvents property of the AjaxManager to the previous position.  This works, but causes a brief flicker.  I was wondering if you had a more elegant solution.

<script type="text/javascript">
      // Ugly hack
    var nonIEScrollPosition = 0;
    var IEScrollPosition = 0;
    function setScrollPosition(sender, args)
    {
        nonIEScrollPosition = document.body.scrollTop;
        IEScrollPosition = document.documentElement.scrollTop;
    }
    function updateScrollPosition(sender, args)
    {
        document.body.scrollTop = nonIEScrollPosition;
        document.documentElement.scrollTop = IEScrollPosition;
    }
</script>
<telerik:RadAjaxManager ID="ajaxManager" runat="server">
    <ClientEvents OnRequestStart="updateScrollPosition"></ClientEvents>
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="ddlTMS">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="ddlBuNo" LoadingPanelID="radLoadingPanel" />
                <telerik:AjaxUpdatedControl ControlID="lblCostCenter" LoadingPanelID="radLoadingPanel" />
            </UpdatedControls>

The control is defined as so:

<telerik:RadComboBox ID="ddlTMS" Skin="Simple" DataTextField="TypeModelSeriesID" DataValueField="TypeModelSeriesID"
    OnClientDropDownOpening="setScrollPosition" AutoPostBack="true" runat="server"></telerik:RadComboBox>
<asp:CustomValidator ID="cvTMS" Display="Dynamic" ControlToValidate="ddlTMS" ValidationGroup="Save" EnableClientScript="false"
    OnServerValidate="CheckTMS" runat="server"></asp:CustomValidator>
Simon
Telerik team
 answered on 06 Aug 2010
1 answer
84 views
Hi,

I've a grid setup like this:

         <ClientSettings>
                <Selecting AllowRowSelect="True"  />
                <ClientEvents OnRowDblClick="RowDblClick" OnRowClick="RowClick" />
            </ClientSettings>


                <Columns>
                    <telerik:GridClientSelectColumn>
                    </telerik:GridClientSelectColumn>
                </Columns>
                <ItemTemplate>
                    <Table......
                </ItemTemplate>

My problem is the "RowClick" & "RowDBClick" events didn't fire if I click the  row content, I need to click the First Column (select checkbox) in order to fire the events.Any advise?

Thanks.

Pavlina
Telerik team
 answered on 06 Aug 2010
1 answer
218 views

I have an issue where the combobox renders without a bottom border (see attached image) and the right down arrow doesn't work (it doesn't cause anything to happen when clicked).  Here's the .aspx:

 

 

<div runat="server" id="pnlAdvancedSearch">

 

 

 

<table width="100%" cellspacing="1" cellpadding="1" border="0">

 

 

 

<tr>

 

 

 

<td valign="middle" style="width: 110px;">

 

 

 

<asp:Label runat="server" ID="lblProject" Text="Project:" />

 

 

 

</td>

 

 

 

<td valign="middle" style="width: 250px;">

 

 

 

<telerik:RadComboBox runat="server" ID="ddProject" NoWrap="True" EmptyMessage="Please enter value"

 

 

 

ShowDropDownOnTextboxClick="true" EnableLoadOnDemand="true" ShowMoreResultsBox="true"

 

 

 

RegisterWithScriptManager="true" AppendDataBoundItems="False" EnableVirtualScrolling="true"

 

 

 

Height="200px" Width="100%" OnItemsRequested="ddProject_ItemsRequested" />

 

 

 

</td>
...

Any suggestions?

 

Simon
Telerik team
 answered on 06 Aug 2010
5 answers
183 views
Does anyone know if it's possible to have the width of the items inside the combobox to extend beyond the combobox itself?  I have a series of string values that are pretty long.  I'd like to use a combo in a limited space but when expanded, be able to show the full string descriptions.

Thanks!

Yana
Telerik team
 answered on 06 Aug 2010
1 answer
391 views
Hi

I have a RadGrid which works fine.
I have now put a textbox and button above the RadGrid and when the button is clicked then a row should be added to the RadGrid.
But it doesn't do it without a postback.

I try to put the RadGrid into an UpdatePanel like this ...
(all I did was add the UpdatePanel control)

<

 

asp:UpdatePanel ID="upInterimComments" runat="server">

 

 

 

<radG:RadGrid

 

......

</

 

radG:RadGrid>

 

 

 

</asp:UpdatePanel>

 


But I get a load of errors ...
Error 1 Type 'System.Web.UI.UpdatePanel' does not have a public property named 'RadGrid'. 
Error 2 Type 'System.Web.UI.UpdatePanel' does not have a public property named 'GroupPanel'. 
etc

Any ideas?

Thanks
Paul
Princy
Top achievements
Rank 2
 answered on 06 Aug 2010
2 answers
127 views
Hello,

I wonder if it is possible to get marked today date in rad grid filtering row on GridDateTimeColumn as it is in Calendar control.

For further information please check pictures in the attachment.

Best regards...

Vasssek
Vasssek
Top achievements
Rank 1
 answered on 06 Aug 2010
1 answer
146 views
Greetings,
I am implementing a grid using the manual crud example shown in your demo at: http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/programaticlinqupdates/defaultcs.aspx.  However, for my scenario I have an entity reference key for one of my columns for which I populate a GridDropDownColumn using a DomainDataSource object as shown in the code block below:

        <telerik:RadGrid ID="RadGrid1" runat="server" 
                        OnNeedDataSource="RadGrid1_NeedDataSource" 
                        OnColumnCreated="RadGrid1_ColumnCreated"
                        OnItemCreated="RadGrid1_ItemCreated" 
                        OnItemDataBound="RadGrid1_ItemDataBound"
                        OnInsertCommand="RadGrid1_InsertCommand"
                        OnUpdateCommand="RadGrid1_UpdateCommand"
                        OnDeleteCommand="RadGrid1_DeleteCommand" 
                        AllowFilteringByColumn="True" 
                        GridLines="None"    >
<HeaderContextMenu EnableAutoScroll="True"></HeaderContextMenu>
  
                <MasterTableView HierarchyDefaultExpanded="false" 
                                        HierarchyLoadMode="ServerBind"
                                        AllowSorting="true" 
                                        AutoGenerateColumns="false" 
                                        CommandItemDisplay="Top" InsertItemPageIndexAction="ShowItemOnCurrentPage"
                                        DataKeyNames="SICItemID" >
                 <Columns>  
                        <telerik:GridEditCommandColumn ButtonType="ImageButton" />
                        <telerik:GridBoundColumn DataField="SICItemID" HeaderText="ID" UniqueName="SICItemID"  SortExpression="SICItemID" Visible="false" ReadOnly="true" Display="false" />  
                        <telerik:GridBoundColumn  DataField="ItemName" HeaderText="Question" UniqueName="ItemName" ItemStyle-Wrap="true"  ItemStyle-Width="300"  SortExpression="ItemName" MaxLength="2000" ReadOnly="false" Display="true"   />    
                                             <telerik:GridDropDownColumn FooterText="SIC Code" UniqueName="ddlSICCodes" ReadOnly="false"
                        ListTextField="SICCode1" ListValueField="SICID" DataSourceID="ddsGetSICCodes"
                        HeaderText="SIC Code" DataField="SICCode.SICID" AllowSorting="true" DefaultInsertValue="">
                    </telerik:GridDropDownColumn>
</Columns>  
  
<EditFormSettings>
<EditColumn UniqueName="EditCommandColumn1"></EditColumn>
</EditFormSettings>
            </MasterTableView>
            <ClientSettings AllowExpandCollapse="true" EnableRowHoverStyle="true" />
        </telerik:RadGrid>
         <cc1:DomainDataSource runat="server" ID="ddsGetSICCodes" 
        DomainServiceTypeName="ID.DomainServices.ListTypesDomainService" 
        SelectMethod="GetSicCodes" EnableUpdate="true" EnableInsert="false" EnableDelete="false" >
            <SelectParameters>
                <asp:SessionParameter Name="Scope" SessionField="MyScope" DefaultValue="" ConvertEmptyStringToNull="true" DbType="Guid" />
            </SelectParameters>
        </cc1:DomainDataSource>

The problem that I am having is that my reference entity for the dropdown list is not been updated when I select a new value during the Update.  During Insert the reference is set correctly to the selected value using the ExtractValues method of the GridEditableItem. Please advise of changes I could make to ensure my reference is updated when using the UpdateValues of the GridEditableItem method as shown below.  I have already included the entity reference (SicCode) when I get the object for update.  I do not understand how the UpdateValues work behind the scense and would appreciate any insight you can share regarding the handling of foreign key columns.
protected void RadGrid1_UpdateCommand(object source, GridCommandEventArgs e)
      {
          GridEditableItem editedItem = e.Item as GridEditableItem;
          try
          {
              ListTypesDomainService lds = new ListTypesDomainService();
              Guid sicItemID = new Guid(editedItem.GetDataKeyValue("SICItemID").ToString());
              var updateSicItem = lds.GetSicItem(sicItemID);
              if (updateSicItem != null)
              {
                  editedItem.UpdateValues(updateSicItem);
                  lds.SaveChanges();
              }
          }
          catch (Exception ex)
          {
              ProcessException(RadGrid1, ex);
              e.Canceled = true;
          }
      }

Thanks!
Martin
Telerik team
 answered on 06 Aug 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?