Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
1.5K+ views
I have the following grid:
<telerik:RadGrid ID="RadGridAziendeForUser" runat="server" DataSourceID="ObjectDataSourceAziendeUtente" 
                EnableEmbeddedSkins="False" GridLines="None" Skin="MachinaWeb" AllowAutomaticUpdates="True" 
                AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowMultiRowSelection="True" 
                AutoGenerateEditColumn="True"  
                OnItemCommand="RadGridAziendeForUser_ItemCommand"
                <ClientSettings EnablePostBackOnRowClick="True"
                    <Selecting AllowRowSelect="True" /> 
                    <Scrolling EnableVirtualScrollPaging="True" ScrollHeight="200px" /> 
                </ClientSettings> 
                <MasterTableView AutoGenerateColumns="False" DataSourceID="ObjectDataSourceAziendeUtente" 
                    EditMode="InPlace" CommandItemDisplay="Top" DataKeyNames="IdUtente,IdAzienda"
                    <CommandItemTemplate> 
                        <div style="float: left;"
                            <asp:LinkButton Text="Nuova Azienda" ID="Insert" runat="server" CommandName="InitInsert" /> 
                        </div> 
                    </CommandItemTemplate> 
                    <RowIndicatorColumn> 
                        <HeaderStyle Width="20px" /> 
                    </RowIndicatorColumn> 
                    <ExpandCollapseColumn> 
                        <HeaderStyle Width="20px" /> 
                    </ExpandCollapseColumn> 
                    <Columns> 
                        <telerik:GridBoundColumn DataField="IdUtente" DataType="System.Int64" HeaderText="IdUtente" 
                            ReadOnly="True" SortExpression="IdUtente" UniqueName="IdUtente" Visible="false"
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="IdUtenteAsp" HeaderText="IdUtenteAsp" SortExpression="IdUtenteAsp" 
                            UniqueName="IdUtenteAsp" DataType="System.Guid" Visible="false"
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="UserName" HeaderText="UserName" ReadOnly="True" 
                            SortExpression="UserName" UniqueName="UserName" Visible="false"
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="IdCultura" DataType="System.Int64" HeaderText="IdCultura" 
                            ReadOnly="True" SortExpression="IdCultura" UniqueName="IdCultura" Visible="false"
                        </telerik:GridBoundColumn> 
                        <telerik:GridTemplateColumn> 
                            <HeaderTemplate> 
                                <asp:Label ID="Label46" runat="server" Text="Azienda"></asp:Label> 
                            </HeaderTemplate> 
                            <EditItemTemplate> 
                                <telerik:RadComboBox ID="AziendaRadComboBox" runat="server" DataSourceID="ObjectDataSourceAzienda" 
                                    DataTextField="NomeAzienda" DataValueField="IdAzienda" SelectedValue='<%# Bind("IdAzienda") %>' 
                                    Width="120px" /> 
                            </EditItemTemplate> 
                            <ItemTemplate> 
                                <asp:Label ID="Label47" runat="server" Width="120px" Text='<%# Bind("Azienda") %>'></asp:Label> 
                            </ItemTemplate> 
                        </telerik:GridTemplateColumn> 
                        <telerik:GridTemplateColumn> 
                            <HeaderTemplate> 
                                <asp:Label ID="Label48" runat="server" Text="Cultura"></asp:Label> 
                            </HeaderTemplate> 
                            <EditItemTemplate> 
                                <telerik:RadComboBox ID="CulturaRadComboBox" runat="server" DataSourceID="ObjectDataSourceCultura" 
                                    DataTextField="Cultura" DataValueField="IdCultura" SelectedValue='<%# Bind("IdCultura") %>' 
                                    Width="70px" /> 
                            </EditItemTemplate> 
                            <ItemTemplate> 
                                <asp:Label ID="Label50" runat="server" Width="70px" Text='<%# Bind("Cultura") %>'></asp:Label> 
                            </ItemTemplate> 
                        </telerik:GridTemplateColumn> 
                        <telerik:GridTemplateColumn> 
                            <HeaderTemplate> 
                                <asp:Label ID="Label49" runat="server" Text="Gruppo"></asp:Label> 
                            </HeaderTemplate> 
                            <EditItemTemplate> 
                                <telerik:RadComboBox ID="GruppoRadComboBox" runat="server" DataSourceID="ObjectDataSourceGruppoUtente" 
                                    DataTextField="Nome" DataValueField="IdGruppoUtente" SelectedValue='<%# Bind("IdGruppo") %>' 
                                    Width="120px" /> 
                            </EditItemTemplate> 
                            <ItemTemplate> 
                                <asp:Label ID="Label51" runat="server" Text='<%# Bind("Gruppo") %>'></asp:Label> 
                            </ItemTemplate> 
                        </telerik:GridTemplateColumn> 
                        <telerik:GridTemplateColumn> 
                            <HeaderTemplate> 
                                <asp:Label ID="Label52" runat="server" Text="Stabilimento"></asp:Label> 
                            </HeaderTemplate> 
                            <EditItemTemplate> 
                                <telerik:RadComboBox ID="StabilimentoRadComboBox" runat="server" DataSourceID="ObjectDataSourceStabilimento" 
                                    DataTextField="Denominazione" DataValueField="IdStabilimento" SelectedValue='<%# Bind("IdStabilimento") %>' 
                                    Width="120px" /> 
                            </EditItemTemplate> 
                            <ItemTemplate> 
                                <asp:Label ID="Label53" runat="server" Text='<%# Bind("Stabilimento") %>'></asp:Label> 
                            </ItemTemplate> 
                        </telerik:GridTemplateColumn> 
                        <telerik:GridTemplateColumn> 
                            <HeaderTemplate> 
                                <asp:Label ID="Label54" runat="server" Text="Reparto"></asp:Label> 
                            </HeaderTemplate> 
                            <EditItemTemplate> 
                                <telerik:RadComboBox ID="RepartoRadComboBox" runat="server" DataSourceID="ObjectDataSourceReparto" 
                                    DataTextField="Reparto" DataValueField="IdReparto" SelectedValue='<%# Bind("IdReparto") %>' 
                                    Width="120px" /> 
                            </EditItemTemplate> 
                            <ItemTemplate> 
                                <asp:Label ID="Label55" runat="server" Text='<%# Bind("Settore") %>'></asp:Label> 
                            </ItemTemplate> 
                        </telerik:GridTemplateColumn> 
                        <telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="DeleteColumn" 
                            ConfirmText="Do you really want to delete the selected row?" /> 
                    </Columns> 
                    <EditFormSettings> 
                        <EditColumn> 
                        </EditColumn> 
                    </EditFormSettings> 
                </MasterTableView><FilterMenu EnableEmbeddedSkins="False"
                </FilterMenu> 
                <HeaderContextMenu EnableEmbeddedSkins="False"
                </HeaderContextMenu> 
            </telerik:RadGrid> 

I want to access by code the GridTemplateColumn's HeaderTemplate Labels (for example "Label46") to change the Text property. How can I do this in C#?

Thanks.
Carlos
Top achievements
Rank 2
 answered on 28 Nov 2012
1 answer
161 views
How can i disable autocomplete option in raddatepicker? 
Shinu
Top achievements
Rank 2
 answered on 28 Nov 2012
1 answer
104 views
How can i access the input box of the raddatepicker in the client side? 
Princy
Top achievements
Rank 2
 answered on 28 Nov 2012
1 answer
98 views
hi,
i've a problem with upload file with radupload. When i do upload i've thsi message:

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6 and IIS 7, and the configured application pool identity on IIS 7.5) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

I dont know as configure the access. Please help me for exaple is possible

bye
Plamen
Telerik team
 answered on 28 Nov 2012
2 answers
70 views
hi team

can i use the classic jquery (jquery ui) dialog box instead of Advanced Form for insert/edit data ?


thanks
Plamen
Telerik team
 answered on 28 Nov 2012
1 answer
89 views
I want to attachment mail so i use AsyncUpload :


 <telerik:RadAsyncUpload runat="server" ID="rad_upload" Skin="Default" OnClientFileUploadFailed="onUploadFailed"<br>                                            OnClientFileSelected="onFileSelected" OnClientFileUploaded="onFileUploaded" Culture="Arabic" TemporaryFileExpiration="00:07:00" > <Localization Select="اختر" /> </telerik:RadAsyncUpload>
 List<Attachment> attach = new List<Attachment>(); if (rad_upload.UploadedFiles != null && rad_upload.UploadedFiles.Count > 0){; foreach (UploadedFile file in rad_upload.UploadedFiles){; Attachment f = new Attachment(Server.MapPath("~/App_Data/RadUploadTemp/") + file.GetName(), file.ContentType); attach.Add(f); }

I get an exception File not found !! how attach the file with this method
Plamen
Telerik team
 answered on 28 Nov 2012
1 answer
112 views

How do I get search engine results programatically?  Some search engines use AJAX to display content and so the URL does not change. This makes it difficult to get result content from a search engine programatically.

Most search engines do not use AJAX.  But two popular ones that I am interested in is YANDEX and DUCKDUCKGO.  Both of these search engines use AJAX to advance beyond the first page of results.  How do I find a way to programatically access these pages?

Vasil
Telerik team
 answered on 28 Nov 2012
6 answers
173 views

Hi,
since the sql select using the radcombox charged over 1000 records, you can upload a video, when I open the radcombobox, only 10 records at a time? And then you decide to continue to view other records.
Maybe I need to use the property ShowMoreresultsBox = True?
My side code vb net is:

Protected Sub RadComboBox1_ItemsRequested(sender As Object, e As Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs) Handles RadComboBox1.ItemsRequested
 
Dim sqlSelectCommand As String = "SELECT [id], [descrizione] from [tab_categorie] WHERE [descrizione] LIKE @desc + '%' Order By [descrizione]"
  
Dim adapter As New SqlDataAdapter(sqlSelectCommand, ConfigurationManager.ConnectionStrings("TrycontactString").ConnectionString)
 
 adapter.SelectCommand.Parameters.AddWithValue("@desc", e.Text)
 
 Dim dataTable As New DataTable()
 
 adapter.Fill(dataTable)
 For Each dataRow As DataRow In dataTable.Rows
 
 Dim item As New RadComboBoxItem()
 
 item.Text = DirectCast(dataRow("descrizione"), String)
 
item.Value=dataRow("id").ToString()radComboBox1.Items.Add(item)
 
 item.DataBind()
 
 Next
End Sub

 

 

 

While the ASP side code is:

<telerik:RadComboBox ID="RadComboBox1" Runat="server" DropDownWidth="325px"
    EmptyMessage="Choose a Catogory" EnableLoadOnDemand="true" Filter="Contains"
    Height="150" HighlightTemplatedItems="true"
    OnItemsRequested="RadComboBox1_ItemsRequested"
    Width="325px" ErrorMessage="Dato errato" IsCaseSensitive="True">
</telerik:RadComboBox>

 

 

 

 

 

 



Nencho
Telerik team
 answered on 28 Nov 2012
1 answer
103 views
I have a page with RadFileExplorer and EnableAsyncUpload="true" option. We are using selenium tool for automation testing. But we are not able to perform "click" option with EnableAsyncUpload option.

If i remove EnableAsyncUpload option then i am able to do it.

Our findings are as below
---------------------------------------------------------------------------------------------

1) There are 2 separate objects, a "text" and a "button"  manually clicking on which the Select File window opens. However, through Select IDE and Selenium RC, on performing click on these objects, the Select File window does not open, due to which AutoIT is unable to select the file to upload. This looks to be more of a selenium issue that though the Click action is executing successfully, the click event is not getting fired and the Select File Window is not invoked.

I am able to perform a "type" in the text box.However, the file is not uploaded by doing a type as your application does not support that.

2) Using the IE developer tool, it is highlighting the file object as below

               <OBJECT style="OUTLINE-STYLE: none; OUTLINE-COLOR: invert; OUTLINE-WIDTH: 0pt; WIDTH: 100%" id=ctl00_BodyContent_FileExplorer_asyncUpload1flash010 class=ruObject tabIndex=-1 data="/WebResource.axd?d=fM8n8mufwaYAdyK9bnynX5Wn47jvXke8iOMZ_ZStmCnM1bULR6bY0YLeP07v4HddNqGy_TB-zp3JF322tlXRhdAuS5pvAT1tz_SSdoa36qh9eBXYTd1gcKF-tJC8bfmPYbJBTE_Kt8mQoALLyvR9XPA32SbcoMKjJe_pbWbJu0QS1ni81X8-Vi_6J6-CUY-70&amp;t=634770601240000000" type=application/x-shockwave-flash height=22></OBJECT>

Usually, to upload a file, the html input object used is of the "type=file" which I dont see in the above object.
Request you to have a word with your dev team and let us know if this object is a flash component   (Notice the "type" attribute).

--------------------------------------------------------------------------------------------

can anybody please provide any input?
Joana
Telerik team
 answered on 28 Nov 2012
9 answers
181 views
Heey guys

I have  a question is it possible to bind tow sql sources in one RadScheudler ?  An example with sql would really help  

My code 
<%@ Page Title="" Language="C#" MasterPageFile="~/ABBMaster.Master" AutoEventWireup="true" CodeBehind="UserScheduler.aspx.cs" Inherits="HolidayTracker.User.UserScheduler" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="MainRegionContentPlaceHolder" runat="server">
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            function Export(sender, e) {
                $find("<%= RadAjaxManager1.ClientID %>").__doPostBack(sender.name, "");
            }
 
        </script>
    </telerik:RadCodeBlock>
    <style type="text/css">
        .RadScheduler .rsExportButton {
            position: absolute;
            bottom: 0;
            right: 0;
            border: 0;
            height: 24px;
            width: 24px;
            background: url('exportButtonli.gif') no-repeat center center;
        }
 
        .RadScheduler .rsAllDayRow .rsExportButton {
            right: 20px;
            height: 16px;
            width: 16px;
            bottom: 20px;
            background: url('exportButton.gif');
        }
 
        #Label1Panel {
            display: inline !important;
        }
 
        .lblError {
            background: #CC0000;
            border: 1px solid darkred;
            color: white;
            font: bold 16px "Segoe UI", Arial, sans-serif;
            vertical-align: middle;
            display: none;
            height: 30px;
            line-height: 28px;
            position: absolute;
            padding-left: 5px;
            width: 743px;
            z-index: 1001;
            cursor: pointer;
            opacity: 0.9;
            -moz-opacity: 0.9;
            filter: alpha(opacity=90);
        }
 
        .rsCustomAppointmentContainer div {
            width: 100% !important;
        }
 
        .rsCustomAppointmentContainer h2 {
            overflow: hidden !important;
            white-space: nowrap !important;
            text-overflow: ellipsis !important;
        }
    </style>
 
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadScheduler1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
                    <telerik:AjaxUpdatedControl ControlID="Label1"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <asp:Label ID="Label1" runat="server" CssClass="lblError"></asp:Label>
    <div style="margin: 5px 0">
        <asp:ImageButton runat="server" ID="Button2" ImageUrl="exportButton.gif" AlternateText="Export All to Lotus Notes"
            OnClientClick="Export(this, event); return false;" OnClick="Button2_Click"></asp:ImageButton>
    </div>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" InitialDelayTime="200">
    </telerik:RadAjaxLoadingPanel>
    <div class="exampleContainer">
        <telerik:RadScheduler runat="server" ID="RadScheduler1" Width="750px"
            DayStartTime="07:00:00" DayEndTime="18:00:00" DataSourceID="SqlDataSource1"
            DataKeyField="VacationDayId" DataSubjectField="Title" DataStartField="FromDate" DataEndField="ToDate"
            OnAppointmentUpdate="RadScheduler1_AppointmentUpdate"
            OnAppointmentInsert="RadScheduler1_AppointmentInsert"
            OnRecurrenceExceptionCreated="RadScheduler1_RecurrenceExceptionCreated">
            <AdvancedForm Modal="true"></AdvancedForm>
            <TimelineView UserSelectable="false"></TimelineView>
            <TimeSlotContextMenuSettings EnableDefault="true"></TimeSlotContextMenuSettings>
            <AppointmentContextMenuSettings EnableDefault="true"></AppointmentContextMenuSettings>
        </telerik:RadScheduler>
    </div>
 
    <asp:EntityDataSource ID="EntityDataSource1" runat="server" ConnectionString="name=HolidayTrackerEntities" DefaultContainerName="HolidayTrackerEntities" EnableDelete="True" EnableFlattening="False" EnableInsert="True" EntitySetName="HtVacationDays"></asp:EntityDataSource>
 
 
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:HolidayTrackerConnectionString %>" OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT * FROM [HtVacationDay]" DeleteCommand="DELETE FROM [HtVacationDay] WHERE [VacationDayId] = @original_VacationDayId" InsertCommand="INSERT INTO [HtVacationDay] ([Title], [FromDate], [UserId], [Hours], [ToDate], [RecurrenceRule], [RecurrenceRuleID]) VALUES (@Title, @FromDate, @UserId, @Hours, @ToDate, @RecurrenceRule, @RecurrenceRuleID)" UpdateCommand="UPDATE [HtVacationDay] SET [Title] = @Title, [FromDate] = @FromDate, [UserId] = @UserId, [Hours] = @Hours, [ToDate] = @ToDate, [RecurrenceRule] = @RecurrenceRule, [RecurrenceRuleID] = @RecurrenceRuleID WHERE [VacationDayId] = @original_VacationDayId">
        <DeleteParameters>
            <asp:Parameter Name="original_VacationDayId" Type="Int32" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="Title" Type="String" />
            <asp:Parameter Name="FromDate" Type="DateTime" />
            <asp:Parameter Name="UserId" Type="Int32" />
            <asp:Parameter Name="Hours" Type="Double" />
            <asp:Parameter Name="ToDate" Type="DateTime" />
            <asp:Parameter Name="RecurrenceRule" Type="String" />
            <asp:Parameter Name="RecurrenceRuleID" Type="String" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="Title" Type="String" />
            <asp:Parameter Name="FromDate" Type="DateTime" />
            <asp:Parameter Name="UserId" Type="Int32" />
            <asp:Parameter Name="Hours" Type="Double" />
            <asp:Parameter Name="ToDate" Type="DateTime" />
            <asp:Parameter Name="RecurrenceRule" Type="String" />
            <asp:Parameter Name="RecurrenceRuleID" Type="String" />
            <asp:Parameter Name="original_VacationDayId" Type="Int32" />
        </UpdateParameters>
    </asp:SqlDataSource>
   
</asp:Content>

Thanks for help and fast answer
Plamen
Telerik team
 answered on 28 Nov 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?