Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
184 views
Hello,

I have a problem with RadAutoCompleteBox.EntryAdded server event. 
I use a dropdownlist to bind RadAutoCompleteBox, and set RadAjaxManager then it can be async, but it's not firing,
when I remove  RadAjaxManager's setting, back to Postback mode, it's work fine.
please help me to resolve this issue, thanks!!

aspx:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" UpdatePanelsRenderMode="Inline">
         <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="ddlRoleId">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="ddlRoleId" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
                    <telerik:AjaxUpdatedControl ControlID="racEmp"></telerik:AjaxUpdatedControl>          
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" skin="Vista"/>
 
 
<asp:DropDownList ID="ddlRoleId" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlRoleId_SelectedIndexChanged"></asp:DropDownList>  
    
       
<telerik:RadAutoCompleteBox ID="racEmp" runat="server" Width="700" DropDownWidth="300" Delimiter=";" InputType="Token" DropDownPosition="Automatic" Skin="Windows7">
</telerik:RadAutoCompleteBox>

aspx.cs:
protected void ddlRoleId_SelectedIndexChanged(object sender, EventArgs e)
    {
        RadAutoCompleteBoxEntryAdd();
    }
 
    #region RadAutoCompleteBox
    private void RadAutoCompleteBoxEntryAdd()
    {
        racEmp.Entries.Clear();
         
        String strType = ddlRoleId.Text;
        //String strType = "ITAdmin";
        Roles r = new Roles();
        Employee emp = new Employee();
        DataTable dt = r.getRoleEmpList(strType);
        //RadAjaxManager1.Alert(dt.Rows.Count.ToString());
        if (dt.Rows.Count > 0)
        {
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                String strEmpId = dt.Rows[i]["EmpId"].ToString();
                DataTable dtEmp = emp.getEmpList(strEmpId);
                String strEmpName = dtEmp.Rows[0]["EmpName"].ToString();
                racEmp.Entries.Add(new AutoCompleteBoxEntry(strEmpName, strEmpId));
                 
                //RadAjaxManager1.Alert(entry.Text);
            }
        }
 
        RadAutoCompleteBoxDataBind(racEmp, emp.getEmpList(), "ADAccount", "EmpName");
    }
    #endregion
 
 public static void RadAutoCompleteBoxDataBind(RadAutoCompleteBox rac, DataTable dtsource, String value, String text)
        {
            rac.DataSource = dtsource;
            rac.DataValueField = value;
            rac.DataTextField = text;
            //rac.DataBind();
 
             
        }
P.S My Ver 2012.2.912.35

Best regards

Nencho
Telerik team
 answered on 10 Sep 2013
1 answer
118 views
how can I make  tabstrip placement bottom ? is there something like TabStripPlacement="Bottom" (which there is in asp TabContainer)?
Princy
Top achievements
Rank 2
 answered on 10 Sep 2013
2 answers
304 views
hello , 

i want to create a radgrid with template column that have radbinaryimage as itemtemplate and radupload as edittemplate, 

uploaded images should be saved in db as byte[], 

how can i upload images and save them using item_command event ?? 
Loyal User
Top achievements
Rank 1
 answered on 10 Sep 2013
1 answer
80 views
Hi Admin,

i am facing one problem,this problem is occuring for telerik combobox in IE9,IE10(in IE8 its working fine)

Issues is-When i entered any charecter in the filtered textbox (in combobox).it is taking for the first charecter only.

when trying to enter another charecter it is clearing previous charecter and showing the currently entered one.

By this i am unable to search by the data what i want to enter.

can you please help me out of this issue. will ready to provide the extra information if needed.

Thanking you
Adityap
Nencho
Telerik team
 answered on 10 Sep 2013
1 answer
84 views
Hi All,

I have one dropdownlist of all database table names and on the selection of the table name all the data of that table are loading in Telerik Radgrid.

My Requirements are
1. Inplace edit mode.
2. If Database column type is Numeric/int/float... then I want to show RadNumeric Text box, if column type is "DateTime" then I want to show DatePicker, if Column Type is 'Varchar' then want to show textbox etc...
3. Each database table has different number of columns and different datatypes.

so anybody can tell that how can I add respective controls in edit mode based on SQL Data Type?

currently all the data are showing in the textbox in inplace editmode, can any one please help us for this scenario and tell us how can I change text box to radnumeric textbox or datepicker in gridview of InPlace Edit mode???

Thanks in Advance!

Thanks & Regards,
Kiran Patel
Antonio Stoilkov
Telerik team
 answered on 10 Sep 2013
0 answers
99 views
Hi All

I need to bind the address field of a bank name choosen in a Radcombobox of a radgrid to a next template's textbox.  My aspx code is given below.

 

 

 

 

 

 

<telerik:RadGrid ID="RGBankCash" runat="server" DataSourceID="BankDataSource"

 

 

 

 

 

GridLines="None" Skin="Vista" Width="500px" AllowPaging ="true "

 

 

 

 

 

ondeletecommand="RGBankCash_DeleteCommand" PageSize ="10"

 

 

 

 

 

oninsertcommand="RGBankCash_InsertCommand"

 

 

 

 

 

onupdatecommand="RGBankCash_UpdateCommand"

 

 

 

 

 

OnItemDataBound="RGBankCash_ItemDataBound">

 

 

 

 

 

 

 

<Columns>

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="BankKey" DataType="System.Int32"

 

 

 

 

 

 

HeaderText="BankKey" ReadOnly="True" SortExpression="BankKey"

 

 

 

 

 

 

UniqueName="BankKey" Visible="False">

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

<telerik:GridTemplateColumn DataField="BankName" FilterControlWidth="150px"

 

 

 

 

 

 

HeaderText="Bank Name" SortExpression="BankName" UniqueName="BankName">

 

 

 

 

 

 

<EditItemTemplate>

 

 

 

 

 

 

<telerik:RadComboBox ID="BankKeyRadComboBox" Runat="server"

 

 

 

 

 

 

DataSourceID="BankDS" Skin="Vista" DataTextField="BankName"

 

 

 

 

 

 

DataValueField="BankKey" SelectedValue='<%# Bind("BankKey") %>' Autopostback="true" >

 

 

 

 

 

 

</telerik:RadComboBox>

 

 

 

 

 

 

</EditItemTemplate>

 

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

 

<asp:Label ID="BankKeyLabel" runat="server"

 

 

 

 

 

 

Text='<%# Eval("BankName") %>'></asp:Label>

 

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

 

<HeaderStyle Width="250px" />

 

 

 

 

 

 

</telerik:GridTemplateColumn>

 

 

 

 

 

 

<telerik:GridTemplateColumn DataField="BankAddress" HeaderText="Bank Address" FilterControlWidth="200px"

 

 

 

 

 

 

SortExpression="BankAddress" UniqueName="BankAddress" ItemStyle-HorizontalAlign = "Center">

 

 

 

 

 

 

<EditItemTemplate>

 

 

 

 

 

 

<asp:TextBox ID="BankAddressTextBox" runat="server"

 

 

 

 

 

 

Text='<%# Bind("BankAddress") %>' Width="300px"></asp:TextBox>

 

 

 

 

 

 

<asp:RequiredFieldValidator ID="RequiredFieldValidator3"

 

 

 

 

 

 

runat="server" ErrorMessage="Please Enter Bank Address!"

 

 

 

 

 

 

Display="Dynamic" SetFocusOnError="true" ControlToValidate = "BankAddressTextBox" style="color: #FF0000">

 

 

 

 

 

 

</asp:RequiredFieldValidator>

 

 

 

 

 

 

</EditItemTemplate>

 

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

 

<asp:Label ID="BankAddressLabel" runat="server"

 

 

 

 

 

 

Text='<%# Eval("BankAddress") %>'></asp:Label>

 

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

 

<HeaderStyle Width="200px" />

 

 

 

 

 

 

<ItemStyle HorizontalAlign="Left"></ItemStyle>

 

 

 

 

 

 

</telerik:GridTemplateColumn>










 

 

 

 

 

 

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

 

 

 

 

 

ProviderName="System.Data.SqlClient"

 

 

 

 

 

DataSourceMode="DataReader"

 

 

 

 

 

onload="BankDS_Load">

 

 

 

 

 

</asp:SqlDataSource>

My Code behind is

 

 

 

 

 

protected void RGBankCash_ItemDataBound(object sender, GridItemEventArgs e)

{

 

 

 

 

 

if (e.Item is GridDataItem)

{

 

 

 

 

 

GridDataItem insertItem = (GridDataItem)e.Item;

 

 

 

 

 

RadComboBox combo = (RadComboBox)insertItem.FindControl("BankKeyRadComboBox");

combo.AutoPostBack =

 

 

 

 

 

true;

combo.SelectedIndexChanged +=

 

 

 

 

 

new RadComboBoxSelectedIndexChangedEventHandler(this.combo_SelectedIndexChanged);

}

}

 

 

 

 

 

private void combo_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)

{

}

 How to write remaining code?

 

 

 

 

 

 

 

 

 

 

Kavitha
Top achievements
Rank 1
 asked on 10 Sep 2013
4 answers
123 views
Hi Telerik team,

I have an issuew ith the grid that I can't figure out. I have a RadTabStrip with MultipPage and each has a grid in it. The grids work perfect initially when I load them through Ajax. However, when I change tabs (they are cached now), the grids lose their scrollbars! What is causing this? Also, radgrid has a default.skin file that applies styles to all grids.

 
<div >
    <telerik:RadTabStrip ID="test" AutoPostBack="true" SelectedIndex="0"
        runat="server" MultiPageID="mpTest
"
OnTabClick="test_TabClick" SkinID="MySkinID">
        <Tabs>
            <telerik:RadTab Text="tab 1" />
            <telerik:RadTab Text="tab 2" />
            <telerik:RadTab Text="tab 3" />
        </Tabs>
    </telerik:RadTabStrip>
</div>
<div>
    <telerik:RadMultiPage ID="mpTest" SelectedIndex="0" runat="server"
        OnPageViewCreated="mpTest_PageViewCreated">
    </telerik:RadMultiPage>
</div>

<telerik:RadGrid runat="server" >
    <MasterTableView ShowHeadersWhenNoRecords="False"/>
    <HeaderStyle HorizontalAlign="Left" VerticalAlign="Bottom"></HeaderStyle>  
    <ItemStyle HorizontalAlign="Left" VerticalAlign="Top"></ItemStyle>
    <AlternatingItemStyle HorizontalAlign="Left" VerticalAlign="Top"></AlternatingItemStyle>
    <ClientSettings EnableRowHoverStyle="False">
        <Scrolling AllowScroll="True" SaveScrollPosition="True" UseStaticHeaders="True" ScrollHeight="500px" />
        <Selecting AllowRowSelect="True" />
    </ClientSettings>
</telerik:RadGrid>
Venelin
Telerik team
 answered on 10 Sep 2013
1 answer
64 views
HI, Am using a pie chart where I have to show a value on chart. I am able to show the value "Value1" but not value2. How can I achieve to show both these values?

<Series>
                                            <telerik:ChartSeries Name="Series0" Type="Pie" DataYColumn="value1" DataYColumn2="value2" >
                                                <appearance legenddisplaymode="lables">
                                                    <FillStyle FillType="Solid" ">
                                                    </FillStyle>
                                                    <TextAppearance TextProperties-Color="Black">
                                                    </TextAppearance>
                                                    <Border Color="" />
                                            </appearance>
                                            </telerik:ChartSeries>
                                        </Series>

In code behind: am trying 
radchart1.Series[0].DefaultLabelValue = "#Y, #Y2";


Please help me on this.
Petar Kirov
Telerik team
 answered on 09 Sep 2013
2 answers
252 views
Hi there. I have an aspx page that initially shows a treeview. When a child node on the tree is pressed, i want a RadGrid on the page to be popualated. I set the datasource and do a databind() call but it doesn't seem to be working. I've also tried using needDataSource but it has the same problem. Here's my code:



using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using Telerik.Web.UI;
using MCMwebapp.Utilities;
 
namespace MCMwebapp
{
    public partial class frmLookupTables : System.Web.UI.Page
    {
 
 
        int CurrentDemog;
        bool LookupDataLoaded;
        bool isOPS = false;
        string selectedNode;
 
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
            
            }
             
        }
    
 
 
        protected void LookupsTree_NodeClick(object sender, Telerik.Web.UI.RadTreeNodeEventArgs e)
        {
            
            RadTreeNode currNode = e.Node;
            if (currNode.Nodes.Count == 0) {
                if (currNode.ParentNode.Text != "Treatments" && !String.IsNullOrEmpty(currNode.Text))
                {
                    selectedNode = currNode.Text;
                    Session["selectedNode"] = selectedNode;
                    loadLookupGrid();
 
                }
 
            }
            
        }
 
 
        protected void loadLookupGrid()
        {
            using (ServiceReference1.Service1SoapClient myService = new ServiceReference1.Service1SoapClient())
            {
                if (Session["selectedNode"] != null)
                {
                    LookupGrid.DataSource = myService.getTable();
                    LookupGrid.Databind();
 
                }
            }
         
 
    }
}

My aspx code:

<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="frmLookupTables.aspx.cs" Inherits="MCMwebapp.frmLookupTables" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
 
    <asp:Label ID="LookupLabel" runat="server"></asp:Label>
 
 
      <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="LookupGrid">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="LookupGrid" LoadingPanelID="TablePanel"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
 
     <telerik:RadAjaxPanel ID="TreePanel" runat="server" HorizontalAlign="NotSet" style="background-color:#808080; float:left" Width="40%">
         
 
         <telerik:RadTreeView ID="LookupsTree" runat="server" OnClientNodeClicked="ClientNodeClicked" OnNodeClick="LookupsTree_NodeClick">
           
        </telerik:RadTreeView>
 
    </telerik:RadAjaxPanel>
 
 
 
     <telerik:RadAjaxLoadingPanel ID="TablePanel" runat="server" HorizontalAlign="Right"
        style="background-color:#E92326; float:right" Width="40%" >
        
    
         <telerik:RadGrid ID="LookupGrid" runat="server" BackColor="Gray"
             BorderColor="#404040" BorderStyle="Solid" CellSpacing="0" GridLines="None"
             Skin="MetroTouch">
             
             <FilterMenu EnableImageSprites="False">
             </FilterMenu>
         </telerik:RadGrid>
      
        
     
         
     </telerik:RadAjaxLoadingPanel>
         
 
   <script type="text/javascript">
       function ClientNodeClicked(sender, eventArgs) {
           var node = eventArgs.get_node();
           node.toggle();
       }
       </script>
 
</asp:Content>

Any ideas? thanks


Will
Top achievements
Rank 1
 answered on 09 Sep 2013
5 answers
106 views
Hi!

I might have found a bug in your demo application and this bug is also haunting my application.
In the demo, found here: http://demos.telerik.com/aspnet-ajax/treeview/examples/functionality/contextmenu/defaultcs.aspx.,
you can right clikc on a node and create a new folder.

Now, if you change the default text, a postback will occure and the server side event "OnNodeEdit" will be triggered. But, if you dont change the text and just press enter, no server side event will occure and the node will not be saved.

How do I fix this?

Regards,
Per
Boyan Dimitrov
Telerik team
 answered on 09 Sep 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?