So I have a hierarchical RadGrid with 1 master table and 1 detail table.
The detail table has the property
<EditFormSettings EditFormType="Template">The TemplateForm has 1 TextBox and 1 RadAsyncTable and the submit button (insert, update).
Now when I choose a file to upload and hit "insert" the file is uploaded and everything works correctly.
The problem is that when the file exists, I want to display an error message : "the file already exists". So I have a method to verify if the file exists. If this is the case, I want to keep the EditForm opened and display the error message. But when I choose another file that doesn't exist and hit submit again, it looks like the RadAsyncUpload loses its value and the file is gone.
Here is my code:
try { UploadedFile file = btn.UploadedFiles[0]; bool exists = BDD.CheckIfDocumentExists(fileName); if (!exists) file.SaveAs(Path.Combine(targetFolder, fileName));} catch (Exception ex) { // log the error}if (exists) { GridEditableItem item = (GridEditableItem) e.Item; Label RadTextBox1 = (Label) item.FindControl("lbl_detailerror"); RadTextBox1.Text = "the file already exists"; e.Canceled = true;} else { // insert the file in db}
<telerik:GridCalculatedColumn DataFields="DateResolved,DateReceived" Expression="{0}-{1}" headerstyle-width="50px" HeaderText="Days Open" UniqueName="DaysOpen" Aggregate="None"> </telerik:GridCalculatedColumn><%-- <telerik:GridTemplateColumn UniqueName="Temp" HeaderStyle-Width="50px" HeaderText="days open"> <ItemTemplate> <asp:Label ID="DaysOpen" runat="server"></asp:Label> </ItemTemplate> </telerik:GridTemplateColumn>--%>Imports Telerik.Web.UIPartial Class test Inherits System.Web.UI.Page 'Protected Sub Page_PreRender(sender As Object, e As System.EventArgs) Handles Me.PreRender ' 'grid.MasterTableView.SwapColumns("ComplaintID", "DateReceived") 'End Sub 'Protected Sub RadGrid1_ItemDataBound(sender As Object, e As GridItemEventArgs) ' If TypeOf e.Item Is GridDataItem Then ' Dim item As GridDataItem = TryCast(e.Item, GridDataItem) ' Dim myTS As TimeSpan = TimeSpan.Parse(item("DaysOpen").Text) ' item("DaysOpen").Text = [String].Format("{0}h {1}m {2}s", myTS.Days, myTS.Hours, myTS.Minutes) ' End If 'End Sub ' Both methods of getting the difference between two dates work equally well. ' Actually neither of them seem to do shit. When I commented them both out I still got the same correct results, but formatted like this: 2.00:00:00 for two days. 'Protected Sub RadGrid1_ItemDataBound(sender As Object, e As GridItemEventArgs) ' If TypeOf e.Item Is GridDataItem Then ' Dim item As GridDataItem = TryCast(e.Item, GridDataItem) ' Dim DaysOpen As Label = TryCast(item.FindControl("DaysOpen"), Label) ' Dim DateResolved As String = (item("DateResolved").Text) ' Dim DateReceived As String = (item("DateReceived").Text) ' Dim [date] As Integer = Convert.ToDateTime(DateResolved).Subtract(Convert.ToDateTime(DateReceived)).Days ' DaysOpen.Text = "3" ' [date].ToString() ' End If 'End SubEnd ClassHi,
I have a Radgrid with 2 columns freeze and I have enabled the resize columns, Am dynamically populating the grid, The problem is When the columns are more By deafult horizontal scrollbar appears and freezing works fine,But when we have less columns then columns get fixed accordingly and horizontal scrollbar doesnot appear which is correct..However for that less columns when we resize columns horizontal scrollbar appears then freezing doesnot work.
Ultimately Freezing works fine when the horizonatl scrollbar appear by default but doesnot work when we resize columns and horizontal scrollbar appear.
So is there any workaround for this?

<telerik:RadAjaxManager ID="radAjaxMgr" runat="server" EnableAJAX="true" EnablePageHeadUpdate="false" EnableViewState="false" > <AjaxSettings> <telerik:AjaxSetting AjaxControlID="radTabStripInd"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="radTabStripInd" /> <telerik:AjaxUpdatedControl ControlID="radGrid" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager>


<cc1:RadSearchBox runat="server" ID="cmbItemMaster" OnClientDataRequesting="OnClientSearch" OnSearch="cmbItemMaster_Search" Skin="WebBlue" Style="padding-right: 5px; padding-left: 5px; font-family: Calibri;" Width="85%" AutoPostBack="true" ZIndex="10000000" DropDownSettings-Width="200px" DropDownSettings-Height="200px"> </cc1:RadSearchBox>protected void cmbItemMaster_Search(object sender, SearchBoxEventArgs e) { ddlMaterialCode.Items.Clear(); LoadMaterialCodes(e.Value); }
when i remove the selected item in radsearchbox the ddlMaterialCode will not show means the dropdown items of ddlMaterialCode is empty and after seleccting radsearchbox item then only it will bind how to do it sir
Hi,
this Telerik support page claims that I can enable WAI-ARIA support by using the EnableAriaSupport property.
But I cannot find this property on my radPanelBar ASP.NET control (see attachment).
How can I enable WAI-ARIA support for all Telerik ASP.NET controls? (I particularly need it for the TreeView control, too.)

Hi Telerik support
I want my radlistbox scoll to selected item as code bellow
I test this code , it was working fire when i click the btnRefresh, pls tell me how to force the radlistbox scroll to selected item after searching finish on RadSearchBox RadIPSearch, after searching, the radlistbox will select the item found, but i want to scroll to it also
Thanks very much
<telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnableScriptCombine="false"></telerik:RadScriptManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"></telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
<div>
<telerik:RadSearchBox ID="RadIPSearch" runat="server"
EmptyMessage="Search..." Width="135" OnSearch="RadIPSearch_Search">
<DropDownSettings Height="400" Width="200" />
</telerik:RadSearchBox>
<telerik:RadButton ID="btnRefresh" runat="server" Text="Refresh"
OnClientClicked="OnClientClicked"
ButtonType="SkinnedButton" AutoPostBack="false" OnClick="btnRefresh_Click">
</telerik:RadButton>
</div>
<div>
<telerik:RadListBox ID="lstIPAddress" runat="server"
Height="510px" Width="200px" AutoPostBack="True"
OnSelectedIndexChanged="lstIPAddress_SelectedIndexChanged">
<ButtonSettings TransferButtons="All" />
</telerik:RadListBox>
</div>
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script type="text/javascript">
function OnClientClicked(sender, args) {
var listbox = $find("<%=lstIPAddress.ClientID %>");
listbox.get_selectedItem().scrollIntoView();
}
</script>
</telerik:RadCodeBlock>
</telerik:RadAjaxPanel>
</telerik:RadAjaxPanel>
protected void RadIPSearch_Search(object sender, SearchBoxEventArgs e)
{
if (lstIPAddress.Items.Select(x => x.Text).ToList().Contains(e.Text))
{
lstIPAddress.SelectedIndex = lstIPAddress.Items.Where(x => x.Text == e.Text).FirstOrDefault().Index;
// how to fire radlistbox to scroll to selected item here
}
}
