Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
110 views
HI,

I am having an issue with the pager and radlistview.

below is my code, the problem is the First Page - Previous Page - Next Page - Last Page and Page Size controls dont work, however the direct page number buttons do.

I have striped out the Ajax component and the problem still exists.

Thanks,

Xavier.

<telerik:RadListView ID="rlvStaffNotes" ViewStateMode="Enabled" AllowPaging="True" runat="server" CssClass="ui-staffnote-container" ItemPlaceholderID="staffNotesPlaceHolder"
                            OnNeedDataSource="rlvStaffNotes_NeedDataSource">
                                <LayoutTemplate>
                                    <fieldset>
                                        <asp:Panel ID="staffNotesPlaceHolder" runat="server" />
                                        <telerik:RadDataPager ID="rpgrStaffNotes" runat="server" AllowSorting="true" PagedControlID="rlvStaffNotes" PageSize="5" ViewStateMode="Enabled">
                                            <Fields>
                                                <telerik:RadDataPagerButtonField FieldType="FirstPrev" />
                                                <telerik:RadDataPagerButtonField FieldType="Numeric" />
                                                <telerik:RadDataPagerButtonField FieldType="NextLast" />
                                                <telerik:RadDataPagerPageSizeField PageSizeText="Page size: " />
                                                <telerik:RadDataPagerTemplatePageField>
                                                    <PagerTemplate>
                                                        <div style="float: right">
                                                            <b>
                                                                Items
                                                                <asp:Label runat="server" ID="CurrentPageLabel" Text="<%# Container.Owner.StartRowIndex+1%>" />
                                                                to
                                                                <asp:Label runat="server" ID="TotalPagesLabel" Text="<%# Container.Owner.TotalRowCount > (Container.Owner.StartRowIndex+Container.Owner.PageSize) ? Container.Owner.StartRowIndex+Container.Owner.PageSize : Container.Owner.TotalRowCount %>" />
                                                                of
                                                                <asp:Label runat="server" ID="TotalItemsLabel" Text="<%# Container.Owner.TotalRowCount%>" />
                                                                <br />
                                                            </b>
                                                        </div>
                                                    </PagerTemplate>
                                                </telerik:RadDataPagerTemplatePageField>
                                            </Fields>
                                        </telerik:RadDataPager>
                                    </fieldset>
                                </LayoutTemplate>
                                <ItemTemplate>
                                    <div class="ui-staffnote-item">
                                        <div style="clear:both; position:relative;">
                                            <span class="ui-staffnote-created">
                                                <asp:Label runat="server" ID="created" Text='<%# DataBinder.Eval(Container.DataItem, "Created") %>' />
                                            </span>
                                            <span class="ui-staffnote-type">
                                                <asp:Label runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Type")%>' />
                                            </span>
                                            <span class="ui-staffnote-createdby">
                                                <asp:Label runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "CreatedBy")%>' />
                                            </span>
                                        </div>
                                        <div style="clear:both; position:relative;">
                                            <span class="ui-staffnote-title">
                                                <asp:Label runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Title").ToString().Trim()%>' />
                                            </span
                                            <span class="ui-staffnote-notation">
                                                <asp:Label runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Notation").ToString().Trim()%>' />
                                            </span>
                                        </div>
                                        <div style="clear:both; position:relative;"> </div>
                                    </div>
                                </ItemTemplate>
                            </telerik:RadListView>
Tsvetina
Telerik team
 answered on 14 May 2012
1 answer
155 views
I am attempting to show a radWindow based on a combobox selection, and nothing is happening.

I have a radWindowManager on the page:

<telerik:RadWindowManager ID="RadWindowManager1" runat="server"
        EnableViewState="False">
    </telerik:RadWindowManager>

and the code behind is simply:

Protected Sub list_State_SelectedIndexChanged(sender As Object, e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles list_State.SelectedIndexChanged
 
        If list_State.SelectedValue = "NV" Then
            Dim url As String = String.Format("nevada-alert.aspx")
            Dim NewWindow As RadWindow = New RadWindow()
            NewWindow.ID = "win_ServiceState"
            NewWindow.Title = "Nevada is currently offline."
            NewWindow.Height = 330
            NewWindow.Width = 420
            NewWindow.ReloadOnShow = True
            NewWindow.Modal = True
            NewWindow.ShowContentDuringLoad = False
            NewWindow.KeepInScreenBounds = True
            NewWindow.VisibleOnPageLoad = True
            NewWindow.NavigateUrl = url
            RadWindowManager1.Windows.Add(NewWindow)
        End If
 
    End Sub

Shouldn't that be sufficient in launching the window?
Marin Bratanov
Telerik team
 answered on 14 May 2012
2 answers
207 views
I am not sure why this does not work ...
I get an error on the args.getvalue() of Object doesn't support property or method 'get_value'


<telerik:GridBoundColumn DataField="Name" FilterControlAltText="Filter Name column"
    FooterText="<h6>Count: " Aggregate="Count" AutoPostBackOnFilter="true" CurrentFilterFunction="StartsWith"
    ShowFilterIcon="False" HeaderText="Name" SortExpression="Name" UniqueName="Name"
    FooterStyle-HorizontalAlign="Left" AllowSorting="true" AllowFiltering="true"
    ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="false">
    <FilterTemplate>
        <telerik:RadTextBox ID="RadName" runat="server" Width="100px" ClientEvents-OnValueChanged="NameChanged">
        </telerik:RadTextBox>
        <telerik:RadScriptBlock ID="RadScriptBlock2" runat="server">
            <script type="text/javascript">
                function NameChanged(sender, args) {
                    var txtbox = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                    txtbox.filter("Name", args.get_value(), "StartsWith");
                }
            </script>
        </telerik:RadScriptBlock>
    </FilterTemplate>
</telerik:GridBoundColumn>
Ken
Top achievements
Rank 1
 answered on 14 May 2012
1 answer
149 views
For some reason the drag and drop functionality does not seem to work in the timeline view. I can delete the appointment but AppointmentUpdate event does not fire. What could be wrong? Thanks
Peter
Telerik team
 answered on 14 May 2012
1 answer
57 views

I am stuck in a problem with a Radwindow pop-up and need your help.

On Rad Window, when I click on a button, a new pop -up opens and hides behind the previous Radwindow.  In this
 case the javascript code written below

 

 returns incorrect parent.:

 

 

 

var parentPane = parent.getContentPane();

 

 

 

var parentForm = parentPane.getExtContentElement().contentWindow.document;

 

 

 

var TextBox = parentForm.getElementById(TextBoxID);

 

 

Ideally, the parent should be the Rad window from which the new  pop-up was opened but here it is showing "Home.aspx" as its
 parent. I tried window.opener() and other probable workarounds but none of them worked.

Marin Bratanov
Telerik team
 answered on 14 May 2012
1 answer
87 views
I have no idea why this would be, but it seems rather routine.

I have a combobox that displays all of the US States, and it populates fine.

<telerik:RadComboBox ID="StateList" Runat="server"
               Skin="Windows7" Width="150px"
                   ViewStateMode="Enabled"
               EmptyMessage="State/Region" ExpandAnimation-Type="InOutQuad"
                                   BorderStyle="None" AppendDataBoundItems="True"
                                   DataSourceID="sqlStates" DataTextField="StateName"
                                   DataValueField="StateAbbr" CausesValidation="False">
               <Items>
               <telerik:RadComboBoxItem runat="server" Text="" Selected="true"
                       Value="" />
               </Items>
                       <ExpandAnimation Type="InOutQuad" />
           </telerik:RadComboBox>

However, when I try to get the value from the btn_click event, it is empty.... why???

Protected Sub btn_submit_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles btn_submit.Click
 
Dim State as String = StateList.SelectedValue
'shows empty every time
'if I plug in a standard ASP.net DropDownList and tie it to the same SQL data source, it works fine.
 
End Sub

Shinu
Top achievements
Rank 2
 answered on 14 May 2012
2 answers
81 views
I replaced a group of TextBoxes with RadTextBoxes
when testing on IE9 I noticed that the bottom of the data is cropped
none of the other browsers do this
any suggestions on how to "fix"
Tsvetina
Telerik team
 answered on 14 May 2012
4 answers
137 views
Hi, for my application i have to create a RadGrid. In this RadGrid there's a list of item and when i click on one of them it opens and we can find inside a GridTableView which have inside of it some text in the first column and in the second column a RadChart. As far as I get, I can display everything but i had to save the RadChart as an image and then put it inside the Grid. But now I have some new things that I have to do and that doesn't work anymore. This way i cant use any mapping from my CodeBehind since it's a simple image. To achieve this i've followed this example http://demos.telerik.com/aspnet-ajax/grid/examples/programming/detailtabledatabind/defaultcs.aspx. I'm creating my RadChart inside the DetailTableDataBind event and add it to the grid. But if i want to keep the mapping I have to insert the RadChart and not the image of it. If I do that it displays only that: Telerik.Web.UI.RadChart.

Can you help me find the problem please.
Princy
Top achievements
Rank 2
 answered on 14 May 2012
1 answer
82 views
Hi,

   My input on RadEditor Control: ram ram ravan

   after some manipulation, i have modified the above text as "ram ram <FONT class=masked>ra</FONT>van".

   My requirement is the last word "van", if the user select "a" on van text, i want the index of a in the above text. Please help me how to get the index.

I have used the below code to get the selected text range of pure text but not with html tags, how to get range and index with html tags.

    var Range = editor.getSelection().getRange();
        var index= - Range.move("character", -1000000);
Rumen
Telerik team
 answered on 14 May 2012
5 answers
219 views
I have a RadGrid that was working fine.  I then turned it into a user control and inserted into my page and it worked fine.  I then dynamically loaded the same user contorl and it loads fine, but if you try to sort or page through data the RadGrid disappears.  The paging and sorting worked fine until I dynamically loaded the control.
Radoslav
Telerik team
 answered on 14 May 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?