Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
95 views
Hi,

Is there any way to export the data displayed in the Grid to Excel (or any of the other formats) without popping up the file dialog?  I need to perform an export as part of an unattended Windows service and I need to find a way around the dialog.  I like the exported format, and the speed!, that one gets from the ExportToExcel() method, so I want to use that, but the dialog is a problem.

Thanks,
Sean
Daniel
Telerik team
 answered on 20 Mar 2009
2 answers
133 views
Is it possible to change the width of a text box that is automatically created in the grid edit form?
derek
Top achievements
Rank 2
 answered on 20 Mar 2009
1 answer
64 views
Hi,

I've an issue with client side binding of the radGrid.
I've got a GridClientSelectColumn, and when the number of rows = PageSize, the last generated row doesn't show the checkbox.
Is there a solution ?

Thanks


Nikolay Rusev
Telerik team
 answered on 20 Mar 2009
1 answer
122 views
Hi
     I called the Customer Details Data in the Grid. The Grid is showing all the Data. I wrote the data source through need Data Source.. It is fine... When I Click the Edit mode that time i have enough to load the single Selected Data... But the edit mode once again called the need data source..the grid edit mode loading long time...  Let me know how can i solve the this performance problem.... I wrote my code below please check and reply


    <div class="searchgrid">
                        <telerik:RadGrid ID="griduniversal"   AllowPaging="True"
                            OnNeedDataSource="griduniversal_NeedDataSource" OnEditCommand="griduniversal_EditCommand"  AlternatingItemStyle-BackColor="ActiveBorder"                             
                            OnPreRender="griduniversal_PreRender"  AutoGenerateColumns="False"  
                            runat="server"  GridLines="None" AllowSorting="True">
                           
                                    <HeaderContextMenu EnableTheming="True">
                                    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                                    </HeaderContextMenu>
                                    
                                     <ClientSettings>
                                        <Selecting AllowRowSelect="true" />
                                    </ClientSettings>
                                     <MasterTableView  CommandItemDisplay="Top"  DataKeyNames="id,ContactTypeID">                                     
                                    
                                    
                                    <CommandItemTemplate>
                                     <div class="deletelnk">
                                        <asp:LinkButton ID="lnkContactDelete"  OnClick="lnkContactDelete_OnClick" OnClientClick="javascript:return confirm('Would you like to delete the selected Contact(s)?')" runat="server" CausesValidation="false"><img style="border:0px;vertical-align:middle;" alt="" src="../../Images/Delete.png" /><asp:Literal ID="litDeleteArea" runat="server" Text="<%$ Resources:AdminResource, lnkDeleteContact%>"></asp:Literal></asp:LinkButton>
                                     </div>  
                                 </CommandItemTemplate>      
                                                                        
                             <Columns>
                                    
                                    <telerik:GridTemplateColumn UniqueName="TemplateColumn">
                                    <ItemTemplate>                    
                                            <asp:CheckBox id="chkContactDelete" runat="server"></asp:CheckBox>                  
                                    </ItemTemplate>
                                    <HeaderStyle Width="10px"></HeaderStyle>                                
                                    </telerik:GridTemplateColumn>        
                                
                                      <telerik:GridEditCommandColumn UniqueName="EditCommandColumn">
                                      <HeaderStyle Width="40px"></HeaderStyle>
                                       </telerik:GridEditCommandColumn>                                            
                                       
                                        <telerik:GridBoundColumn UniqueName="ID" Visible="false" HeaderText="ID" DataField="ID">
                                        <HeaderStyle Width="25%"></HeaderStyle>
                                        </telerik:GridBoundColumn>           
                                      
                                      <telerik:GridBoundColumn UniqueName="FirstName"  HeaderText="Name" DataField="FullName">
                                        <HeaderStyle Width="25%"></HeaderStyle>
                                      </telerik:GridBoundColumn>
                                      
                                      <telerik:GridBoundColumn UniqueName="City" HeaderText="City" DataField='CityName'>
                                        <HeaderStyle Width="20%"></HeaderStyle>
                                      </telerik:GridBoundColumn>
                                      
                                      <telerik:GridBoundColumn UniqueName="State" HeaderText="State" DataField="StateName">
                                        <HeaderStyle Width="20%" />
                                      </telerik:GridBoundColumn>
                                      
                                      <telerik:GridBoundColumn UniqueName="ContactTypeID" HeaderText="ContactType" DataField="ContactTypeName">
                                      </telerik:GridBoundColumn>                                                                           
                                                                     
                                       
                              
                                 </Columns>
                              
                         
                                        <EditFormSettings EditFormType="WebUserControl">
                                        <EditColumn>
                                        </EditColumn>
                                        </EditFormSettings>
                                       
                                        <RowIndicatorColumn>
                                        <HeaderStyle Width="20px"></HeaderStyle>
                                        </RowIndicatorColumn>

                                        <ExpandCollapseColumn>
                                        <HeaderStyle Width="20px"></HeaderStyle>
                                        </ExpandCollapseColumn>
                                        </MasterTableView>

                                        <FilterMenu EnableTheming="True">
                                        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                                        </FilterMenu>
                                        
                                
                                </telerik:RadGrid>
                        </div>


                
          <!-- Ajax Manager-->              
          <telerik:RadAjaxManager ID="amanagerSearchGrid" runat="server">
            <AjaxSettings>
              <telerik:AjaxSetting AjaxControlID="griduniversal">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="griduniversal"  LoadingPanelID="aloadingpanelSearchGrid"/>
                        </UpdatedControls>
                    </telerik:AjaxSetting>       
            </AjaxSettings>
            
                  <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="cmbPersonalInfoCountry">
                        <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="cmbPersonalInfoState" />
                     </UpdatedControls>
                  </telerik:AjaxSetting>     
                 </AjaxSettings>   
                 
                 <AjaxSettings>
                        <telerik:AjaxSetting AjaxControlID="cmbCreditCardAddressCountry">
                        <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="cmbCreditCardState" />
                        </UpdatedControls>
                        </telerik:AjaxSetting>
                </AjaxSettings>                                     
                
              <AjaxSettings>
                        <telerik:AjaxSetting AjaxControlID="cmbUniversalSearchDestination">
                        <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="cmbUniversalSearchArea" />
                        </UpdatedControls>
                        </telerik:AjaxSetting>
                </AjaxSettings>    
                
                 <AjaxSettings>
                        <telerik:AjaxSetting AjaxControlID="cmbUniversalSearchArea">
                        <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="cmbUniversalSearchLocation" />
                        </UpdatedControls>
                        </telerik:AjaxSetting>
                </AjaxSettings>               
                     
                      
        </telerik:RadAjaxManager>
        
       
                            <telerik:RadAjaxLoadingPanel ID="aloadingpanelSearchGrid" runat="server" Height="75px"
                                Width="75px">
                                <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page,"Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' style="border: 0px;" />
                            </telerik:RadAjaxLoadingPanel>


in Cs Page

        /// <summary>
        /// Handling PreRender Event
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        ///
        protected void griduniversal_PreRender(object sender, System.EventArgs e)
        {
            if (!this.IsPostBack)
            {
                this.griduniversal.MasterTableView.Rebind();
            }
        }



        /// <summary>
        /// Loads the data source
        /// </summary>
        /// <param name="source"></param>
        /// <param name="e"></param>
        protected void griduniversal_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
        {
            if ((txtUniversalSearchFirstName.Text == string.Empty) && (txtUniversalSearchLastName.Text == string.Empty) && (txtUniversalSearchEmail.Text == string.Empty) && (txtUniversalSearchPostalZipCode.Text == string.Empty))
            {
                IList<ContactData> gridData = new List<ContactData>();
                gridData = contactManager.GetContact();
                this.griduniversal.DataSource = gridData;
            }
            else
            {
                SearchCriteria();

            }
        }


   protected void griduniversal_EditCommand(object sourcem, GridCommandEventArgs e)
        {
            if (e.CommandName == RadGrid.EditCommandName)
            {
                GridDataItem item = (GridDataItem)e.Item;
                string contactId = item.GetDataKeyValue("id").ToString();
                JSSessionHandler.SetSessionValue("contactId", contactId);

                switch (item.GetDataKeyValue("ContactTypeID").ToString())
                {
                    case "1":
                        griduniversal.MasterTableView.EditFormSettings.UserControlName = "~/UserControl/Renter.ascx";
                        break;
                    case "2":
                        griduniversal.MasterTableView.EditFormSettings.UserControlName = "~/UserControl/PropertyOwner.ascx";
                        break;

}

Let me know how can i solve this problem


Regards
G. Manikandan















Iana Tsolova
Telerik team
 answered on 20 Mar 2009
1 answer
166 views
Hi,

I have some troubles to set the height and the width of my RadPane/Splitter to 100% inside my iFrame. I want that my RadPane / Splitter inside my iFrame take all the place (100% width and height). This is my iFrame code :

<iframe width="100%" height="100%" scrolling="auto" frameborder="0" src=".." allowTransparency="true" ></iframe>

And this is the code I load inside of it :

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

<div style="height:100%">
<telerik:RadSplitter id="contenuProgramme" runat="server" height="100%" width="100%">
                    
    <telerik:RadPane ID="menuGauche" width="250" height="100%" runat="server">
        Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed sagittis porttitor dui. Aenean lobortis nisi sit amet dui. Cras pharetra enim semper quam. In rhoncus. Proin ultricies magna at dui imperdiet dapibus. Aliquam condimentum. Curabitur vel velit non dolor sollicitudin ullamcorper. Sed porttitor vulputate eros. In hac habitasse platea dictumst. In quis velit. Mauris pretium dui sit amet turpis.
    </telerik:RadPane>
    
    <telerik:RadSplitBar ID="barreSeparatrice" runat="server"></telerik:RadSplitBar>
    
    <telerik:RadPane runat="server" ID="contenuDroite" width="100%" height="100%">
        Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed sagittis porttitor dui. Aenean lobortis nisi sit amet dui. Cras pharetra enim semper quam. In rhoncus. Proin ultricies magna at dui imperdiet dapibus. Aliquam condimentum. Curabitur vel velit non dolor sollicitudin ullamcorper. Sed porttitor vulputate eros. In hac habitasse platea dictumst. In quis velit. Mauris pretium dui sit amet turpis.
    </telerik:RadPane>

</telerik:RadSplitter>
</div>
--------------------------------------------

Also, is it possible to take some content inside of an iFrame (a menu for example) and change his position by CSS (absolute or relative position) to set it outside of the iFrame?

Thanks
Tsvetie
Telerik team
 answered on 20 Mar 2009
2 answers
157 views
I've got a RadToolBar inside a RadToolTip (a user control loaded dynamically) which is displayed from a RadGrid (talk about vertical integration!). I want one of the buttons in the toolbar to initiate a file download. Because you can't do a Response.TransmitFile inside an UpdatePanel I need to disable Ajax for this operation but only this one button.

So far the only thing that works (although it obviously won't work for anything else) is to register the entire toolbar as a postback control with the ScriptManager. I'm guessing that the solution is a client event in RadAjaxManager but I've only been using these tools for a couple of weeks so I'm not certain what to do and where. I appreciate any help! :)
Neil
Top achievements
Rank 1
 answered on 20 Mar 2009
1 answer
91 views

Hello,

I am Not able to get RadComboBox selected item(s) from withing RadGrid template cell,
My requirement is to check, if the default value is selected(this can be 'Please Select' or anything), prompt the user with an alert message suggesting to select another valid value.

FYI I am not able use logic to get the combo box as under, since the tag it renders is a table within div
combo = gridElement.getElementsByTagName("???"); /*what tag I can use to find the combo within grid*/

 

 

Please suggest.

Regards,
Nhilesh Baua

Helen
Telerik team
 answered on 20 Mar 2009
1 answer
110 views
Hi telerik team,

I want to check valid date data before filtering before filtering, but i don't how to check it. Please, help me.

Thanks !
Daniel
Telerik team
 answered on 20 Mar 2009
0 answers
1.6K+ views
Hello,

Please find attached a ZIP containing all RadControls skins, which were embedded in the Q3 2008 version and have been migrated to be compatible with the Q1 2009 version.

There are two ways to use the attached skins as external non-embedded skins:

ASP.NET Themes

This method is useful if you need to use the skin for all controls of a specific type in the whole web application.

You need to:

                1. change the <pages> declaration in your web.config to <pages theme="SkinName"> e.g.
                               <pages theme=
"Gray">

                2. add the following lines to the <appSettings> section of your web.config:

                                <add key="Telerik.EnableEmbeddedBaseStylesheet" value="false" />

                                <add key="Telerik.EnableEmbeddedSkins" value="false" />

                               <add key="Telerik.Skin" value="SkinName"/>
                      e.g.

                               <add key="Telerik.Skin" value="Gray"/>

                3. create an ASP.NET Theme, named SkinName and add the following all files and folders from the archive:

                       Skins/ControlName.css (note that not all controls have such a file)

Skins/SkinName/*
e.g.

Skins/Menu.css
Skins/Gray/Menu.Gray.css
Skins/Gray/Menu/*.*

                               

Direct skin registration

This method is useful if you have fewer instances of a given control in your website.

You need to:

                1. set the Skin property accordingly

                2. set the EnableEmbeddedSkins and the EnableEmbeddedBaseStylesheet properties to false

                3. register the skin file using the following CSS:

    <link rel="stylesheet" type="text/css" href="~/Skins/ControlName.css" runat="server " />

<link rel="stylesheet" type="text/css" href="~/Skins/SkinName/Menu.SkinName.css" runat="server" />
e.g.

    <link rel="stylesheet" type="text/css" href="~/Skins/ Menu.css" runat="server" />

                    <link rel="stylesheet" type="text/css" href="~/Skins/Gray/Menu. Gray.css" runat="server"/>

             (note that not all controls have a ControlName.css file)

Further documentation related to skin usage is available at:

http://www.telerik.com/help/aspnet-ajax/controlling-appearance-overview.html



Telerik Admin
Top achievements
Rank 1
Iron
 asked on 20 Mar 2009
3 answers
155 views
Hello,

I'm having quite an annoying problem with Radcombobox.
Here's the scenario, very simple:

ASPX
               <telerik:RadComboBox ID="RadComboBox1" runat="server" Width="300px" Skin="Web20"  
               EmptyMessage="Choose layout..." AutoPostBack="true" HighlightTemplatedItems="True" 
               OnSelectedIndexChanged="RadComboBox1_SelectedIndexChanged"  
               AllowCustomText="true" > 
                  <ItemTemplate> 
                      <img src='<%# DataBinder.Eval(Container, "Attributes['ImagePath']") %>'  alt=""/> 
                  </ItemTemplate> 
                   <Items> 
                       <telerik:RadComboBoxItem ImagePath="../Grafica/Layout1.png" Value="Layout1"></telerik:RadComboBoxItem> 
                       <telerik:RadComboBoxItem ImagePath="../Grafica/Layout2.png" Value="Layout2"></telerik:RadComboBoxItem> 
                       <telerik:RadComboBoxItem ImagePath="../Grafica/Layout3.png" Value="Layout3"></telerik:RadComboBoxItem> 
                       <telerik:RadComboBoxItem ImagePath="../Grafica/Layout4.png" Value="Layout4"></telerik:RadComboBoxItem> 
                       <telerik:RadComboBoxItem ImagePath="../Grafica/Layout5.png" Value="Layout5"></telerik:RadComboBoxItem> 
                       <telerik:RadComboBoxItem ImagePath="../Grafica/Layout6.png" Value="Layout6"></telerik:RadComboBoxItem> 
                   </Items> 
               </telerik:RadComboBox> 
 

Code Behind
    protected void Page_Load(object sender, EventArgs e) 
    { 
        if (!Page.IsPostBack) 
        { 
            for (int i = 0; i < RadComboBox1.Items.Count; i++) 
            { 
                RadComboBox1.Items[i].DataBind(); 
            } 
        } 
    } 
    protected void RadComboBox1_SelectedIndexChanged(object o, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e) 
    { 
        string strSelectedValue = RadComboBox1.SelectedValue; 
        // other stuff 
 

I've already tried everything but I can't still get the SelectedIndexChanges event to fire when I select the first item.
Of course the problem is that the SelectedIndex at the begin is set to 0, that's the first item, but how can I change this behaviour.
Or still better, how can I get the above example to work..?

Thank you

Regards,

Paolo





Atanas Korchev
Telerik team
 answered on 20 Mar 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?