Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
638 views
HI,
I have the rad grid in which i have the edit item template. The aspx is as follows:
<telerik:RadGrid ID="radgrid1" runat="server" 
        EnableViewState="true" ShowStatusBar="true" AllowAutomaticUpdates="false"
        ShowFooter="True" 
        OnInsertCommand="radgrid1_InsertCommand" OnUpdateCommand="radgrid1_UpdateCommand"
        OnNeedDataSource="radgrid1_NeedDataSource"  >
        <MasterTableView DataKeyNames="ProductNumber" AutoGenerateColumns="false" EditMode="InPlace"
            CommandItemDisplay="TopAndBottom" CommandItemSettings-AddNewRecordText="Add New Purchase Order">           
            <Columns>
                <telerik:GridEditCommandColumn ButtonType="ImageButton">
                </telerik:GridEditCommandColumn>
                <telerik:GridButtonColumn ConfirmText="Delete this product?" ConfirmDialogType="RadWindow"
                    ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" ConfirmDialogHeight="100px"
                    ConfirmDialogWidth="220px">
                </telerik:GridButtonColumn>
                  
<telerik:GridTemplateColumn DataField="ProductNumber" HeaderText="Product Number" UniqueName="ProductNumber"
                    Visible="true">
                    <InsertItemTemplate>
                        <telerik:RadTextBox ID="RadtxtPrdNumber" runat="server" Text="">
                        </telerik:RadTextBox>
                    </InsertItemTemplate>
  
<EditItemTemplate>
<telerik:RadTextBox ID="RadtxtPrdNumber" runat="server" Text='<%# Eval("ProductNumber") %>'>
</telerik:RadTextBox>
</EditItemTemplate>
  
                    <ItemTemplate>
<telerik:RadTextBox ID="RadtxtPrdNumber" ReadOnly="true" runat="server" Text='<%# Eval("ProductNumber") %>' />
                    </ItemTemplate>
                </telerik:GridTemplateColumn>

In the update command, i am trying to access the column as below:
GridEditableItem editedItem = e.Item as GridEditableItem;
               //Get the primary key value using the DataKeyValue.      
               string ProductID = editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["ProductNumber"].ToString();
               //Access the textbox from the edit form template and store the values in string variables.   
               string strProductNumbervalue = (editedItem["RadtxtPrdNumber"].Controls[0] as RadTextBox).Text;

I am getting the error as "Cannot find a cell bound to column name 'RadtxtPrdNumber', when the code hits "string strProductNumbervalue".
How to fix this?
Thanks
Shinu
Top achievements
Rank 2
 answered on 11 Dec 2012
3 answers
97 views
HI,

I have added the radgrid and have the insert command. I do not have the ajax added to the page. when a new item is added, item.extractvalues count is empty. How to retrieve the inserted values.
Below is the current code:
<telerik:RadGrid ID="radgrid1" runat="server" EnableViewState="true"
        ShowFooter="True" 
        OnInsertCommand="radgrid1_InsertCommand" 
        OnNeedDataSource="radgrid1_NeedDataSource">
  
        <MasterTableView DataKeyNames="ProductNumber" AutoGenerateColumns="false" EditMode="InPlace"
            CommandItemDisplay="TopAndBottom" CommandItemSettings-AddNewRecordText="Add New Item">           
            <Columns>
                <telerik:GridEditCommandColumn ButtonType="ImageButton">
                </telerik:GridEditCommandColumn>
                <telerik:GridButtonColumn ConfirmText="Delete this product?" ConfirmDialogType="RadWindow"
                    ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" ConfirmDialogHeight="100px"
                    ConfirmDialogWidth="220px">
                </telerik:GridButtonColumn>
                  
                <telerik:GridTemplateColumn DataField="ProductNumber" HeaderText="Product Number" UniqueName="ProductNumber"
                    Visible="true">
                    <InsertItemTemplate>
                        <telerik:RadTextBox ID="RadtxtPrdNumber" runat="server" Text="">
                        </telerik:RadTextBox>
                    </InsertItemTemplate>
                    <EditItemTemplate>
                        <telerik:RadTextBox ID="RadtxtPrdNumber" runat="server" Text="">
                        </telerik:RadTextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <telerik:RadTextBox ID="RadtxtPrdNumber" ReadOnly="true" runat="server" Text="" />
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
  
</Columns>
        </MasterTableView>
        <ClientSettings EnableRowHoverStyle="true">
        </ClientSettings>
    </telerik:RadGrid>

protected void radgrid1_InsertCommand(object sender, GridCommandEventArgs e)
        {
              
                GridEditableItem item = e.Item as GridEditableItem;
                Hashtable values = new Hashtable();
                 
                item.ExtractValues(values);
  
}

How to fix this?
Thanks
Shinu
Top achievements
Rank 2
 answered on 11 Dec 2012
1 answer
142 views

I have 2 radMonthYearPicker(1 is for start Date another 1 is for end Date) I want to calculate the month different between this 2 date.

for my start Date, I set my month as oct and year 2012. for my end Date, I set my month as dec and year 2013

Base on this 2 RadMonthYearPicker, the month apart should be 14 month

The only code I can find out is RadMonthYearPicker.selectedDate

Princy
Top achievements
Rank 2
 answered on 11 Dec 2012
2 answers
105 views
Is there a page where I can look up what browsers and versions each major version of the controls supports?
Neil N
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 11 Dec 2012
2 answers
53 views
Background:  We've recently started receiving complaints from our users about very slow page load times on our web applications using Telerik controls in IE9.  After extensive troubleshooting,  we determined that the cause of the slow down was Symantec's IE add-on, Intrusion Prevention or Vulnerability Protection (depending on which version of the SEP client you're running).  When we disabled the add-on, page load times were instantaneous and when we re-enabled the add-on, page load times shot up to a very unacceptable 12-14 seconds.

I decided to run IE's profiler to determine what exactly was causing this slow down.  The load times for every Telerik script was about 10 times slower when the add-on was enabled than when it was disabled. 

Workaround Identified:  Since this slow down appeared to be directly related to the Telerik scripts, I decided to start toying around with the RadScriptManager's attributes.  As it turns out, setting EnableScriptCombine to false has resolved the issue and page load times are now back to instantaneous.

The idea of combining scripts into one to cut down on network traffic is great and I would like to be able to use that feature again someday which is why I am reporting this problem to you.  Hopefully, you can identify why the combined scripts aren't playing nice with the Symantec Intrusion Prevention add-on in IE9, but at least there is a workaround for now.
Christopher St. Clair
Top achievements
Rank 1
 answered on 10 Dec 2012
1 answer
130 views
i have a radgrid with one nested view. the nested view's edit mode is popup. the edit form type is template. how do i access a radComboBox control inside of the template using javascript?
Alex
Top achievements
Rank 2
 answered on 10 Dec 2012
1 answer
138 views
hi,

I have created something like below given example

<telerik:Radsplitter ID="RadSplitter1" runat="server" Height ="660px" Width ="100%" >
        <telerik:RadPane ID="LeftPane" runat="server" Scrolling="none">
            <telerik:RadSlidingZone ID="SlidingZone1" runat="server">
                <telerik:RadSlidingPane ID="RadSlidingPane1" Scrolling="Both" DockText="Filters" Title="Filters" runat="server"  >
               ................................
               </telerik:RadSlidingPane>
</telerik:RadPane>
        <telerik:RadSplitBar ID="Radsplitbar1" runat="server">
        </telerik:RadSplitBar>
        <telerik:RadPane ID="MiddlePane1" Scrolling="none" runat="server" Width ="100%" Height="100%">
<table id="mainTable" cellpadding="0" cellspacing="0" width="100%" style="height: 100%;width:100%;">
............. MAIN CONTENT (some control)
</tr>
    </table>               
            </telerik:RadPane>           
            </telerik:Radsplitter>

when i run this, and dock the RadSlidingPane the main content crosses the width and height of the MiddlePane1 as i have given scrolling="none" in MiddlePane1, it looks like the main content is inside the MiddlePane1 and as the scrolling is none i cant even reach to other part of main content,

I would like to see the content in the Middlepane1 to adjust the screen as i dock the RadSlidingPane. 3

Note:on a first hand i felt that should be because of controls inside MiddlePanel1 but as i would do some event changes i would see the main content adjusting with Middlepanel1 and entire screen fits fine, for your note i have given 100% to all the controls width
Vessy
Telerik team
 answered on 10 Dec 2012
2 answers
1.0K+ views
Hi,

I am writing some code in the update command (ie. RadGrid1_UpdateCommand) and I want to retrieve the current row index (selected row) from the radgrid. How do I achieve this?


Thanks,
Swamy

 
Mahadevan
Top achievements
Rank 1
 answered on 10 Dec 2012
2 answers
162 views
I combined the Dock/Dock Resizing example (http://demos.telerik.com/aspnet-ajax/dock/examples/dockresize/defaultcs.aspx) with the splitters and sliding panes (and styles) from our application.  When I open the sliding pane and unpin, I can move the slider bar horizontally.  The dock automatically adjusts its width to match.  If I resize the dock vertically, then resize the splitter horizontally, the dock width remain fixed.  By double-clicking the dock title bar, the dock snaps to the splitter bar width.  Is there event handling or attribute that would mimic this behavior(without having to double click the title bar)?

(Note: The RadDockZone MinHeight attribute percentage vs pixel behaves differently in our application than in this example.  In some cases the dock will fill the zone and resizing vertically will resize both dock and zone so you can only make the dock smaller but not larger.)

<%@ Page Language="C#" AutoEventWireup="true" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns='http://www.w3.org/1999/xhtml' style="height: 100%; width: 100%">
    <head>
        <title>ASP.NET Dock Demo - Dock Resizing</title>
    </head>
    <body style="height: 100%; margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px;">
        <form id="form1" runat="server" style="height: 100%; width: 100%">
            <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
            <telerik:RadSkinManager ID="QsfSkinManager" runat="server" ShowChooser="true" />
            <telerik:RadFormDecorator ID="QsfFromDecorator" runat="server" DecoratedControls="All" EnableRoundedCorners="false" />
            <div style="height: 100%; width: 100%;">
                <telerik:RadSplitter ID="RadSplitter1" runat="server" Height="100%" Width="100%">
                    <telerik:RadPane ID="RadPane1" runat="server" Height="100%" Width="20px">
                        <telerik:RadSlidingZone ID="RadSlidingZone1" runat="server">
                            <telerik:RadSlidingPane ID="PrimarySlidePane" runat="server" Height="100%" Width="20%" Title="RadSlidingPane">
                                <telerik:RadDockLayout ID="RadDockLayout1" runat="server">
                                    <div>
                                        <telerik:RadDockZone ID="RadDockZone1" runat="server" MinHeight="400px" MinWidth="50px">
                                            <telerik:RadDock ID="RadDock1" runat="server" Title="RadDock1" Height="50px" Width="50px" Resizable="true"
                                                             Text="RadDock is placed in a <strong>vertically</strong> oriented RadDockZone. Grab the bottom handle to resize the dock vertically. Horizontal resizing is not allowed.">
                                            </telerik:RadDock>
                                        </telerik:RadDockZone>
                                    </div>
                                </telerik:RadDockLayout>
                            </telerik:RadSlidingPane>
                        </telerik:RadSlidingZone>
                    </telerik:RadPane>
 
                    <telerik:RadSplitBar runat="server" />
 
                    <telerik:RadPane ID="RadPane3" runat="server">
                        <div id="Viewport" style="height: 100%;">
                            <br/>
                        </div>
                    </telerik:RadPane>             
                </telerik:RadSplitter>
                <telerik:RadDock ID="RadDock2" runat="server" Title="RadDock2" Top="230px" Left="850px"
                                 Width="300px" Resizable="true" Text="Grab the right, the bottom or the left handle to resize the dock, when it is not placed in a docking zone.">
                </telerik:RadDock>
                <%--                <asp:Button ID="Button1" runat="server" Text="Make postback"></asp:Button>--%>
            </div>
        </form>
    </body>
</html>
Tom
Top achievements
Rank 1
 answered on 10 Dec 2012
1 answer
50 views
Hi 

I am using this version Telerik.Web.UI_2012_2_724_Dev_hotfix

I have an error when implement FormDecorator.

I attached the image, all controls implement rounder coners and mouse over color, but Radmaskedtextbox no.

How I can fix this?


July
Top achievements
Rank 2
 answered on 10 Dec 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?