Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
26 views


I'm using the AsyncUpload control and I'm facing a big problem. Always I try to upload an Office file that is open, a JavaScript error is throwed. I searched at Telerik forum and found some similar problems, the Telerik team says this problem is being corrected.

http://www.telerik.com/community/forums/aspnet-ajax/async-upload/file-sharing-violation.aspx

Is there some update about this?

Peter Filipov
Telerik team
 answered on 19 Jul 2011
1 answer
292 views
Hi Forum.

I would like to know a way to stop a radajaxloadingpanel animation/loading with vb(if possible, if not c#?). My problem is the following: hen i hit a button a serie os validations are made, if validation returns false i want o show a tooltip showing some information, while doing the validation i want the radajaxloadingpanel to appear with animation/loading so the person can know that something is happening. From what i can understand, the problem here is that the end of the radajaloadingpanel animation/loading makes a postback of some sort witch makes the tooltip to hide. i tried 2 ways:


If Valido_Dados_Processos(novo_proceso) = True Then
    If MessageBox.Show("Tem a certeza que pretende criar um novo processo?", "Criação de processo", MessageBoxButtons.YesNo) = Windows.Forms.DialogResult.Yes Then
        If Existe_boletim_compProc(rmtb_procesocompanhia.TextWithLiterals, rmtb_apolice.TextWithLiterals, rcb_sinistrado.SelectedValue) Then
            Altera_Processo()
        Else
            Gravar_novo_Processo()
        End If
    End If
Else
    rtt_info_on_error.Visible = True
    rtt_info_on_error.Show()
End If


Protected Sub Page_LoadComplete(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LoadComplete
    If valido_op_processo = False Then
        rtt_info_on_error.Visible = True
        rtt_info_on_error.Show()
        valido_op_processo = True
    End If
End Sub
Protected Sub rb_alterar_proceso_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles rb_alterar_proceso.Click
    If Valido_Dados_Processos(grava_proceso) = True Then
        If MessageBox.Show("Tem a certeza que pretende alterar o processo?", "Alteração de dados", MessageBoxButtons.YesNo) = Windows.Forms.DialogResult.Yes Then
            If Existe_boletim_compProc(rmtb_procesocompanhia.TextWithLiterals, rmtb_apolice.TextWithLiterals, rcb_sinistrado.SelectedValue) And aux_boletimID <> "" Then
                Altera_Processo()
            Else
                Gravar_novo_Processo()
            End If
        End If
    Else
        valido_op_processo = False
    End If
End Sub

None of them worked, so if anyone could help me i would appreciate very much

Many thanks,
FEST
Radoslav
Telerik team
 answered on 19 Jul 2011
2 answers
214 views
Hello,

i want to display a button and the group header text at a GridGroupHeader cell. After some searching and trying I found some usefull code snippets but the behavior is not as expected. After the PostBack-Event the group header text disappears and only the button is shown.


<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Grid.aspx.cs" Inherits="GridTest.ForecastGridTest" %>
 
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
            <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">
            </telerik:RadStyleSheetManager>
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            </telerik:RadScriptManager>
            <div>   
                <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True"
                                 AutoGenerateColumns="false" CellSpacing="0" GridLines="None"
                                 ShowGroupPanel="True" OnNeedDataSource="RadGrid1_OnNeedDataSource"
                                 OnItemDataBound="RadGrid1_OnItemDataBound"
                                 OnItemCreated="RadGrid1_OnItemCreated">
                    <ClientSettings AllowDragToGroup="True">
                    </ClientSettings>
                    <MasterTableView AutoGenerateColumns="False" GroupLoadMode="Server" GroupsDefaultExpanded="False">
                        <GroupByExpressions>
                            <telerik:GridGroupByExpression>
                                <SelectFields><telerik:GridGroupByField FieldName="gl1" HeaderText="gl1" /></SelectFields>
                                <GroupByFields><telerik:GridGroupByField FieldName="gl1" SortOrder="Ascending" /></GroupByFields>
                            </telerik:GridGroupByExpression>
                            <telerik:GridGroupByExpression>
                                <SelectFields><telerik:GridGroupByField FieldName="gl2" HeaderText="gl2" /></SelectFields>
                                <GroupByFields><telerik:GridGroupByField FieldName="gl2" SortOrder="Ascending" /></GroupByFields>
                            </telerik:GridGroupByExpression>
                        </GroupByExpressions>
 
                        <Columns>
                        <telerik:GridTemplateColumn HeaderStyle-Width="100px">                               
                                <ItemTemplate>
                                    <telerik:RadButton ID="RadButton1" runat="server" OnClick="OnClick" ButtonType="LinkButton" Text="plah" CommandName=""></telerik:RadButton>
                                    <telerik:RadButton ID="RadButton2" runat="server" OnClick="OnClick" ButtonType="LinkButton" Text="plah" ></telerik:RadButton>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn >
                                <telerik:GridButtonColumn HeaderText="Status" UniqueName="ImageColumn" ButtonType="ImageButton" HeaderStyle-Width="100px" />
                                <telerik:GridBoundColumn DataField="Forecast_Id" DataType="System.String" FilterControlAltText="Filter type1 column" HeaderText="ForecastId"  UniqueName="Forecast" />
                                <telerik:GridBoundColumn Display="False" DataField="Forecast_StdInt03" DataType="System.Int32" UniqueName="Status"  />
                        </Columns>
                     
 
                        <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
 
                        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                            <HeaderStyle Width="20px"></HeaderStyle>
                        </RowIndicatorColumn>
 
                        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                            <HeaderStyle Width="20px"></HeaderStyle>
                        </ExpandCollapseColumn>
 
                        <EditFormSettings>
                            <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
                        </EditFormSettings>
                    </MasterTableView>
 
                    <FilterMenu EnableImageSprites="False"></FilterMenu>
 
                    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
                </telerik:RadGrid>   
            </div>
            <telerik:RadAjaxManager runat="server">
            </telerik:RadAjaxManager>
            <asp:ObjectDataSource runat="server" ID="osd1" TypeName="GridTest.DataAccess" SelectMethod="GetDataTable" >
            </asp:ObjectDataSource>
 
        </form>
    </body>
</html>

using System;
using System.Collections.Generic;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
 
namespace GridTest
{
    public partial class ForecastGridTest : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            RadGrid1.MasterTableView.HierarchyDefaultExpanded = false;
        }
 
 
        protected void RadGrid1_OnNeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            var dataAccess = new DataAccess();
            var dataTable = dataAccess.GetDataTable();
            if (sender is RadGrid)
            {
                var grid = sender as RadGrid;
                grid.DataSource = dataTable;
            }
        }
 
        protected void OnClick(object sender, EventArgs e)
        {
            if (sender is RadButton)
            {
                var button = sender as RadButton;
                button.ForeColor = Color.Red;
 
            }
        }
 
        protected void RadGrid1_OnItemDataBound(object sender, GridItemEventArgs e)
        {
           _AppendButtonToHeader(e.Item);           
        }
 
        protected void RadGrid1_OnItemCreated(object sender, GridItemEventArgs e)
        {
           _AppendButtonToHeader(e.Item);
        }
 
 
        private void _AppendButtonToHeader(object item)
        {
            if (item is GridGroupHeaderItem)
            {
                var gridGroupHeaderItem = item as GridGroupHeaderItem;
                var dataCell = gridGroupHeaderItem.DataCell;
 
                var radButton = new RadButton();
                radButton.ButtonType = RadButtonType.StandardButton;
                radButton.Text = "do";
                radButton.Click += new EventHandler(radButton_Click);
 
                dataCell.Controls.Add(radButton);
                dataCell.Controls.Add(new LiteralControl(dataCell.Text));
            }
        }
 
        void radButton_Click(object sender, EventArgs e)
        {
            
        }       
    }
}

In a prior test i moved the logic to the PreRender event, but the event registration for the radButton does not work in this case. 
Can you please point me to the right direction.

thanks and greetings
Uwe
uwe
Top achievements
Rank 1
 answered on 19 Jul 2011
1 answer
84 views
Can you someone helps to show me how to disabled the grid if it's in the Detail Table of a Main Grid? I need to develop an App that required this feature. I know we need to use Grid Client API to work on it, but not sure how to write the javascript code. 

I've include the picture showed the Grid in Detail Table of the master Grid. If user click on the checkbox on the Master Grid, Grid in Detail Table should be ENABLED.

Thank you.
Princy
Top achievements
Rank 2
 answered on 19 Jul 2011
4 answers
166 views
Hi All,

 In my project i have one radtreeview and radgrid. when i check particular child node i am binding radgrid. These functionalities working fine. But i want to display radtreeview parent node and child node as a heading on radgrid.
I want to display heading like which is in Groupheadings.png screen shot in radgrid_with_radtreeview.png screen shot.

Please anybody help me.


Thanks,
Nagendra.
Nagendra
Top achievements
Rank 1
 answered on 19 Jul 2011
2 answers
168 views
Hello every one i want to show radlistview like msn.com view comments like
Any examples available in radlistview like that

http://www.msnbc.msn.com/id/43666041/?gt1=43001


In radlivtview i want to show only three record that view how i restrict that

Replay soon

Thanks,
Mohamed.
mohamed
Top achievements
Rank 1
 answered on 19 Jul 2011
2 answers
85 views
Hi,
I have a page consists of two grids. The bigger one is located in the center of screen, the other is smaller one which is placed at the rigth top corner. I have a template column including a button in bigger and centered grid. When it clicked some ajax code is executed. If I define
ajax setting as follows both of the grids are refreshing. But I only need smaller one to be refreshed.  If I remove the the bigger one's config item from UpdatedControls  section "Loading" sign is seems in the center of smaller grid. But I want the sign to be in the center og bigger grid. How can I do it? Refreshing two grids causes performance problem even there is no need.
Thank you,

<telerik:RadAjaxManager ID="ram" runat="server" OnAjaxRequest="ram_AjaxRequest">
....
<telerik:AjaxSetting AjaxControlID="bigger...">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="smaller..." LoadingPanelID="rLoadPanelMain" />
                    <telerik:AjaxUpdatedControl ControlID="bigger..." LoadingPanelID="rLoadPanelMain" />
                </UpdatedControls>
</telerik:AjaxSetting>    
....

<telerik:RadAjaxLoadingPanel ID="rLoadPanelMain" runat="server" Skin="Mar" EnableEmbeddedSkins="false" ></telerik:RadAjaxLoadingPanel>
Nazim
Top achievements
Rank 1
 answered on 19 Jul 2011
1 answer
172 views

Under the RadListView you suggest the following:


RadControls for ASP.NET AJAX

Collapse imageAccessing controls in the LayoutTemplate

To get reference to a control in RadListView LayoutTemplate you can use its FindControl(controlId) method.

CopyC#
protected void RadListView1_PreRender(object sender, EventArgs e)
{
    Label lbl = RadListView1.FindControl("Label1") as Label;
}

I can't make it work. 
My code:
<telerik:RadListView ID="RadListView1" runat="server" AllowPaging="True"
    ItemPlaceholderID="PlaceHolder1" onitemcreated="RadListView1_ItemCreated"
    onprerender="RadListView1_PreRender" >
    <LayoutTemplate>
        <asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>
    </LayoutTemplate>
    <ItemTemplate>
        <div style="float: left;">
            <fieldset style="border: 0; width: 154px; height: 154px; margin: 5px 5px 5px 5px;">
                <div class="myClass" style="padding: 2px 2px 2px 2px; background: #eeeeee; text-align: center;">
                    <telerik:RadBinaryImage ID="RadBinaryImage1" runat="server" AutoAdjustImageControlSize="False"
                        CssClass="myClass" ImageUrl='<%# Eval("thumbUrl") %>' ResizeMode="Fit" AlternateText="Click to view preview"
                        ToolTip="Click to view preview" Width="150px" Height="150px" />
                </div>
            </fieldset>
            <div style="border: 0px; white-space: normal; width: 150px; margin: 5px 5px 5px 5px;
                padding: 2px 2px 2px 2px;">
                <asp:CheckBox ID="chkImage" runat="server" AutoPostBack="True" />
                <asp:HyperLink ID="lnkAsset" Target="_blank" NavigateUrl='javascript:void(0);' runat="server"><%# Eval("filename") %></asp:HyperLink>
                <asp:HiddenField ID="hiddenAssetId" Value='<%# Eval("id") %>' runat="server" />
            </div>
        </div>
    </ItemTemplate>
    <EmptyDataTemplate>
        No Assets Found
    </EmptyDataTemplate>
</telerik:RadListView>
Code behind:
protected void RadListView1_PreRender (object sender, EventArgs e)
{
    HyperLink lnkAsset = RadListView1.FindControl ("lnkAsset") as HyperLink;
    lnkAsset.Attributes.Add ("OnClick", "javascript:void(assetInfoPopUp(assetId));return false;");
}
lnkAsset is null.
Shinu
Top achievements
Rank 2
 answered on 19 Jul 2011
10 answers
269 views
Hello. I have a question. I have a Grid. There's a ComboBox with DataSource with 3 fields. I want a grid TemplateColumn TeamName (Label.Text) binding with a ComboBox DataSource-Fields( not ComboBox.Value, not ComboBox.Text). I too would like a ComboBox SelectedIndexChanged TemplateColumn TeamName also changed. Is it possible?

<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
        <telerik:RadGrid ID="RadGrid1" runat="server" CellSpacing="0"
            DataSourceID="SqlDataSource1" GridLines="None">
<MasterTableView AutoGenerateColumns="False" DataKeyNames="Number"
                DataSourceID="SqlDataSource1">
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
 
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
 
<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
 
    <Columns>
        <telerik:GridBoundColumn DataField="Number" DataType="System.Int32"
            FilterControlAltText="Filter Number column" HeaderText="Number" ReadOnly="True"
            SortExpression="Number" UniqueName="Number">
        </telerik:GridBoundColumn>
        <telerik:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column"
            HeaderText="Year" UniqueName="TemplateYear" DataField="Year">
            <ItemTemplate>
                <telerik:RadComboBox ID="RadComboBox1" Runat="server"
                    SelectedValue='<%# Bind("Year") %>'>
                    <Items>
                        <telerik:RadComboBoxItem runat="server" Text="2009" Value="2009" />
                        <telerik:RadComboBoxItem runat="server" Text="2010" Value="2010" />
                        <telerik:RadComboBoxItem runat="server" Text="2011" Value="2011" />
                    </Items>
                </telerik:RadComboBox>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn FilterControlAltText="Filter TemplateColumn1 column"
            HeaderText="Team" UniqueName="TemplateColumn1" DataField="Team">
            <ItemTemplate>
                <telerik:RadComboBox ID="RadComboBox2" Runat="server"
                    DataSourceID="SqlDataSource2" DataTextField="Code" DataValueField="Code"
                    SelectedValue='<%# Bind("Team") %>'
                    onselectedindexchanged="RadComboBox2_SelectedIndexChanged"
                    AutoPostBack="True" onitemdatabound="RadComboBox2_ItemDataBound">
                </telerik:RadComboBox>
                
            </ItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn FilterControlAltText="Filter TemplateColumn2 column"
            HeaderText="TeamName" UniqueName="TemplateColumn2">
            <ItemTemplate>
                <asp:Label ID="Label1" runat="server"
                    Text='<%# Bind("RadComboBox2.Attributes("Name")") %>'></asp:Label>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
    </Columns>
 
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
</MasterTableView>
 
<FilterMenu EnableImageSprites="False"></FilterMenu>
 
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
        </telerik:RadGrid>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server"
            ConnectionString="<%$ ConnectionStrings:webzeus %>"
             
            SelectCommand="SELECT top 15 [Number], [Year], [Team] FROM [Project] WHERE year >2008 and year <2012">
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server"
                    ConnectionString="<%$ ConnectionStrings:webs %>"
                    SelectCommand="SELECT [Code], [Name], [Manager] FROM [Team] WHERE ([disabled] = @disabled)">
                    <SelectParameters>
                        <asp:Parameter DefaultValue="false" Name="disabled" Type="Boolean" />
                    </SelectParameters>
        </asp:SqlDataSource>
     
    </div>
    </form>
</body>
Thanks
Princy
Top achievements
Rank 2
 answered on 19 Jul 2011
3 answers
179 views
In my Scheduler when I dbl-click on the scheduler to schedule a new appt, click on "Options", I don't see any of the advanced options such as recurrence there.  How do I get these to show up?

Here's a screenshot of what I see.

Here's my control in my .ASPX page

<telerik:RadScheduler ID="rscSchedule" runat="server" 
    DataKeyField="Appointment_ID"
    DataEndField="EndTime" 
    DataStartField="StartTime" 
    DataSubjectField="Subject" 
    AllowInsert="true" 
    AllowDelete="true" 
    AllowEdit="true"
    DayStartTime="05:00:00" 
    DayEndTime="19:00:00" 
    FirstDayOfWeek="Monday"
    LastDayOfWeek="Friday"
    MinutesPerRow="15" 
    ShowViewTabs="true" 
    ShowFooter="false"
    WorkDayStartTime="05:00:00" 
    WorkDayEndTime="19:00:00"
    EnableDescriptionField="true"
AppointmentStyleMode="Default"
    Width="900"
    Height="700"
    GroupBy="Nurses" 
    OnAppointmentInsert="rscSchedule_Insert"
    OnAppointmentDelete="rscSchedule_Delete" 
    OnAppointmentUpdate="rscSchedule_Update"
    OnAppointmentClick="rscSchedule_Click" 
    OnAppointmentDataBound="rscSchedule_AppointmentDataBound" 
    OnNavigationComplete="rscSchedule_NavigationComplete">
<AdvancedForm Enabled="true" EnableCustomAttributeEditing="false" EnableResourceEditing="false" Modal="true" />
<TimelineView UserSelectable="false" />
<ResourceTypes>
    <telerik:ResourceType Name="Nurses" KeyField="Staff_ID" TextField="FullNameUpperCase" ForeignKeyField="Staff_ID" />
</ResourceTypes>
<TimeSlotContextMenuSettings EnableDefault="true" />
<AppointmentContextMenuSettings EnableDefault="true" /> 
</telerik:RadScheduler>
Scott Hodson
Top achievements
Rank 1
 answered on 18 Jul 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?