I changed something from demo example to my project and i use datasource in codebehind. DataPager still works fine if i put RadListView datasource in PageLoad but DataPager doesn't work when i put RadListView datasource in event click of Button. Can you help me, please?
- aspx:
<telerik:RadButton ID="RadButton1" runat="server" Text="RadButton" OnClick="Button1_Click"></telerik:RadButton>
<br />
<div>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="ListViewPanel1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="ListViewPanel1" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" MinDisplayTime="0">
</telerik:RadAjaxLoadingPanel>
<asp:Panel ID="ListViewPanel1" runat="server">
<telerik:RadListView ID="RadListView1" Width="97%" AllowPaging="True" runat="server"
allowsorting="true" ItemPlaceholderID="ProductsHolder">
<LayoutTemplate>
<asp:Panel ID="ProductsHolder" runat="server">
</asp:Panel>
<table>
<tr>
<td>
<telerik:RadDataPager RenderMode="Lightweight" ID="RadDataPager1" runat="server" PagedControlID="RadListView1"
PageSize="6">
<Fields>
<telerik:RadDataPagerButtonField FieldType="FirstPrev"></telerik:RadDataPagerButtonField>
<telerik:RadDataPagerButtonField FieldType="Numeric"></telerik:RadDataPagerButtonField>
<telerik:RadDataPagerButtonField FieldType="NextLast"></telerik:RadDataPagerButtonField>
<telerik:RadDataPagerPageSizeField PageSizeText="Page size: "></telerik:RadDataPagerPageSizeField>
<telerik:RadDataPagerGoToPageField CurrentPageText="Page: " TotalPageText="of" SubmitButtonText="Go"
TextBoxWidth="30"></telerik:RadDataPagerGoToPageField>
<telerik:RadDataPagerTemplatePageField>
<PagerTemplate>
<div style="float: right; line-height: 34px; margin-left: 10px;">
Items
<asp:Label runat="server" ID="CurrentPageLabel" Text="<%# Container.Owner.StartRowIndex+1%>"></asp:Label>
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 %>"></asp:Label>
of
<asp:Label runat="server" ID="TotalItemsLabel" Text="<%# Container.Owner.TotalRowCount%>"></asp:Label>
<br />
</div>
</PagerTemplate>
</telerik:RadDataPagerTemplatePageField>
</Fields>
</telerik:RadDataPager>
</td>
</tr>
</table>
</LayoutTemplate>
<ItemTemplate>
<table>
<tr>
<td style="width: 140px; text-align: left; height: 120px">
<asp:Image ID="Img1" runat="server"
ImageUrl='<%# Eval("_Image") %>' Height="100" Width="130" />
</td>
<td style="vertical-align: top; text-align: left">
<asp:LinkButton runat="server" ID="Title" Font-Bold="true" CommandName="Select"
Text='<%# Eval("_Title") %>'></asp:LinkButton>
<asp:Label runat="server" ID="lblink" Font-Size="Small"
Text='<%# Eval("_Link") %>' Visible="false" />
</td>
</tr>
</table>
</ItemTemplate>
</telerik:RadListView>
</asp:Panel>
<asp:SqlDataSource ID="SqlDS" runat="server" ConnectionString="<%$ appSettings:sqlconn %>"
ProviderName="System.Data.SqlClient" ></asp:SqlDataSource>
- aspx.cs work fine (don't use Button):
protected void Page_Load(object sender, EventArgs e)
{
_News.NewsList("20", "", "08/20/2016", "08/30/2016", "0", "0", 0);
RadListView1.DataSource = _News._znews;
RadListView1.DataBind();
}
- aspx.cs DataPager doesn't work:
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
_News.NewsList("20", "", "08/20/2016", "08/30/2016", "0", "0", 0);
RadListView1.DataSource = _News._znews;
RadListView1.DataBind();
}
Thanks.
Hi,
I've not got the data in my embedded tree via an ajax call and the tree is fully populated and expanded. I have made it so that if teh drop down is a checkbox enabled on that the relevant nodes are ticked and if it isn't checkbox enabled that the relevant node is selected.
I now have a further 2 issues
1) I need to be able to make the unopened box show the checked/selected nodes. On the server side there is a sync method but there seems to be nothing of the sort on the client side. I have mucked around with beginUpdate and repaint etc but nothing seems to trigger a sync of the selection from the embedded tree back to the dropdown control.
2) I have the drop down set to autowidth but it doesn't work, it sticks on the width of the opening control box and as such I end up with both horizontal and vertical scrollbars. This might be related to the issue in 1 if the box hasn't worked out that things are different.
Any suggestions?
By the way this is another area where there is significant improvement needed in the documentation.
Regards
Jon
Hi,
I would like to add a piece of text to command item .How can i do it
Next issue - this one is very fustrating
My page works with some cascading combos and I have it all setup. It works fine on the first load. Then if I change one of the parent values the requestingitems event is raised and I alter the parameters as before of teh client data source but this time nothing happens. There is no http request (I see them on the initial call via fiddler)
This is my code that adds the custom parameters on the fly onto the datasource.
$find(dataSourceId).get_dataSourceObject().options.transport.read.url = $find(dataSourceId).get_dataSourceObject().options.transport.baseUrl + dataSourceUrl;
Any suggestions?
Regards
Jon
Hi,
I'm not having much luck with things recently. Everything I seem to be wanting to do comes out as a battle with work arounds galore. Anyway the latest issue that hopefully someone can advise me on is that my combos are driven by a RadClientDataSource and I am having issues getting the value of checked items on the server.
OK so I get that the items that were checked won't be available on a post back however surely it would be sensible that the combo retains the checked item ids or the selected item id on post back? Actually it does if you are not using checkboxes. So why does the control have the functionality to remember what the selected value was but not the checked values?
It appears that over the years quite a few people have had this issue and so far I can see that the solution is to add a hidden field then every change save the current checked values and finally get that when back on the server. Not great.
Hopefully I am completely wrong and there is a nice easy way to do this. If not please please please make this an addition to the next version. It isn't difficult to add it to the base control and would be a seriously helpful addition.
Regards
Jon
Hi,
I trying to do a rest of DropDownList whenever my RadTabStrip is changing. I have try using Items.Clear() when there a TabSwitch Event occur. however, is not wroking.The Item in DropdownList is blinded with Datasource, try setting DataSource as Null is not working too.
Can someone advise my an alternative solution?
Hi,
I have encountered the issue of RadDatePicker showing transparent on background when clicked on it. Please advise how to overcome this issue. I have included the screen shot.
Telerik.Web.UI version: v2.0.50727
ASP UI page:
<telerik:RadDatePicker ID="rdpActivityDate" RenderMode="Lightweight" runat="server" > </telerik:RadDatePicker>
Please bear with me, as this is my first post.
I am trying to do a clientside validation on filename expression. I do not want to have :, /, %, etc in my file names. How do you guys do that?