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

I'm new using Telerik and I'm trying to get the RadEditor content in a RadGrid and is always empty.

I tried many things and doesn't work.

Can anyone help me?Your quote goes here

Thanks!


My code is simple:

User Control:

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="New_Manager_Meeting_u.ascx.cs" Inherits="FHPACS.Modules.PACS_Manager.Meetings.New_Manager_Meeting_u" %>
<asp:UpdatePanel ID="UpdPanelStudies" runat="server">
   <ContentTemplate>
      <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel" LoadingPanelID="LoadingPanel1" Width="100%">
         <telerik:RadGrid ID="dgrTeamMembers" runat="server" GridLines="None" AllowFilteringByColumn="false" allo AllowSorting="false"  
                          ShowGroupPanel="false" OnGroupsChanging="dgrTeamMembers_GroupsChanging" OnLoad="dgrTeamMembers_Load">
    <MasterTableView AutoGenerateColumns="false" DataKeyNames="OPID" EnableHeaderContextMenu="false">
<Columns>
<telerik:GridTemplateColumn HeaderText="" UniqueName="Assist" AllowFiltering="false" HeaderStyle-Width="30px">
<ItemTemplate>
<asp:CheckBox ID="cbxAssist" runat="server" />
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn DataField="ID" DefaultInsertValue="" HeaderText="ID" ReadOnly="true" SortExpression="ID" UniqueName="ID"
HeaderStyle-Width="70px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="FIRST_NAME" DefaultInsertValue="" HeaderText="FIRST NAME" ReadOnly="true"
SortExpression="FIRST_NAME" UniqueName="FIRST_NAME" HeaderStyle-Width="90px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="LAST_NAME" DefaultInsertValue="" HeaderText="LAST NAME" ReadOnly="true" SortExpression="LAST_NAME" UniqueName="LAST_NAME" HeaderStyle-Width="120px">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn HeaderText="COMMENTS" UniqueName="COMMENTS" AllowFiltering="false" HeaderStyle-Width="100%"
ItemStyle-Height="120px">
<ItemTemplate>
<telerik:RadEditor ID="edtComment" runat="server" MaxTextLength="700" Width="577px" Height="120px" EditModes="Design"
EnableTextareaMode="True">
<Languages>
<telerik:SpellCheckerLanguage Code="en-US" Title="English" />
</Languages>
<Tools>
<telerik:EditorToolGroup>
<telerik:EditorTool Name="Bold" />
<telerik:EditorTool Name="Italic" />
<telerik:EditorTool Name="Underline" />
<telerik:EditorSeparator />
<telerik:EditorTool Name="JustifyLeft" />
<telerik:EditorTool Name="JustifyCenter" />
<telerik:EditorTool Name="JustifyRight" />
<telerik:EditorTool Name="JustifyFull" />
<telerik:EditorTool Name="JustifyNone" />
<telerik:EditorTool Name="InsertTable" />
<telerik:EditorSeparator />
<telerik:EditorTool Name="Undo" />
<telerik:EditorTool Name="Redo" />
<telerik:EditorTool Name="ForeColor" />
<telerik:EditorSeparator />
<telerik:EditorTool Name="InsertTime" />
<telerik:EditorTool Name="InsertDate" />
<telerik:EditorSeparator />
<telerik:EditorTool Name="FontName" />
<telerik:EditorTool Name="RealFontSize" />
</telerik:EditorToolGroup>
</Tools>
</telerik:RadEditor>
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
<ClientSettings AllowDragToGroup="false" AllowColumnsReorder="true" Selecting-AllowRowSelect="true">
<Resizing AllowColumnResize="true" />
</ClientSettings>
</telerik:RadGrid>
</telerik:RadAjaxPanel>
<br />
<br />
<asp:Button ID="btnSaveMeeting" runat="server" Text="Save Meeting" OnClick="btnSaveMeeting_Click"/>
</ContentTemplate>
</asp:UpdatePanel>


Code Behind (c#):

using System;
using System.IO;
using System.Web;
using System.Linq;
using System.Web.UI;
using Telerik.Web.UI;
using System.Drawing;
using System.Configuration;
using System.Web.UI.WebControls;
using System.Collections.Generic;
using Telerik.Web.UI.GridExcelBuilder; 
 
public partial class New_Meeting_u : System.Web.UI.UserControl
{
    protected void btnSaveMeeting_Click(object sender, EventArgs e)
    {
        string comment = "";
 
        for (int i = 0; i < dgrTeamMembers.Items.Count; i++)
        {
            CheckBox cbxonmeeting = dgrTeamMembers.Items[i].FindControl("cbxAssist") asCheckBox;
 
            if (cbxonmeeting.Checked)
            {
                comment = ((RadEditor)dgrTeamMembers.Items[i].Cells[6].Controls[1]).Content;
            }
        }
    }
}


I tried this:

protected void btnSaveMeeting_Click(object sender, EventArgs e)
{
   string comment = "";
 
   for (int i = 0; i < dgrTeamMembers.Items.Count; i++)
   {
                 
      CheckBox cbxonmeeting = dgrTeamMembers.Items[i].FindControl("cbxAssist") as CheckBox;
 
      if (cbxonmeeting.Checked)
      {
         RadEditor membereditor = dgrTeamMembers.Items[i].FindControl("edtComment") as RadEditor;
 
           comment = membereditor.Content;
        }
   }
}


And this:

protected void btnSaveMeeting_Click(object sender, EventArgs e)
{
   string comment = "";
 
   for (int i = 0; i < dgrTeamMembers.Items.Count; i++)
   {
                 
      CheckBox cbxonmeeting = dgrTeamMembers.Items[i].FindControl("cbxAssist") as CheckBox;
 
      if (cbxonmeeting.Checked)
      {
         Button GetContent = (Button)sender;
         GridEditFormItem item =  (GridEditFormItem)GetContent.NamingContainer;
         RadEditor radEditor = ((RadEditor)item["COMMENTS"].FindControl("edtComment"));
 
         comment = radEditor.Content;
      }
   }
}


And always is empty! 
Shinu
Top achievements
Rank 2
 answered on 04 Jul 2014
1 answer
189 views
Hi there:

I need to export to Excel with no grouping but I would like to repeat a group data for  each row.  For example

My on screen report
Group A:  12345
      Data1    Data2   Data3
      Data4     Data    Data 6

I would like the output in excel as follows
12345  Data1 Data2 Data2
12345  Data4 Data5 Data6
Shinu
Top achievements
Rank 2
 answered on 04 Jul 2014
1 answer
159 views
Hi All,

I  am  using  radgrid modal popup    ,I   click  on edit image  button it is taking to much time to open  modal popup  and also if i click on close image button its taking to much time to close   ,

How to reduce this time ?
Princy
Top achievements
Rank 2
 answered on 04 Jul 2014
3 answers
197 views
Hi, i just wanted to know how to bind a pie chart to dynamic data. I mean if the data is coming from the database, i've two columns i.e. Name and vale, how can i bind it to a radhtml pie chart. 
Asutosh
Top achievements
Rank 1
 answered on 04 Jul 2014
2 answers
250 views
How do you close the notification control server side when the close X is not on the control. I have the AutoCloseDelay =0 so it will stay open until the user clicks my Ok or Cancel button.
Shinu
Top achievements
Rank 2
 answered on 04 Jul 2014
3 answers
88 views

hi guys,

I am trapped in a weird problem. My grid works like charm but destroys the entire table structure right after I introduce a TemplateColumn or a NestedViewTemplate.



Please review attachment.



Any idea how to fix it?



telerik:RadGrid ID="radGrid" DataSourceID="sdcReq"
                        AllowFilteringByColumn="True" AllowSorting="True" AllowMultiRowSelection="true" OnItemCommand="radGrid_ItemCommand"
                        AllowPaging="True" runat="server" Skin="WebBlue" CellSpacing="0" GridLines="None" OnNeedDataSource="radGrid_NeedDataSource">
 
                        <MasterTableView AutoGenerateColumns="false" TableLayout="Auto">
                            <Columns>
                                <telerik:GridHyperLinkColumn DataTextField="reqTitle" DataNavigateUrlFields="reqID" DataNavigateUrlFormatString="~/Acquisition/Requisition_Editor.aspx?reqID={0}" HeaderText="Requisition Title" UniqueName="reqID" AllowSorting="true">
                                </telerik:GridHyperLinkColumn>
                                <telerik:GridBoundColumn FilterControlWidth="120px" DataField="reqAuthor" HeaderText="Author"
                                    AutoPostBackOnFilter="true" CurrentFilterFunction="EqualTo" ItemStyle-Width="75px" DataType="System.String"
                                    ShowFilterIcon="false">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn FilterControlWidth="120px" DataField="deptCode" HeaderText="Department"
                                    AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ItemStyle-Width="100px"
                                    ShowFilterIcon="false">
                                </telerik:GridBoundColumn>
                                <telerik:GridDateTimeColumn FilterControlWidth="120px" DataField="reqDateTime" HeaderText="Requested On" ShowFilterIcon="false" EnableTimeIndependentFiltering="true" DataFormatString="{0:MMM dd, yyyy}" ItemStyle-Width="100px">
                                </telerik:GridDateTimeColumn>
                                <telerik:GridBoundColumn FilterControlWidth="120px" DataField="statusTitleForLibrarian" HeaderText="Status"
                                    AutoPostBackOnFilter="true" CurrentFilterFunction="EqualTo" ItemStyle-Width="150px"
                                    ShowFilterIcon="false">
                                </telerik:GridBoundColumn>
                                <telerik:GridHyperLinkColumn DataTextField="" DataNavigateUrlFields="reqID" DataNavigateUrlFormatString="~/Acquisition/Requisition_Review.aspx?reqID={0}" HeaderText="" ImageUrl="~/Images/grid-review.png" ItemStyle-Width="21px" Target="_blank">
                                </telerik:GridHyperLinkColumn>
                                <telerik:GridHyperLinkColumn DataTextField="" DataNavigateUrlFields="reqID" DataNavigateUrlFormatString="~/Acquisition/Requisition_Editor.aspx?reqID={0}" HeaderText="" ImageUrl="~/Images/grid-edit.png" ItemStyle-Width="21px">
                                </telerik:GridHyperLinkColumn>
                                <telerik:GridButtonColumn ButtonType="ImageButton" ConfirmDialogType="Classic" ConfirmText="Do you really want to delete this Request?"
                                    ImageUrl="~/Images/grid-delete.png" ItemStyle-Width="21px" CommandName="deleteit" CommandArgument="reqID">
                                </telerik:GridButtonColumn>
                                <telerik:GridTemplateColumn>
                                    <ItemTemplate>
                                        <asp:Button ID="Button1" runat="server" Text="Button" />
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                            </Columns>
                        </MasterTableView>
                         
                        <ClientSettings EnableRowHoverStyle="true"  ReorderColumnsOnClient="true" AllowColumnsReorder="true" ColumnsReorderMethod="Reorder" >
 
                            <Selecting AllowRowSelect="true" EnableDragToSelectRows="true" />
                        </ClientSettings>
                    </telerik:RadGrid>




Bilal
Top achievements
Rank 1
 answered on 03 Jul 2014
2 answers
150 views

1. Want to handle this on the server.
2. For each dropped item from gridview, I want to read id and map it to the id of the target TreeView item

 

Bozhidar
Telerik team
 answered on 03 Jul 2014
3 answers
216 views
Creating all events and setting breakpoints, you will notice, when creating the first entry by clicking on "Insert" ("Einfügen") it will first call the ItemCommand-Event with e.CommandName = "PerformInsert", but then it will NOT enter the InsertCommand event. Just create the blank events to this example and set break points:

<asp:UpdatePanel ID="upPrices" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
        <telerik:RadGrid ID="trgPrices" runat="server" AllowPaging="true" Culture="de-DE"
            CssClass="RadGrid" AllowSorting="False" AutoGenerateColumns="false" ShowStatusBar="true" PageSize="20"
            OnNeedDataSource="trgPrices_NeedDataSource"
            OnItemCreated="trgPrices_ItemCreated"
            OnItemDataBound="trgPrices_ItemDataBound"
            OnItemCommand="trgPrices_ItemCommand"
            OnEditCommand="trgPrices_EditCommand"
            OnInsertCommand="trgPrices_InsertCommand"
            OnUpdateCommand="trgPrices_UpdateCommand"
            OnCancelCommand="trgPrices_CancelCommand"
            OnDeleteCommand="trgPrices_DeleteCommand">
            <MasterTableView DataKeyNames="ID" CommandItemDisplay="Top">
                <CommandItemSettings ShowAddNewRecordButton="true" ShowRefreshButton="false"></CommandItemSettings>
                <Columns>
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditColumn" EditText="Bearbeiten">
                        <HeaderStyle Width="20px" />
                    </telerik:GridEditCommandColumn>
                    <telerik:GridNumericColumn UniqueName="HighestQuantity" DataField="HighestQuantity" DataType="System.Int32" HeaderText="Anzahl" DefaultInsertValue="999999" MaxLength="6" NumericType="Number" />
                    <telerik:GridNumericColumn UniqueName="UnitPrice" DataField="UnitPrice" DataType="System.Double" HeaderText="Stückpreis" DefaultInsertValue="0" DecimalDigits="2" NumericType="Currency" />
                    <telerik:GridButtonColumn ButtonType="ImageButton" UniqueName="DeleteColumn" CommandName="Delete" Text="Löschen">
                        <HeaderStyle Width="20px" />
                    </telerik:GridButtonColumn>
                </Columns>
                <EditFormSettings>
                    <EditColumn ButtonType="LinkButton" UniqueName="EditCommandColumn" InsertText="Einfügen" UpdateText="Speichern" CancelText="Abbrechen" />
                </EditFormSettings>
            </MasterTableView>
        </telerik:RadGrid>
    </ContentTemplate>
</asp:UpdatePanel>

What can I do?

Martin
Top achievements
Rank 1
 answered on 03 Jul 2014
1 answer
146 views
cannot figure out what is causing this error and not sure where to start looking as it is in an telerik resource axd... ???  Any help is appreciated!



Unhandled exception at line 3, column 7184 in http://localhost:60181/JobTrackerAPP/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=;;AjaxControlToolkit,+Version=4.1.7.1005,+Culture=neutral,+PublicKeyToken=28f01b0e84b6d53e:en-US:5758f630-b0dd-4428-b6d6-af591d716c0c:ea597d4b:b25378d2;Telerik.Web.UI,+Version=2014.1.403.40,+Culture=neutral,+PublicKeyToken=121fae78165ba3d4:en-US:ca584452-327f-4858-bf00-fb22c6f6fd75:16e4e7cd:874f8ea2:f7645509:24ee1bba:92fe8ea0:19620875:f46195d3:fa31b949:490a9d4e:bd8f85e40x800a138f - JavaScript runtime error: Unable to get property 'indexOf' of undefined or null reference
Vessy
Telerik team
 answered on 03 Jul 2014
7 answers
182 views
Hey all,

I am trying to export to Word on one of my radgrids. I have used this tool before and it has worked flawlessly. However I am running into an issue with one that I am trying to implement now.

I have a grid that has two exportable="false" columns that are supposed to disappear in the downloaded file. Currently what happens is that I lose the pager from top and bottom, the exportable columns disappear and nothing starts to download upon button click.

From before, exportable="false" columns have always worked for me as well as the export to word. I tested the other exports and none work. They all currently do the same thing. To my knowledge, I haven't implemented anything differently in my NeedsDataSource or ItemDataBound. 

Anyone got any ideas as to why this is happening?
Alexander
Top achievements
Rank 1
 answered on 03 Jul 2014
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?