Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
127 views
I want to use the middle mouse button to open choosen link in new tab. The middle button works but it opens current loaded url. Not the one that is clicked by the mouse middle button.
I tried to debug it but when i press the middle button it does not fire the OnItemClicked event.
How can i fix that?
Princy
Top achievements
Rank 2
 answered on 06 Mar 2013
1 answer
139 views
Hi
     How to get the edit row index in client side on command event of radgrid. thanks for your help

Savyo
Princy
Top achievements
Rank 2
 answered on 06 Mar 2013
6 answers
230 views
I have an attachment column in my radgrid that has stopped functioning properly and I can't seem to figure out why.

                    <telerik:GridAttachmentColumn ButtonType="ImageButton" ImageUrl="~/Images/pdf_icon.gif" DataSourceID="odsLetter"  HeaderImageUrl="~/Images/pdf_icon.gif" HeaderTooltip="Download Letter"
DataTextField="FileName" AllowFiltering="false" AttachmentDataField="FileBLOB" AttachmentKeyFields="HTC_Key" FileNameTextField="FileName" UniqueName="Letter" SortExpression="LetterReleased">
                        <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle HorizontalAlign="Center" />
                    </telerik:GridAttachmentColumn>

I have the oncommand event set to run the gridCommand function to disable AJAX for the download.

<telerik:RadCodeBlock ID="RadCodeBlock2" runat="server">
    <script type="text/javascript">
<!--
        function gridCommand(sender, args) {
            if (args.get_commandName() == "DownloadAttachment") {
                var manager = $find('<%= RadAjaxManager.GetCurrent(Page).ClientID %>');
                manager.set_enableAJAX(false);
 
                setTimeout(function () {
                    manager.set_enableAJAX(true);
                }, 0);
            }
        }
 
   -->
    </script>
</telerik:RadCodeBlock>

The grid loads and displays the right filename as a tooltip over the icon when I hover with my mouse which leads me to believe that the keyfields linkage is working right.  When I click the download icon, the page does a postback and reloads the grid without downloading the file from the BLOB field.

Any ideas about why this is happening this way?

Thanks

Mike
asimptota
Top achievements
Rank 1
 answered on 06 Mar 2013
1 answer
122 views
How to export only selected rows in radgrid from external button click?
Shinu
Top achievements
Rank 2
 answered on 06 Mar 2013
7 answers
835 views
 

Folks using VS 2010 and Rad Grid controls for Ajax 2011 V.1

I am using hierarchical Master/Child Table. I would like to know how to get the row counts of detail table into a varible (say

int childRowcount) in following scenarios:

1) When Master record is selected (Without expanding)
 

2) After the update/insert in Child Table.

Thanks GC_0620
_____________



protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)  
   {  
   
       if (e.Item is GridDataItem && e.Item.OwnerTableView.Name == "MasterTable")  
       {  
           GridDataItem dataItem = (GridDataItem)e.Item;  
           // How to Get Child Table Row Count
       }  
       if (e.Item is GridDataItem && e.Item.OwnerTableView.Name == "DetailTable")  
       {  
           GridDataItem childItem = (GridDataItem)e.Item;  
           // How to Get the Child Table Row Count
         }  
   
   }  
Daniel
Telerik team
 answered on 06 Mar 2013
3 answers
105 views
how can I get the weekview to look like the monthview where it does not display the time and just stacks the appointments in order on top of each other in the same cell.
Plamen
Telerik team
 answered on 06 Mar 2013
1 answer
171 views
Hi there,

I have creates a combobox - Text with icons (http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/textwithicons/defaultvb.aspx?#qsf-demo-source)

I use the following code:
//fill radcombobox
            foreach (DataRow BrandRow in Brand.BrandTable.Rows)
            {
                RadComboBoxItem Item = new RadComboBoxItem();
                Item.Value = (string)BrandRow["Brand"];
                Item.Text = (string)BrandRow["Description"];
                Item.ImageUrl = "~/Images/Brands/" + (string)BrandRow["Brand"] + ".jpg";
                cbBrand.Items.Add(Item);
            }

The images are displayed with different height and width according to their definition.
Is their a way to set the width and height of the images automatically to 16 x 16?
 
Thanx!

Marcel
Helen
Telerik team
 answered on 06 Mar 2013
3 answers
315 views

Hello,

I have just upgraded my telerik components that I use inside our sitefinity custom controls so that I can use RadDropDownTree.

I have coded it as it is done on the demos webpage resources but only using a DataTable as DataSource .

The objects works just fine but the problem is although it recognizes and orders the elements in the correct hierarchy,

The child items does not get indented so instead of looking like this

 

+GrandParent1

 -GrandParent2

     +Parent1

     -Parent2

         +Child1
          +Child2

they look like this

+GrandParent1

-GrandParent2

 +Parent1

 -Parent2

 +Child1

 +Child2

 

There is no property in the documents and in the public properties about the “indentation of child nodes” as far as I can see.
Shouldn't indentation be the default behaviour of a dropdown tree?
I mean it's almost the whole purpose of a dropdown tree instead of a DropDownList.

Am I missing something? Or is there something missing in the documentation about this, or is there a bug?

 

IBelow are my .ascx and .cs files so that you can see for yourselves that it is not different than the example documentation.

Thank you..

-------ASCX FILE------------------

<%@ Control Language="C#" AutoEventWireup="True" CodeBehind="GenericTreeFilter.ascx.cs" Inherits="MyNameSpace.GenericTreeFilter" %>

<telerik:RadAjaxManagerProxy ID="AjaxManagerProxy1" runat="server">

    <AjaxSettings>

       

    </AjaxSettings>

</telerik:RadAjaxManagerProxy>

<style type="text/css">    

    ul.tree-list

    {

        list-style:none;

        padding:0;

        margin:0;

        height:300px;

    }

    li.tree-item

    {

        float:left;

        width:260px;

        padding: 0 10px;

        border-left: solid 1px #b1d8eb;

        height:300px;

    }

</style>

<asp:SqlDataSource ID="Data1" runat="server"

    ConnectionString="<%$ ConnectionStrings:CustomConnectionString %>"

    ProviderName="<%$ ConnectionStrings:CustomConnectionString.ProviderName %>"

    SelectCommand=""></asp:SqlDataSource>

  

        <telerik:RadSkinManager ID="QsfSkinManager" runat="server" ShowChooser="true" />

        <ul class="tree-list" style="margin-left: 100px;">

        <li class="tree-item" style="border: none">

            <asp:Label ID="FilterName" runat="server" font-names="myFont" Text="Generic Filter: "></asp:Label>

            <telerik:RadDropDownTree ID="RadDropDownTree1" runat="server"

                CheckBoxes="TriState"

                ViewStateMode="Enabled"

                Skin="Default"

                DefaultMessage="Seçiniz"

                DataFieldID="ID"

                DataFieldParentID="PARENT_ID"

                DataTextField="VALUE" 

                Width="250"      

                >               

                <DropDownSettings Width="250px"/>

            </telerik:RadDropDownTree>

        </li>

        </ul>

       

       

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

--------ascx.cs file--------------

namespace MyNameSpace

{

   

       ///<Summary>GenericTreeFilter</Summary>

       public partial class GenericTreeFilter : System.Web.UI.UserControl

       {

             .................

}

protected void Page_Load(object sender, EventArgs e)

       {

if (!IsPostBack)

{                     

                                               RadDropDownTree1.DataSource = GetTreeItems();

                    RadDropDownTree1.DataBind();

             }

       }

       public DataTable GetTreeItems()

{

             using (var connection = new OracleConnection(

                            ConfigurationManager.ConnectionStrings["CustomConnectionString"].ConnectionString))

            using (var cmd = connection.CreateCommand())

            {

            

cmd.CommandText = "select ID,PARENT_ID,PARENT_VALUE,VALUE from tblXXXXX”;

                    DataSet s = new DataSet();

                    using (OracleDataAdapter sdap = new OracleDataAdapter(cmd))

                    {

                           sdap.Fill(s);

                    }

                     connection.Close();

                     if (s.Tables.Count > 0)

                           return s.Tables[0];

else return new DataTable();

               }

        }

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

Peter Filipov
Telerik team
 answered on 06 Mar 2013
7 answers
511 views
If this is  code inserts into rad grid when in insert mode what would be the code that updates a grid when in edit mode?
Protected Sub btnAddRow_Click(sender As Object, e As EventArgs)
 
      If RadGrid4.MasterTableView.IsItemInserted Then
          RadGrid4.MasterTableView.PerformInsert()
      End If
      If RadGrid6.MasterTableView.IsItemInserted Then
          RadGrid6.MasterTableView.PerformInsert()
      End If
 
  End Sub
Kostadin
Telerik team
 answered on 06 Mar 2013
13 answers
1.0K+ views
hi 
i have RadGrid Control, popup edit template form which includes two AsyncUpload controls, a user will use those AsyncUpload controls to upload two files then a submit button will be clicked by the user to insert and submit the data, in code behind i'm checking if the file exists and if it does i'm keeping the popup template opened and show a RadAlert message tells the user that his file already existed, but the AsyncUpload controls are going back to thier default state where no file is selected, maybe i'm silly to look for this scenario but i don't want the user to get bored where he is going to reselect his files again, is there any possible way to maintain the AsyncUpload state ?

thank you 
Peter Filipov
Telerik team
 answered on 06 Mar 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?