Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
68 views
When I open a new project in vs 2012 "new empty template asp" and I add radcombobox everything is fine and very little viewstate. But if I open a new project vs 2012 "new website" - No empty templat!!! and I add  radcombobox the viewstate
 very long and unusual something wrong. Why???
Nencho
Telerik team
 answered on 21 Nov 2013
5 answers
173 views
Hi,

Can you point me in the right direction on how to add a new blank row to radgrid on the client using javascript?
Here's what i have so far. Onclient button click I call a web service to insert a blank row into database,
then on success of the web service call I rebind the grid on client. Here is the code: There's also a screen shot to give you a better idea.
  function updateChanges() {
             ItemsService.AddNewItem(updateGrid());   
         }
         function updateGrid(result) {
            var masterTable = $find("<%= grdInvoiceItems.ClientID %>").get_masterTableView();
            masterTable.fireCommand("RebindGrid");
 
//             $find("<%= grdInvoiceItems.ClientID %>").get_masterTableView().rebind();
         }

Thanks,
Ron
Angel Petrov
Telerik team
 answered on 21 Nov 2013
1 answer
58 views
Hi guys,
I have a following code in my aspx page:
<telerik:RadComboBox ID="RadComboBoxStatusGrp" runat="server" Width="125px"
             Height="150px" Font-Size="Small" CssClass="txtinput" AutoPostBack="false"
             EmptyMessage="Choose a Status" ShowToggleImage="true"
              OnClientDropDownOpened="OnClientDropDownOpenedHandler">

             
      <ItemTemplate>
       <div id="div1">
       <telerik:RadTreeView runat="server" ID="RadTreeView1" OnClientNodeClicking="nodeClicking">
        <Nodes>
          <telerik:RadTreeNode runat="server" Text="All Trans" Expanded="true" >
           <Nodes>
            <telerik:RadTreeNode runat="server" Text="Approved"  >
            </telerik:RadTreeNode>
             <telerik:RadTreeNode runat="server" Text="Entered"  >
             </telerik:RadTreeNode>
                         
            </Nodes>
            </telerik:RadTreeNode>
            </Nodes>  
            <Nodes>
             <telerik:RadTreeNode runat="server" Text="Processed" ></telerik:RadTreeNode>
            </Nodes>
            <Nodes>
             <telerik:RadTreeNode runat="server" Text="All" ></telerik:RadTreeNode>
            </Nodes>  
       </telerik:RadTreeView>
       </div>
      </ItemTemplate>
      <Items>
        <telerik:RadComboBoxItem Text="" />
      </Items>
     </telerik:RadComboBox>
      <script type="text/javascript">
          var div1 = document.getElementById("div1");
          div1.onclick = StopPropagation;
            </script>
When I ran first time my application I choose node("Approved") and click on it and this node appear in the combobox, I click search button and everything is working fine but next time  I want to choose the other node("Entered") and when I click once but this node  not showing in combobox I need to click it again to get this node show in combobox.

Please help me,
Thanks
Shinu
Top achievements
Rank 2
 answered on 21 Nov 2013
1 answer
55 views
Hello,

I have multiple radgrids on a page and i'm trying to freeze left 2 columns for each.
But it works only for the first grid on the page.
Sample code is given below:
First two grids have same number of rows. Second row would have two grids similar to first row but would have less rows.
Can you please help with a sample code?
<table>
<tr>
                    <td style="width: 590px">
                        <asp:Panel ID="panelRateReport" ScrollBars="Horizontal" Width="99.8%" runat="server"
                            Height="410">
                            <telerik:RadGrid runat="server" ID="gridRate" AutoGenerateColumns="true" Height="99%"
                                Skin="Hay" GridLines="Both" OnPreRender="gridRate_PreRender" OnColumnCreated="gridRate_ColumnCreated"
                                OnItemDataBound="gridRate_ItemDataBound">
                            </telerik:RadGrid>
                        </asp:Panel>
                    </td>
                    <td style="width: 20px">
                    </td>
                    <td>
                        <asp:Panel ID="panel1" runat="server" ScrollBars="Horizontal" Width="99.8%" Height="410">
                            <telerik:RadGrid runat="server" ID="gridRateAbove10k" AutoGenerateColumns="true"
                                Height="99%" GridLines="Both" Skin="Hay" OnPreRender="gridRate_PreRender"
                                OnColumnCreated="gridRate_ColumnCreated" OnItemDataBound="gridRate_ItemDataBound">
                            </telerik:RadGrid>
                        </asp:Panel>
                    </td>
                </tr>
<tr>
....
</tr>
<table>
Princy
Top achievements
Rank 2
 answered on 21 Nov 2013
18 answers
1.8K+ views
I'm having trouble getting a required field validator attached to work with RadAsyncUpload.
I am using Peter Blum validation, but I imagine the problem is the same with basic .NET validators.

The Peter Blum RequiredTextValidator doesn't work with RadAsyncUpload.

Instead I tried a custom validator with the following client-side function:

function AsyncUploadRequiredValidation(cond) {
    var uploader = $find(cond.IDToEval);
                     
    return (uploader.getUploadedFiles().length == 0) ? 0 : 1;
}

But this code throws an exception: 'getUploadedFiles is not a function'. The $find method does find something, but none of the RadAsyncUpload's client-side functions available on the returned object.
Shinu
Top achievements
Rank 2
 answered on 21 Nov 2013
27 answers
5.7K+ views
Hello,

I am running Windows Server 2008 (IIS7) and am getting the following error:

'~/Telerik.Web.UI.WebResource.axd' is missing in web.config. RadScriptManager requires a HttpHandler registration in web.config.

I have already found information in the forum and your troubleshooting guides about moving the Telerik handler from the HttpHandler section to the system.webServer handlers area.  I have this in my web.config:

<system.webServer> 
    <handlers> 
    ...     
    <add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2008.1.415.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" 
         name="Telerik.Web.UI.WebResource"/> 
    </handlers> 
    ... 
</system.webServer> 

However, when I try to run my page that has an RadScriptManager on it, I get the error mentioned earlier.  The handler does not appear to be loading.

Any help with this would be appreciated.

Thanks,
Stephen
Kuldeep
Top achievements
Rank 1
 answered on 21 Nov 2013
7 answers
275 views
hi, i have used radgrid default filter for filtering items in grid using GridBoundColumn. now i want to export the dataset to excel format found by appying filter in columns. how to do it? please let me know.
sorry for my bad english. 
Princy
Top achievements
Rank 2
 answered on 21 Nov 2013
2 answers
246 views

Hello Telerik Support Team,


Having some issues with RadMenu control. Please have a look on code block and attached screenshots.
Issue – RadMenu items are not displayed properly in RadGrid. No idea how it’s taking grid row’s height and width. I have tried to override RadMenu css but still same issues.

Regards,

Ajit Singh

----------------  ASPX and CSS CODE-----------------------

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication6.WebForm1" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .MasterTable_Default caption {
            color: red;
            background-color:Black;
            text-align:left;
        }  
        .leftNavigatorstlye-Link
        {
            background-color:#0071bc;
            font-size: 12px;
            text-decoration: none;
            font-family: Segoe UI, Helvetica, Garuda, Arial, sans-serif;
            font-weight: bold;
            color:White;
        }
        .RadGrid_Default .rgHeader,
        .RadGrid_Default th.rgResizeCol
        {
         background:url('Grid/headers.gif') repeat-x #434343 !important;
            font-size: 12px !important;
            text-decoration: none !important;
            font-family: Segoe UI, Helvetica, Garuda, Arial, sans-serif !important;
            font-weight: bold !important;
            color:White !important;
        }
</style>
</head>
<body>
   
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div>
    <table id="maintable" runat="server" style="width:100%;border-spacing:0;border-collapse:separate;">
        <tr><td class="leftNavigatorstlye-Link">My Task</td></tr>
        <tr>
            <td>
                <telerik:RadGrid ID="RadGrid1" DataSourceID="SqlDataSource1" AllowMultiRowSelection="True"
                    runat="server" AllowSorting="True" GridLines="None" AllowPaging="True" CellSpacing="0"
                        ShowGroupPanel="True" onitemcommand="RadGrid1_ItemCommand"  >
                    <MasterTableView CommandItemDisplay="Top"  CssClass="MasterTable_Default" HeaderStyle-CssClass="rgHeader" TableLayout="Fixed" >
                        <CommandItemTemplate>
                            <asp:LinkButton ID="LinkButton6" runat="server" CommandName="Rebind">
                                <img style="border:0px; height:22px;width:22px;" alt="" src="RefreshList.gif" />
                            </asp:LinkButton>
                            <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Rebind">
                                Global Actions
                            </asp:LinkButton>
                            <br />
                        </CommandItemTemplate>
                        <Columns>
                            <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn">
                            </telerik:GridClientSelectColumn>
                            <telerik:GridTemplateColumn>
                                <ItemTemplate>
                                    <telerik:RadMenu ID="RadMenu1" runat="server" EnableRoundedCorners="true" EnableShadows="true"
                                        ExpandAnimation-Type="None" CollapseAnimation-Type="None" ExpandDelay="0" CollapseDelay="0"  >
                                        <Items>
                                            <telerik:RadMenuItem Text="Actions" Selected="false">
                                                <GroupSettings ExpandDirection="Right"  />
                                                <Items >
                                                    <telerik:RadMenuItem Text="View Process" />
                                                    <telerik:RadMenuItem Text="Cancel Task" />
                                                    <telerik:RadMenuItem Text="Reassign task" />
                                                    <telerik:RadMenuItem Text="Create Linked Work Item" />
                                                </Items>
                                            </telerik:RadMenuItem>
                                        </Items>
                                    </telerik:RadMenu>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                        </Columns>
                    </MasterTableView>
                    <ClientSettings EnableRowHoverStyle="true" AllowDragToGroup="True">
                        <Selecting AllowRowSelect="True"></Selecting>
                        <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                    </ClientSettings>
                </telerik:RadGrid>           
            </td>
        </tr>
    </table>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="SELECT [USER_NAME],[FULL_NAME],[DEPARTMENT],[EMAIL_ADDRESS],[MANAGER],[GROUP_NAME] FROM [tUsers]"></asp:SqlDataSource>
<br /><br />

</div>
    </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;
using Telerik.Web.UI;

namespace WebApplication6
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void RadGrid1_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
        {
            if (e.CommandName == "Rebind")
            {
                RadGrid1.Rebind();
            }

        }
    }
}

 

 

SHUAN
Top achievements
Rank 1
 answered on 21 Nov 2013
1 answer
118 views
Hi

How to apply the silk skin to the date picker and time picker as shown on the Telerik demos page. with silk skin(the icon, on hover highlighted in blue, rounded edges etc) as shown on Telerik demo page http://demos.telerik.com/aspnet-ajax/calendar/examples/datepicker/custompopup/defaultcs.aspx

Thanks for your input.

A2H
Top achievements
Rank 1
 answered on 21 Nov 2013
1 answer
144 views

I am using a RadGrid and want to be able to show row specific details in another item (such as a TextBox) when a row is clicked.  This is similar to the example seen in this Grid Example.  Since the Grid Example does not have details I am using the example in Grid Row Selection.  I want the selection to work like the top example, not the bottom one.  I am trying to have the JavaScript call a method in the aspx.cs page that then updates a text box, but the PageMethods.RowClick method in the code behind is static so it does not have access to TextBox1.  Is it possible to have more control in the aspx.cs page?  The first example looks to be using previously generated items that are then hidden or exposed using JavaScript.  Is that what I need to be doing?   

I basically want the user to be able to click on a row in the RadGrid and have other things on the page update immediately based on the selected row.               


//radgrid.aspx
function RadGrid1_OnRowClick(sender,eventArgs)
{
       var MasterTable = sender.get_masterTableView();
       var Name = MasterTable.getCellByColumnUniqueName(row, "Server").innerHTML;
       PageMethods.RowClick(Name);
}
 
// radgrid.aspx.cs
   [System.Web.Services.WebMethod]
    public static void RowClick(string item)
    {
        TextBox1.Text += item;
    }
Steve Lassanske
Top achievements
Rank 1
 answered on 20 Nov 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?