Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
178 views

Hi
My work includes design a  web application with RadGrid Control.
Earlier the Grid implementation was done using Infragistics.

The application contains a column of type 'GridTemplateColumn' with 4 different images to perform edit(1), delete(2) and redirections(3,4).
On clicking the edit image, the grid should show a pop-up form to edit the current row.

I havent been able to find any code in your samples section to do this.
Here is the snippet of my code for reference.
<%@ Register TagPrefix="telerik" Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" %>
<!--script -->
     <script language="javascript" type="text/javascript"
            function showEditPopup(gridName)
            {              
                    __doPostBack(gridName,'');
            }
     </script>
<!--grid code-->
<telerik:RadGrid ID="grdWatches" Skin="MyCustomSkin" runat="server" EnableViewState="true"
    EnableEmbeddedSkins="false" GridLines="Both" ShowFooter="false"
    AutoGenerateColumns="False" VirtualItemCount="50000"
    HorizontalAlign="Left" PageSize="5"
    AllowSorting="True" AllowPaging="True"
    OnNeedDataSource="grdWatches_InitializeDataSource" OnUpdateCommand="grdWatches_UpdateCommand">
    <itemstyle wrap="true" verticalalign="Top" />
    <headerstyle wrap="True" verticalalign="Middle" horizontalalign="Center" />
    <footerstyle wrap="True" />
    <alternatingitemstyle wrap="True" verticalalign="Top" />
    <PagerStyle AlwaysVisible="true" Mode="NextPrevAndNumeric" />
    <mastertableview name="vwCaseWatches" commanditemdisplay="None" allowcustomsorting="false" allownaturalsort="false" EditMode="PopUp"
    allowsorting="true" DataKeyNames="WatchID">
      <Columns>
        <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" EditImageUrl="~/images/editwatch.gif" visible="true" >
        </telerik:GridEditCommandColumn>
        <telerik:GridTemplateColumn HeaderText="Manage" UniqueName="TemplateColumn1">
            <ItemTemplate>
            <table class="customTable">        
                <tr>
                <td align=center>
                    <asp:imagebutton id="btnUpdate" ImageUrl="~/images/editwatch.gif" style="color:green;" runat="server"
                    commandname="Update"></asp:imagebutton>
                </td>    
                <td align="center">                  
                    <a href="showEditPopup('<%=grdCaseWatches.ClientID%>')">
                    <img SRC='images/editWatch.gif' border="0" width="23" height="23" title='Edit Watch'>
                    </a>
                </td>
                <td align="center">                  
                    <a href='#'>
                    <img SRC='images/Delete.gif' border="0" width="23" height="23"  title='Delete'
                        onclick="ShowModalPopUp('<%# Container.DataItem("WatchID")%>', '<%# Container.DataItem("STATUSDESCRIPTION")%>')">
                    </a>
                </td>
                <td align="center">                  
                    <a href='~/InformParty.aspx?Watch= <%# Container.DataItem("WatchID")%>'>
                    <img SRC='images/listview.gif' border="0" width="17" height="17" title='View InformParty'/>
                    </a>
                </td>
                <td align="center">                  
                    <a href='~/DoTransact.aspx?Watch=<%# Container.DataItem("WatchID")%>'>
                    <img SRC='images/DollarSymbol.gif' border="0" width="16" height="16" title='View Charges'/>
                    </a>
                </td>
                </tr>
            </table>   
            </ItemTemplate>
        </telerik:GridTemplateColumn>
    </Columns>
    <EditFormSettings InsertCaption="Edit Case Details" CaptionFormatString="<b>Case Name:</b>"
        EditFormType="Template"  PopUpSettings-Modal="true" >
        <FormTemplate>
        <asp:RequiredFieldValidator ID="rfvannotation" runat ="server" Text ="Please enter the Case Name."
            EnableClientScript ="true" ControlToValidate ="txtCaseName" ValidationGroup ="rvfAnnotation"
            Display ="Dynamic">
        </asp:RequiredFieldValidator>
        <table id="Table1" cellspacing="1" cellpadding="1" border="0" width="250">
            <tr>
            <td>
                <b>Case Name:</b>
            </td>
            <td>
                <asp:TextBox ID="txtCaseName" runat="server" Text='<%# Bind("Case_Name") %>'>
                </asp:TextBox>
            </td>
            </tr>
            <tr>
            <td>
                FILE NUM:
            </td>
            <td>
                <asp:TextBox ID="txtClientMatter" runat="server" Text='<%# Bind("FILENO") %>' TabIndex="1">
                </asp:TextBox>
            </td>
            </tr>
        </table>
        <table style="width: 100%">
            <tr>
            <td align="left">
                <asp:Button ID="Button1" Text='<%# Iif (TypeOf Container is GridEditFormInsertItem, "Insert", "Update") %>'
                runat="server" CommandName='<%# Iif (TypeOf Container is GridEditFormInsertItem, "PerformInsert", "Update") %>'>
                </asp:Button
                <asp:Button ID="Button2" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel">
                </asp:Button>
            </td>
            </tr>
        </table>
        </FormTemplate>
    </EditFormSettings>
     </mastertableview>
</telerik:RadGrid>
<!--misc code-->
    You can notice that:
    Firstly,clicking the edit image invokes the javascript function showEditPopup()
    that would bring up the popup form - THIS IS NOT WORKING AS I M UNABLE to pass the appropriate Control ID to be used for popping up the FormControl.

    Second,I am able to successfully popup the Edit form using GridEditCommandColumn. But I am trying to avoid this as it would mean moving the edit image to a separate column.

    I am looking forward to suitable suggestion to solve my purpose and affirm the choice of Telerik as the right development tool.
    thanks
    Kumar.

Kumar
Top achievements
Rank 1
 answered on 27 Jul 2010
7 answers
160 views
Is anyone using the colorpicker control in an update panel and having issue with how it renders? I have it in a RadAjaxPanel so that I can hide and show it whan a specific radio button is selected. If the page loads with it in the hidden state and then it is set to visible in an ajax postback it render really large in firefox. After it hides and shows again on the postback it looks correct. I had seen this a couple of times on IE but it hasn't happened on that browser since I updated the program to the 2009 Q3 release. It is consistantly doing it on Firefox.

Image attached
Tsvetie
Telerik team
 answered on 27 Jul 2010
2 answers
186 views
I have a rating control in a ListView, used for display only.  ViewState is disabled.  When the ListView is databound, the rating control doesn't update to the new values.  This doesn't appear to be a client cache issue as the generated HTML is still at the old values as well.  you can see in the attached tooltip the value is correct, but the display is wrong.

Here is the code in the ListView ItemTemplate:

<telerik:RadRating runat="server" ID="rating" Value='<%# Eval("Score") %>' ReadOnly="true" Skin="Default"  Precision="Exact" EnableToolTips="false"/>
<telerik:RadToolTip runat="server" TargetControlID="rating" Text='<%# Eval("Score","{0:#.##} / 5.0 - ") + Eval("votes","{0:n0} votes") %>' Skin="Sunset" />

You can see this at *removed* (please don't pass around this link as the site is still in development ;) ).  If you change the sort order, the rating controls will not reflect the new values, however clicking a paging link which changes the URL will update the rating control.
ViNull
Top achievements
Rank 1
 answered on 27 Jul 2010
3 answers
196 views

If I copy "日本語" from a rich text editor (e.g. Character Map, Wordpad) and paste it into a RadEditor, the following is pasted instead:

Z

If I paste it into a plain text editor (e.g. Notepad), re-copy, and paste into a RadEditor, it pastes correctly. I have observed this under XP and Vista IE7, and Win7 IE8. It works ok in Firefox and Safari. I used your demo page at http://demos.telerik.com/aspnet-ajax/editor/examples/default/defaultcs.aspx to confirm the issue.

Rumen
Telerik team
 answered on 27 Jul 2010
1 answer
102 views

This is My ClientSide code ,I am planing to sort the Tree items using MoveUp and move down option in Context menu

function RadTreeView1_ClientContextMenuItemClick(sender, eventArgs) {
            //to get the direction
            var Direction = eventArgs._menuItem.get_text();
            //to get the position clicked
            var Index = eventArgs._node.get_index();
            //to get the lenght of the tree node
            var length = eventArgs._node._parent._children._array.length;
            //to get all siblings
            var nodes = eventArgs._node._parent._children._array;
            var counter;

            if (Direction == "Move Up") {
                temp = eventArgs._node.get_text();
                eventArgs._node.set_text(eventArgs._node.get_previousSibling().get_text());
                eventArgs._node.get_previousSibling().set_text(temp)
            }
            else if (Direction == "Move Down") {
                temp = eventArgs._node.get_text();
                eventArgs._node.set_text(eventArgs._node.get_nextSibling().get_text());
                eventArgs._node.get_nextSibling().set_text(temp)
            }
            eventArgs._node.get_treeView().commitChanges(); 
             var tree = document.getElementById("ctl00_TreeContentPlaceHolder_RadPanelBar1_i0_RadTreeView1");
             tree.commitChanges();
           
      }

Move up and down is achived in the code but still i can not able to retain the sorted order of the Treeview using the code
In tree object i can not able to find any method like commitChanges()
it thoroughs an error says it can not contain any method,
please help me out to complete the task as soon as possible,this is urgent.
Thanks in advance





Veronica
Telerik team
 answered on 27 Jul 2010
1 answer
39 views
Dear All,

I am facing problem for performane. I am using grid for my each webpage. Add new record,Edit,cancel and paging taking more than 2 sec,how to reduce this time.If u can send me best practice for grid,my application will respone faster.......

best rgds
Azeheruddin khan
Maria Ilieva
Telerik team
 answered on 27 Jul 2010
5 answers
187 views
Hi guys,

If I want to databound rotator with a datasource, does it pre-load all of the item and then render all the data to the client? If so, does it slow down then page loading on client side because all of the record is pre-loaded? Thx.
Pero
Telerik team
 answered on 27 Jul 2010
2 answers
114 views
Hi,

I have changed my RadEditor's content to ContentAreaMode="Div" because Iframe was causing a few problems for me.
All is working ok, but the context menu's appear not in the right places, almost allways at the top of the page.
I think that is has to do with the context menu css that says position: absolute; and absolute position is to the last element that has relative or absolute position, no?

Here Is the RadEditor Declaration:

 

 

 

<telerik:RadEditor ContentAreaMode="Div" ExternalDialogsPath="~/EditorDialogs/" ID="txtSmallDescription" Runat="server" Height="350px" Width="680px" EnableResize="false" Skin="Windows7" MaxTextLength="150" ContentAreaCssFile="~/Style/EditorContentArea_RTL.css" StripFormattingOptions="All"
  <CssFiles
    <telerik:EditorCssFile Value="~/Style/EditEvent.css" /> 
  </CssFiles
  <Content></Content
</telerik:RadEditor>


Best Regards,
Guy

 

 

 

 

 

 

 

 

 

KinGuy
Top achievements
Rank 2
 answered on 27 Jul 2010
1 answer
228 views
Hello,
Is there a way to use the ajaxloading panel with a regular update panel?
The reason I want to do this is because I work with dundas charts and for some reason, these charts don't get painted if they have a scroll bar while they're inside an ajaxloading panel. they do work while inside a regular update panel though... (I asked why it happens on the dundas forums)

But I still want to work with the RadAjaxLoading pane because the rest of my website does. any way to trigger it on the update panel callback event?

Thanks in advanced.
Cori
Top achievements
Rank 2
 answered on 27 Jul 2010
3 answers
184 views
I have an "Explorer" style page with a treeview in the left pane and a detail pane on the right. I have quite a bit of functionality in the page, and it all seems to be working well, except for one scenario that I am trying to get to work.

The information in the Detail pane is created using XSLT. Some of the information is in the form of hyperlinks. I am using the onclick event of the anchor tags to trigger an event in javascript that will load the target information sent by the anchor into the detail pane. So, when the user clicks a hyperlink in the detail pane, the new page will load in the detail pane. I am using the onclick event to do this because controls created via Javascript cannot fire the server side events.

Anyway, all my code is working correctly. When the hyperlink is clicked, the javascript event fires and calls the explicitCallBack code in my example below. That code calls back to the server, and my server code calls to the database, gets the new data, and loads the new controls, all without error. But, the detail pane does not display the new data. It seems that I must expressly "refresh" the detail pane. Is that correct? And, if it is correct, how do I do that?

I will include the basic structure of the relevant part of my aspx page:
<telerik:RadCodeBlock ID="ExplorerCodeBlock" runat="server">
    <script language="javascript" type="text/javascript" src="scripts/editPage.js"></script>
    <script type="text/javascript">
    //<![CDATA[
    function handleHyperlink(target) {
        /* ... do some processing... */
        explicitCallBack(target);
    }
 
    function explicitCallBack(arg) {
        var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");
        ajaxManager.ajaxRequest(arg);
    }
    //]]>
    </script>
</telerik:RadCodeBlock>   
 
<telerik:RadAjaxManager ID="RadAjaxManager1" OnAjaxRequest="RadAjaxManager1_AjaxRequest" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="tvExplorer">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="tvExplorer" />
                <telerik:AjaxUpdatedControl ControlID="pnlDetailWrapper" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="pnlDetailWrapper">
            <UpdatedControls>                  
                <telerik:AjaxUpdatedControl ControlID="pnlDetailWrapper" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager
<telerik:RadSplitter ID="RadSplitter1" CssClass="grid_12" Height="650" Width="100%" LiveResize="true"  runat="server">
    <telerik:RadPane ID="paneExplorer" CssClass="grid_6 alpha" runat="server">
        <telerik:RadTreeView ID="tvExplorer" runat="server" TabIndex="1" AccessKey="m"
          OnClientNodeClicked="OnClientNodeClicked"
          OnClientKeyPressing="OnClientKeyPressing"
          OnClientNodeDataBound="OnClientNodeDataBound"
          OnClientContextMenuItemClicking="OnClientContextMenuItemClicking"
          OnContextMenuItemClick="tvExplorer_ContextMenuItemClick"
          OnNodeClick="tvExplorer_NodeClick">
            <WebServiceSettings Path="DataSvcProxy.asmx" Method="GetRadTreeViewNodes" />
            <Nodes>
                <telerik:RadTreeNode runat="server" Text="My Project" Value="0" ClassID="0" PermClasses="0" ExpandMode="WebService" />
            </Nodes>
        </telerik:RadTreeView>
    </telerik:RadPane>
    <telerik:RadSplitBar ID="RadSplitBar1" CollapseMode="Forward" runat="server" />
    <telerik:RadPane ID="paneDetail" CssClass="grid_6 omega" runat="server">
        <asp:Panel ID="pnlDetailWrapper" runat="server">
            <asp:HiddenField ID="hdnOperationType" runat="server" />
            <asp:HiddenField ID="hdnOperationSource" runat="server" />
            <asp:Panel ID="pnlDetail" runat="server">
            </asp:Panel>
        </asp:Panel>
    </telerik:RadPane>
</telerik:RadSplitter>
Any advice you can give would really be appreciated.

Thanks very much.
Roger
Top achievements
Rank 1
 answered on 27 Jul 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?