Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
130 views
Hi.

As stated in the title, the position keeps resetting to the 1st element in the combobox as soon as new data is added to the combobox.  Below is the itemrequested code I use.

Protected Sub cboInstrument_ItemsRequested(ByVal sender As Object, ByVal e As RadComboBoxItemsRequestedEventArgs)
    Try
        Dim oSender As Telerik.Web.UI.RadComboBox = DirectCast(sender, Telerik.Web.UI.RadComboBox)
        oSender.DataValueField = "Name"
        oSender.DataTextField = "Name"
        Dim data As List(Of Instrument)
        If Not String.IsNullOrWhiteSpace(ExchangeComboBox.SelectedValue) Then
            data = GetData(ExchangeComboBox.SelectedValue, e.Text, False)
            Dim itemOffset As Integer = e.NumberOfItems
            Dim endOffset As Integer = Math.Min(itemOffset + ItemsPerRequest, data.Count)
            'e.EndOfItems = endOffset = IIf(data.Count = 1, 0, data.Count)
            e.EndOfItems = endOffset = data.Count
            For i As Integer = itemOffset To endOffset - 1
                oSender.Items.Add(New RadComboBoxItem(String.Format("{0} - {1}", data(i).Symbol, data(i).Name), data(i).ExchangeSymbolKey))
            Next
            e.Message = GetStatusMessage(endOffset, data.Count)
        Else
            Dim endOffset As Integer = 0
            oSender.Items.Add(New RadComboBoxItem("Select an Exchange", Nothing))
            e.Message = GetStatusMessage(endOffset, 0)
        End If
    Catch exc As Exception
        ProcessModuleLoadException(Me, exc)
    End Try
End Sub

Any help will be greatly appreciated.

Regards
Leon
Top achievements
Rank 1
 answered on 18 Jul 2014
5 answers
800 views
I've had a tough time trying to figure out how to access my grid on client side. I've tried everything I could find, and nothing seems to work. I FINALLY got my grid object ($find didn't work for me), but now get_masterTableView() isn't doing anything. If I step through the javascript, it steps into the line and just disappears into some WebResource.axd abyss and never returns. I don't get any javascript errors.

If I try to run the function in the console, it says "undefined is not a function".

Here's my code

<script type="text/javascript">
    function GridCreated(grid) {
        var mtv = grid.get_masterTableView();
        var pageIndex = mtv.get_currentPageIndex();
        alert(pageIndex);
    }
</script>
<radG:RadGrid ID="rgResults" runat="server" AllowMultiRowSelection="True" AllowPaging="True"
            AllowSorting="True" EnableAJAX="False" GridLines="None" OnItemCommand="rgResults_ItemCommand" OnItemDataBound="rgResults_ItemDataBound"
            PageSize="20"
            Skin="Default" Width="100%" OnPageIndexChanged="rgResults_PageIndexChanged" OnSortCommand="rgResults_SortCommand" OnInit="rgResults_Init" OnPreRender="rgResults_PreRender">
            <ClientSettings ApplyStylesOnClient="True">
                <ClientEvents OnGridCreated="GridCreated(this);" />
            </ClientSettings>
            <ItemStyle CssClass="griditemtext" />
            <HeaderStyle CssClass="gridheadertext" />
            <FooterStyle CssClass="gridfootertext" />
            <AlternatingItemStyle CssClass="gridalternetitemtext" />
            <PagerStyle CssClass="gridpagertext" Mode="NumericPages" />
            <CommandItemStyle CssClass="gridcommandtext" />
            <SelectedItemStyle CssClass="gridselecteditemtext" />
            <MasterTableView AutoGenerateColumns="False"
                DataKeyNames="Article Number" Font-Bold="False" Font-Italic="False" CommandItemDisplay="None" Font-Overline="False"
                Font-Strikeout="False" Font-Underline="False" GridLines="Both">
                <ExpandCollapseColumn Visible="False">
                    <HeaderStyle Width="19px" />
                </ExpandCollapseColumn>
                <RowIndicatorColumn Visible="False">
                    <HeaderStyle Width="20px" />
                </RowIndicatorColumn>
                <PagerStyle Mode="NumericPages" />
                <Columns/>
            </MasterTableView>
        </radG:RadGrid>
Konstantin Dikov
Telerik team
 answered on 18 Jul 2014
2 answers
204 views
Hey,

Is there any possibility, code or workaround to implement multiple parents for an org chart?

Ty 

luk
Slav
Telerik team
 answered on 18 Jul 2014
1 answer
54 views
Is there any way that I can bind a url to chart series item so that when I click it will redirect to my details page? It will be good if it can be done at client side.
Danail Vasilev
Telerik team
 answered on 18 Jul 2014
1 answer
110 views
Hi 

I have a RadTreeList within a RadAjaxPanel which was working well until I decided to make the tree scrollable.  Now I find that when I view the tree in IE everything seems OK but when viewed in Google Chrome the header for the tree list is offset by about 50% of the width of the tree which obviously looks odd as now all of the column headers are not above the columns they refer to.  My tree is defined using :-

<telerik:RadTreeList ID="componentTree" runat="server"
AutoGenerateColumns="False" 
AllowSorting="True"
BeforeClientContextMenu="ShowContextMenu"
DataKeyNames="ID" ParentDataKeyNames="ParentID" 
Width="99%" Height="700px" 
onitemdatabound="componentTree_ItemDataBound" >

<Columns>
<telerik:TreeListBoundColumn DataField="ID" UniqueName="ID" Display="false" />
<telerik:TreeListBoundColumn DataField="ParentID" UniqueName="ParentID" Display="False" />
<telerik:TreeListImageColumn UniqueName="ImagesColumn" HeaderText="" DataImageUrlFields="ComponentTypeString" DataImageUrlFormatString="Images/{0}_16.png" ItemStyle-HorizontalAlign="Center" AlternateText="icon" ItemStyle-Width="20px" HeaderStyle-Width="20px" ><HeaderStyle HorizontalAlign="Center" Width="30px" />
<ItemStyle HorizontalAlign="Center" Width="20px" />
</telerik:TreeListImageColumn>
<telerik:TreeListBoundColumn DataField="PartNumber" UniqueName="PartNumber" HeaderText="Part Number" ><HeaderStyle Width="120px" /></telerik:TreeListBoundColumn>
<telerik:TreeListBoundColumn DataField="Description" UniqueName="Description" HeaderText="Description" ><HeaderStyle Width="200px" /></telerik:TreeListBoundColumn>
<telerik:TreeListBoundColumn DataField="LifeCode" UniqueName="LifeCode"  HeaderText="Life Code"><HeaderStyle Width="100px" /></telerik:TreeListBoundColumn>
<telerik:TreeListBoundColumn DataField="LifeNew" UniqueName="LifeNew" HeaderText="Life New (Race)"><HeaderStyle Width="120px" /></telerik:TreeListBoundColumn>
<telerik:TreeListBoundColumn DataField="LifeLeft" UniqueName="LifeLeft" HeaderText="Life Left (Race)"><HeaderStyle Width="120px" /></telerik:TreeListBoundColumn>
<telerik:TreeListBoundColumn DataField="DistanceRun" UniqueName="DistanceRun" HeaderText="Distance Run"><HeaderStyle Width="120px" /></telerik:TreeListBoundColumn>
<telerik:TreeListBoundColumn DataField="CurrentLocationName" UniqueName="CurrentLocationName" HeaderText="Current Location"><HeaderStyle Width="120px" /></telerik:TreeListBoundColumn>
<telerik:TreeListBoundColumn DataField="LastNoteText" UniqueName="LastNoteText" HeaderText="Last Note" />
</Columns>

<SortExpressions>
<telerik:TreeListSortExpression FieldName="PartNumber" SortOrder="Ascending" />
</SortExpressions>

<ClientSettings>
<Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" ScrollHeight="650px"></Scrolling>
<ClientEvents OnItemContextMenu="onItemContextMenu" />
<Selecting AllowItemSelection="True" />
<Resizing AllowColumnResize="true" EnableRealTimeResize="true" />
</ClientSettings>

<ExportSettings FileName="lifecheck" IgnorePaging="True" OpenInNewWindow="True" ExportMode="ReplaceControls">
<Excel>
<AlternatingItemStyle BackColor="WhiteSmoke" ForeColor="Black" />
<HeaderStyle Font-Size="X-Large" ForeColor="White" BackColor="Gray" Font-Bold="True" HorizontalAlign="Center" />
<ExpandCollapseCellStyle ExpandText="(+)" CollapseText="(-)" />
   </Excel>
</ExportSettings>
</telerik:RadTreeList>
Konstantin Dikov
Telerik team
 answered on 18 Jul 2014
1 answer
209 views
So i followed the steps on the following page in making a skin for a RadPanelBar, but on debug (see attached image) WebResource.axd is overriding the RadPanelBar stylesheet that i've created.  Please advice.

<telerik:RadPanelBar runat="server" ID="RadPanelBar1" EnableEmbeddedSkins="false" Skin="YPPanel">
PanelBar.ypmnet.css
.RadPanelBar_YPMnet .rpGroup .rpLink:hover{ background: #bddeff;}
 
.RadPanelBar_YPMnet .rpRootGroup .rpText
{
    font: normal 12px Arial, Verdana, Sans-serif;
    color: #ffffff !important;
    padding: 5px 7px 5px 3px;
}
 
.RadPanelBar_YPMnet .rpSelected .rpText
{
    font-weight: bold;
    font-size: larger;
}
 
.RadPanelBar_YPMnet .rpGroup .rpSelected .rpText
{
    font-weight: bold;
    font-size: medium;
}
 
.RadPanelBar_YPMnet .rpRootGroup .rpDisabled:hover
{
    cursor: default;
    text-decoration:none;
 }
  
 .RadPanelBar_YPMnet .rpGroup .rpDisabled:hover
 {
    cursor: default; text-decoration:none;
 }


Magdalena
Telerik team
 answered on 18 Jul 2014
1 answer
167 views
hey everyone
i have a rad menu and rad menu bind with xml you can see that and consist of master page. i want to get text rad menu click but problem is that rad OnItemClick event does not fire and  event is consist of masterpage.cs

    <telerik:RadMenu ID="RadMenu1" runat="server" Flow="Horizontal" DataSourceID="xmlDataSource"
            Font-Size="24px" Font-Names="Segoe UI" ForeColor="#333399" Font-Bold="False"
            BorderWidth="0px" Border-radius="5px" StaticSubMenuIndent="10px" StaticDisplayLevels="1"
            Orientation="Horizontal" DynamicHorizontalOffset="0" Width="100%" Style="text-align: left;
            margin-top: -3px;" OnItemClick="RadMenu1_ItemClick">
            <DataBindings>
                <telerik:RadMenuItemBinding runat="server" TextField="Text" DataMember="MenuItem"
                    NavigateUrlField="NavigateUrl" ToolTipField="ToolTip" />
            </DataBindings>
        </telerik:RadMenu>
        <asp:XmlDataSource ID="xmlDataSource" TransformFile="~/scripts/TransformXSLT.xsl"
        runat="server" EnableCaching="false" /> 

this is code behind

   protected void RadMenu1_ItemClick(object sender, Telerik.Web.UI.RadMenuEventArgs e)
    { 
        string aa = e.Item.Text;
    }

please help what should i do to solve this problem..


Thanks In Advance  









Hristo Valyavicharski
Telerik team
 answered on 18 Jul 2014
1 answer
225 views
I need to implement a radgrid as follows:
1)The grid is hidden initially. Only the Filter Template is visible.
2) The Filter Template will have labels and text box and a button. (Only 2 column names)
3)On click of button the grid is displayed accordingly.

Can you please help me with this.

Princy
Top achievements
Rank 2
 answered on 18 Jul 2014
2 answers
155 views
I am using SkinManager and RadDecorator to apply skin to pages. This is working fine as long as the content fits the window size. If the content goes beyond the window size and the user needs to scroll down the page any skin with a background colour there is an issue. The background colour ends and as you scroll the remainder of the page the background is white. How do I extend the background to the height of the content?
Jon
Top achievements
Rank 1
 answered on 18 Jul 2014
11 answers
392 views
I have a web site and one page with some panels that be updated throught radajaxmanager and the image is showing radajaxloadingpanel.
Every things works ok, but randomly the radajaxloadingpanel is not hidding after postback, no return any error jscript, on the server every things is ok.
The only way to continue is refreshing IE with F5.
I don't know how detect the error or how reproduce or what can i do to fixed
Konstantin Dikov
Telerik team
 answered on 18 Jul 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?