Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
86 views
My picture dropdown is requiring two tab key presses after selecting a value only in IE8 (works fine in IE7, IE9, FF, Chrome, Safari).

I've removed the client side event and commented out all of server side code in the postback event and the control still requires two tabs to leave the field after selecting a value.  If you don't change the value you can correctly tab through the field.

<telerik:RadComboBox LabelText="Occupancy:" LabelWidth="175px" Width="200px" Height="340px" DropDownWidth="260px" ID="vcbxOccupancy" OnSelectedIndexChanged="vcbxOccupancy_SelectedIndexChanged" AutoPostBack="true" OnClientSelectedIndexChanged="OccupancyType_OnChanged" runat="server" >

<ClientItemTemplate>

    <div style="font-size: 15px; font-weight: bold;">#=Text#</div>

    <div style="height: 136px; background: url(../App_Themes/common/Images/OccTypes.jpg) 0px #= Attributes.Offset #px no-repeat;"></div><br />

</ClientItemTemplate>

</telerik:RadComboBox>

 

 

 

Peter Filipov
Telerik team
 answered on 24 Jun 2013
3 answers
371 views
Hello everyone!

Tell me how to keep Insert Form Open after the commanditem event is used - check if username is not in the database so insert a new user in the database and close the form. Check If username is already in the database so keep the insert form open and change new username in the insert form. 

The InsertNewUser method is called in the CommandItem Event. 

private void InsertNewUser(GridItem gridItem)
    {
        //initizlize new object of User System
        User UserBLL = new User();
 
        //initizlize new setUser of User Info Model
        UserInfo setUserInfo = new UserInfo();
 
        //initizlize new object of PO User System Info
        POUserSystemInfo POUserSysBLL = new POUserSystemInfo();
 
        //initizlize new object of PO User Attribute Model
        POInfo setPOUserInfo = new POInfo();
 
 
        UserControl userControl = (UserControl)gridItem.FindControl(GridEditFormItem.EditFormUserControlID);
 
        RadTextBox txtfirstname = (userControl.FindControl("txtfirstname") as RadTextBox);
        RadTextBox txtlastname = (userControl.FindControl("txtlastname") as RadTextBox);
        RadTextBox txtusername = (userControl.FindControl("txtusername") as RadTextBox);
        RadTextBox txtemail = (userControl.FindControl("txtemail") as RadTextBox);
        RadMaskedTextBox txtPhone = (userControl.FindControl("txtPhone") as RadMaskedTextBox);
        RadMaskedTextBox txtExtension = (userControl.FindControl("txtExtension") as RadMaskedTextBox);
        RadMaskedTextBox txtfax = (userControl.FindControl("txtfax") as RadMaskedTextBox);
        RadTextBox txtjobtitle = (userControl.FindControl("txtjobtitle") as RadTextBox);
 
 
        RadTabStrip RadTabStrip1 = (userControl.FindControl("RadTabStrip1") as RadTabStrip);
        RadPageView RadPageView2 = (userControl.FindControl("RadPageView2") as RadPageView);
 
 
        setUserInfo.user_id = 0;
        setUserInfo.firstname = txtfirstname.Text;
        setUserInfo.lastname = txtlastname.Text;
        setUserInfo.sys_username = txtusername.Text;
        setUserInfo.jobtitle = txtjobtitle.Text;
        setUserInfo.designation = ' ';
        setUserInfo.phone = txtPhone.Text;
        setUserInfo.fax = txtfax.Text;
        setUserInfo.email = txtemail.Text;
        setUserInfo.update_date = DateTime.Now;
        setUserInfo.removed = false;
        setUserInfo.extension = txtExtension.Text;
        setUserInfo.update_date = DateTime.Now;
        setUserInfo.removed = false;
        setUserInfo.extension = txtExtension.Text;
 
        setUserInfo.update_by = 0;
 
 
        //Check if Username is not in the database.
        if (UserBLL.GetUser(txtusername.Text.Trim()) == null)
        {
            //Insert New Record to the table in the database
            int NewUserID = 0;
            NewUserID = UserBLL.RegisterUser(setUserInfo);
 
            if (NewUserID > 0)
            {
 
                //Clear ViewState and Refresh RadGrid Control
                ViewState["Users"] = null;
                rgUsersMain.Rebind();
 
                gridItem.OwnerTableView.IsItemInserted = false;
                Edit = true;
                EditItemIndex = rgUsersMain.Items.Count - 1;
                Session["IsNewUser"] = true;
                Session["rgNewUserID"] = NewUserID;
            }
        }
        else
        {
 
            //Keep Insert Form Open
 
            GridEditableItem edititem = (GridEditableItem)gridItem;
            gridItem.OwnerTableView.IsItemInserted = true;
            rgUsersMain.MasterTableView.InsertItem();
            //rgUsersMain.Rebind();
 
            RadWindowManager1.RadAlert("User Already Exists", 330, 180, "Server RadAlert", "", "");
        }
 
 
    }
                //Clear ViewState and Refresh RadGrid Control
                ViewState["Users"] = null;
                rgUsersMain.Rebind();
 
                gridItem.OwnerTableView.IsItemInserted = false;
                Edit = true;
                EditItemIndex = rgUsersMain.Items.Count - 1;
                Session["IsNewUser"] = true;
                Session["rgNewUserID"] = NewUserID;
            }
        }
        else
        {
 
            //Keep Insert Form Open
 
            GridEditableItem edititem = (GridEditableItem)gridItem;
            gridItem.OwnerTableView.IsItemInserted = true;
            rgUsersMain.MasterTableView.InsertItem();
            //rgUsersMain.Rebind();
 
            RadWindowManager1.RadAlert("User Already Exists", 330, 180, "Server RadAlert", "", "");
        }

Kostadin
Telerik team
 answered on 24 Jun 2013
1 answer
224 views
Hi,
         I tried to upload multiple files with async upload rad control.But it upload only the first file and the rest of the files are not uploaded.
Please give me the solution.

My Code:
In .Cs page:
             protected void RadAsyncUpload1_FileUploaded(object sender, FileUploadedEventArgs e)
        {
            UploadedFile file = RadAsyncUpload1.UploadedFiles[0];
            string s = file.FileName;
            string path = Path.GetFileName(s);
            string targetfolder = RadAsyncUpload1.TargetFolder;
            e.File.SaveAs(Server.MapPath(targetfolder + e.File.FileName));
           
}
In .aspx page:
                <telerik:RadAsyncUpload runat="server" ID="RadAsyncUpload1" overwriteexistingfiles="true"  TargetFolder ="~/uploadattachment/" AllowedFileExtensions=".pdf,.doc,.docx,.txt"
                              MaxFileSize="524288"  
                              Skin="Simple" MultipleFileSelection="Automatic" 
                                UploadedFilesRendering="BelowFileInput" ChunkSize="0" 
                                onfileuploaded="RadAsyncUpload1_FileUploaded">
                         </telerik:RadAsyncUpload>

        
                        
Shinu
Top achievements
Rank 2
 answered on 24 Jun 2013
3 answers
109 views
I need to have 2 charts (one on top of the other) and I also need to use the zoom feature. Is there any client events for RadChart I can use to synchronize both charts when the user zoom or scroll the content in the X-Axis (date/time axis)?

Thanks
Yavor
Telerik team
 answered on 24 Jun 2013
1 answer
89 views
In this bar chart, some of the labels aren't lining up correctly. What can I do fix this?
Nikolay
Telerik team
 answered on 24 Jun 2013
1 answer
110 views
Hi,

I am using RadControls for ASP.NET AJAX Q1 2012 (2012.1.215.35) to display data in a radgrid. The text box next to the Page size is out of shape. I have attached the screenshot of the issue and also the sample code.

<telerik:RadGrid ID="RadGrid1" runat="server" Skin="Office2007" AutoGenerateColumns="false"
    AllowPaging="true" PageSize="10" AllowMultiRowSelection="false" OnNeedDataSource="RadGridNeedDataSource"
     OnItemCommand="RadGridItemCommand"  AllowSorting="true">
        <PagerStyle Mode="NextPrevNumericAndAdvanced" PageButtonCount="2"/>
        <MasterTableView DataKeyNames="DKN1" CommandItemDisplay="None">
            <Columns>
                <telerik:GridButtonColumn ButtonType="ImageButton" ImageUrl="~/images/Assign.jpg"
                    HeaderText="" DataTextField="DF1" CommandName="Select" UniqueName="U1">
                    <ItemStyle HorizontalAlign="Left" Width="20px" />
                </telerik:GridButtonColumn>
                <telerik:GridBoundColumn DataField="DF2" HeaderText="HT2" UniqueName="U2" Visible="False">
                    <ItemStyle Width="30px" HorizontalAlign="Left" />
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="DF3" HeaderText="HT3" UniqueName="U3" AllowFiltering ="true" FilterControlWidth="120px" >
                    <ItemStyle Width="260px" HorizontalAlign="Left" />
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="DF4" HeaderText="HT4" UniqueName="U4" AllowFiltering="true" FilterControlWidth ="120px">
                    <ItemStyle Width="250px" HorizontalAlign="Left" />
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="DF5" HeaderText="HT5" UniqueName="U5"
                    Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="DF6" HeaderText="HT6" UniqueName="U6">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="DF7" HeaderText="FH7" UniqueName="U7" AllowFiltering="true" FilterControlWidth ="40px">
                    <ItemStyle Width="70px" HorizontalAlign="Left" />
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="DF8" HeaderText="HT8" UniqueName="U8" DataFormatString="{0 :d}" AllowFiltering="true" FilterControlWidth ="27px">
                    <ItemStyle Width="70px" HorizontalAlign="Left" />
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="DF9" HeaderText="HT9" UniqueName="U9" DataFormatString="{0 :d}" AllowFiltering="true" FilterControlWidth ="27px">
                    <ItemStyle Width="70px" HorizontalAlign="Left" />
                </telerik:GridBoundColumn>
            </Columns>
            <ExpandCollapseColumn>
                <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn> 
        </MasterTableView>
    <ClientSettings EnableRowHoverStyle="true" />
        <FilterMenu>
            <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
        </FilterMenu>
    </telerik:RadGrid>


Eyup
Telerik team
 answered on 24 Jun 2013
1 answer
122 views
Hi,

We are using demon version for Telerik ASP.NET AJAX. We see that Pivot grid tool not coming in the Rad toolbox. Is this feature not available  for demo version? Kindly update.

Regards
Purojit
Angel Petrov
Telerik team
 answered on 24 Jun 2013
1 answer
86 views
Hi,

We are not getting page-breaks while exporting to xls/csv/doc from Radgrid. We r are getting this only in pdf export from rad grid. Is the feature available?
Kindly let us know.

Thanks
Purojit
Kostadin
Telerik team
 answered on 24 Jun 2013
4 answers
343 views
Dear Telerik,

at the moment we experience an odd behaviour with the RadNumericTextBox component (version 2013.403.35).
In some situations the value on the server is lost. The situation is as following: we have a page with several controls, divided over different (multi)views. One view contains a grid, another view our inputform. The inputform consists of several controls, including a save button.
One such control is the RadNumericTextBox, with type=currency.

When a user enters a value in the box, and also presses the [enter] key, the following happens:
- client side nothing seems to happen, the cursor stays in the textbox (currency character does not show (yet) because the textbox still has the focus. Also form submit on enter has been disabled somehow, I think due another control on the page, like a grid. But this is ok :).
- once the user presses the save button, the value on the server seems to be lost. The value of the box is null.
- after the postback, on the client the value is lost as well

Our problem occurs in both IE and FF browser. I've been able to reproduce the problem in a small example project, but this only does display the behaviour in FF and not IE. But I think it is still a good lead to start with? I suspect it has something to do with the form not submitting, and the way it is prevented. See below for some example code. If you need the whole project, I can provide it.

The project is a simple webforms project with 1 page, Default.aspx:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
 
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
</head>
<body onkeydown="return (event.keyCode!=13)">
    <form id="form1" runat="server">
        <telerik:RadScriptManager runat="server" ID="RadScriptManager1"></telerik:RadScriptManager>
        <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1"></telerik:RadAjaxManager>
        <telerik:RadNumericTextBox runat="server" ID="RadNumericTextBox1" Type="Currency"></telerik:RadNumericTextBox>
        <asp:Button runat="server" ID="btnNoPostback" UseSubmitBehavior="false" Text="Save" OnClick="btnNoPostback_Click" />
    </form>
</body>
</html>

Code behind:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
 
    }
    protected void btnNoPostback_Click(object sender, EventArgs e)
    {
        RadAjaxManager1.Alert(string.Format("Button save clicked, value of RadNumericTextbox 1 is: {0}", RadNumericTextBox1.Value));
    }
}

To reproduce:
- run project in FireFox
- enter a value in the textbox, and press the [enter] key
- press the save button to show the value

Thanks in advance.






Frank Beerens
Top achievements
Rank 1
 answered on 24 Jun 2013
2 answers
96 views
Hello Sir/Madam,

In my project i am using PAID telerik skin dll and telerik controls but in telerik skin it showing error on run time (you can see that error in my screen shot) but i have one problem and that is its showing this error on some system and some system run properly and i currently i am using visual studio 2012 So please tell me solution asasp beacuse i have to respond to my client.

Thanks And regrads
sunny
Andrey
Telerik team
 answered on 24 Jun 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?