Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
133 views

I saw your demo on opening up an advanced RadEditor inside a RadWindow. For my purposes, I am using a RadGrid to display list of items that each contain a field to store html details about the item that needs to be able to be modified by the user when they update the item.

Due to space limitations, I do not have the room to display the full editor inside the edit item template for the grid. What I want to know is, would it be possible to implement the RadEditor in a RadWindow from within the edit item template of a grid?

In case that's confusing...a user click "edit" on an item in a grid...fills out all of the text fields, but then can launch the editor in a RadWindow to update the details before completing the update on the grid item.

I cut out some of the original grid code; however, the snippet below returns an error that DialogWindow does not exist in the current context. Before going any further I wanted to verify that there was no a limitation of the gridview that would prevent me from doing this...

Thanks,

<telerik:RadScriptManager ID="RadScriptManager1" runat="server" /> 
        <telerik:radgrid id="RadGrid2" runat="server" allowfilteringbycolumn="True" allowpaging="True" 
            allowsorting="True" autogeneratedeletecolumn="True" autogenerateeditcolumn="True" 
            datasourceid="LinqDataSource2" gridlines="None" showgrouppanel="True" skin="WebBlue">  
            <MasterTableView AutoGenerateColumns="False" DataKeyNames="FeedbackID" DataSourceID="LinqDataSource2" 
                CommandItemDisplay="Top" EditMode="PopUp">  
                <EditFormSettings PopUpSettings-Modal="true">  
                    <PopUpSettings Modal="True"></PopUpSettings> 
                </EditFormSettings> 
                <Columns> 
                <telerik:GridTemplateColumn DataField="Details" DataType="System.String" HeaderText="Feedback Details" 
                        SortExpression="Details" UniqueName="Details">  
                        <ItemTemplate> 
                            <%--Nothing here yet--%> 
                        </ItemTemplate> 
                        <EditItemTemplate> 
                            <telerik:RadWindow OnClientShow="SetDialogContent" OnClientPageLoad="SetDialogContent" 
                                NavigateUrl="EditorInWindow.aspx" runat="server" Behaviors="Maximize,Close,Move" 
                                ID="DialogWindow" VisibleStatusbar="false" Width="800px" Modal="true" Height="700px" />      
                                                          
                            <telerik:RadEditor ID="RadEditor1" EnableResize="false" runat="server" Width="460px" 
                                Height="200px">  
                                <Tools> 
                                    <telerik:EditorToolGroup> 
                                        <telerik:EditorTool Name="RichEditor" Text="Open Advanced Editor" /> 
                                    </telerik:EditorToolGroup> 
                                </Tools> 
                                <Content> 
                                   <img src="../../Img/productLogoLight.gif" alt="product logo" /> 
                                 <ul> 
                                        <li><em>Single-file, drag-and-drop deployment</em></li>  
                                        <li><em>Built on top of ASP.NET AJAX</em></li>  
                                    </ul> 
                                </Content> 
                            </telerik:RadEditor> 
                        </EditItemTemplate> 
                    </telerik:GridTemplateColumn> 
                </Columns> 
            </MasterTableView> 
            <ClientSettings AllowDragToGroup="True">  
            </ClientSettings> 
        </telerik:radgrid> 
 
        <script type="text/javascript">  
            //<![CDATA[
            var editorContent = null;
            Telerik.Web.UI.Editor.CommandList["RichEditor"] = function(commandName, editor, args) {
                editorContent = editor.get_html(true); //get RadEditor content
                $find("<%=DialogWindow.ClientID%>").show(); //open RadWindow
            };
            function SetEditorContent(content) {
                //set content to RadEditor on the mane page from RadWindow
                $find("<%=RadEditor1.ClientID%>").set_html(content);
            }
            function SetDialogContent(oWnd) {
                var contentWindow = oWnd.get_contentFrame().contentWindow;
                if (contentWindow && contentWindow.setContent) {
                    window.setTimeout(function() {
                        //pass and set the content from the mane page to RadEditor in RadWindow
                        contentWindow.setContent(editorContent);
                    }, 500);
                }
            }
            //]]> 
        </script> 
Dominick DeStasio
Top achievements
Rank 1
 answered on 18 Mar 2010
2 answers
78 views
Does anyone know why my RadWindow is distorted looking under IE8 when not in compatibility mode? I have tried changing the skin (and removing it) to no avail. The code and screenshot are both attached. Running in compatibility mode it looks fine...but outside of it it does not.

    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" ShowContentDuringLoad="false" 
        VisibleStatusbar="false" ReloadOnShow="true" Skin="Black"> 
        <Windows> 
            <telerik:RadWindow ID="PristineWindow" Behaviors="Close" OnClientClose="OnClientClose" VisibleTitlebar = "true" 
                NavigateUrl="http://www.pristine.com" Width="610px" Height="590px" Modal="true" Title="Access Pristine" KeepInScreenBounds="true" > 
            </telerik:RadWindow> 
        </Windows> 
    </telerik:RadWindowManager> 

Dominick DeStasio
Top achievements
Rank 1
 answered on 17 Mar 2010
2 answers
271 views
I've searched the help documents and forum for a simple CSS example of controlling the appearance of the RadMenu's items and sub menu items.  Any simple examples of just the CSS controlling the main menu items and sub menu items forecolor and background out there? 

All I need to do is make the menu background blue and forecolor white for the main menu items.  Then make the submenu items white background and black forecolor.
DTech
Top achievements
Rank 1
 answered on 17 Mar 2010
1 answer
131 views
I have two GridImageColumn(s). One for my own edit command and one for my own delete command.

How do I attach events to to the edit and delete images so I know what record I need to edit or what row I need to delete?

The OnRowClick event won't fire when a GridImageColumn is clicked.

robertw102
Top achievements
Rank 1
 answered on 17 Mar 2010
2 answers
152 views
Hi I have a grid as following
  <telerik:RadListView ID="AListGrid" runat="server" AllowPaging="true" PageSize="10" 
                AllowCustomPaging="True" ItemPlaceholderID="PropertiesContianer"> 
                <LayoutTemplate> 
                    <fieldset id="RadListView1"> 
                        <div class="proGridTopPager"> 
                            <telerik:RadDataPager ID="RadDataPager2" runat="server" Style="border: none;" SkinID="ListViewSkin" 
                                AllowSEOPaging="true" SEOPagingQueryPageKey="Page"> 
                                <Fields> 
                                    <telerik:RadDataPagerButtonField FieldType="FirstPrev" /> 
                                    <telerik:RadDataPagerButtonField FieldType="Numeric" /> 
                                    <telerik:RadDataPagerButtonField FieldType="NextLast" /> 
                                </Fields> 
                            </telerik:RadDataPager> 
                        </div> 
                        <asp:PlaceHolder ID="PropertiesContianer" runat="server" /> 
                        <telerik:RadDataPager ID="RadDataPager1" runat="server" Style="border: none;" SkinID="ListViewSkin" 
                            AllowSEOPaging="true" SEOPagingQueryPageKey="Page"> 
                            <Fields> 
                                <telerik:RadDataPagerButtonField FieldType="FirstPrev" /> 
                                <telerik:RadDataPagerButtonField FieldType="Numeric" /> 
                                <telerik:RadDataPagerButtonField FieldType="NextLast" /> 
                            </Fields> 
                        </telerik:RadDataPager> 
                    </fieldset> 
                </LayoutTemplate> 
                <ItemTemplate> 
                    <osl:descContent ID="lbltest" runat="server" Text="" /> 
                </ItemTemplate> 
            </telerik:RadListView> 

and in my code-behind, i got
Private Sub AListGrid_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadListViewItemEventArgs) Handles AListGrid.ItemDataBound 
 If (TypeOf (e.Item) Is RadListViewDataItem) Then 
   Dim dataBoundItem = DirectCast(e.Item, RadListViewDataItem) 
   Dim atest = DirectCast(dataBoundItem.FindControl("lbltest"), descContent) 
   atest.Text = "test" 
 End If 
End Sub 

it works only on first page, not the 2 second and etc, even if we start with second page, the web user control does not render (it just contain a simple label)
Telerik version 2010.1.316.35

It seems calling ItemDataBound event twice if page >1, any idea?
James Shelton Agar
Top achievements
Rank 2
 answered on 17 Mar 2010
1 answer
125 views
Hello,

  I have a RadGrid built in the code behind and displayed on the page at run time.  I'd like to display the last page rather than the first page.  I searched around but couldn't find an example or anything on how to do this.  It's been awhile since I've worked with the RadGrid so I may just be overlooking the obvious.

Thanks for any help
Kevin
robertw102
Top achievements
Rank 1
 answered on 17 Mar 2010
4 answers
181 views
Hi All,

I am doing Insert, Update in RadGrid at server side, and working fine, but i am not able to change edit mode to normal mode after update is complete.

How to change edit mode after update complete in RadGrid1_UpdateCommand event.

Please help me regarding this.


J
Top achievements
Rank 1
 answered on 17 Mar 2010
1 answer
87 views

I have a page that has a RadWindowManager on it.
I have a button on that page and below is the code in the Click event of that button.
It opens the page EmailSend.aspx in a RadWindow.

                RadWindow window = new RadWindow();
                window.ID = "EmailSend";
                window.NavigateUrl = "/EmailSend.aspx";
                window.VisibleOnPageLoad = true;
                window.Behaviors = Telerik.Web.UI.WindowBehaviors.Close;
                window.Height = 800;
                window.Width = 960;
                RadWindowManager1.VisibleOnPageLoad = true;
                window.Title = "Email  Release";
                RadWindowManager1.Windows.Add(window);

Page EmailSend.aspx is a form the user types all the information into that they want emailed.
When the user clicks the Send Button on this form, I have code that inserts the email information into the database.

After this code executes, I have the following line: (I want the window to close when the User clicks Send)

ScriptManager.RegisterStartupScript(this, GetType(), "EmailSend", "CloseRadWindow();", true);

In the Source of EmailSend.aspx, I have the following in the Send button.
<asp:Button ID="btnSend" runat="server" Text="Send" OnClick="btnSend_Click" OnClientClick="CloseWnd();return false;" />

I also have the following function in the Source of EmailSend.aspx
       <script type="text/javascript">
           function GetRadWindow() {
               var oWindow = null;
               if (window.radWindow) oWindow = window.radWindow; 
               else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;

               return oWindow;
           }
           function CloseWnd() {
               GetRadWindow().close();
           }
        </script>

This kind of works but I must be missing something.  I read that RadWindows don't close, they just hide themselves.  I think this is the problem I am having.  The first time I click the button that opens EmailSend.aspx in a RadWindow, I click Send and it runs my code and closes.  If I open it a second time, I have to click Send twice for it to close.  If I open it a third time, i have to click Send three times for it to close.  What am I doing wrong?????

Lori
Top achievements
Rank 1
 answered on 17 Mar 2010
2 answers
101 views
Hi,
   I have developed the website in VS2008 with WindowsXP and it can run well in server 2003. But when I move the site into server2008, all the controls can not click. It can show the controls but can't click. for example, TreeView can show correct, but can't choose the nodes, can't use right click menu. and RadMenu has the same problem. Should I change any setting in IIS 7 or in web.config
Veenu
Top achievements
Rank 1
 answered on 17 Mar 2010
17 answers
364 views

How do display multiple columns in the load by demand example?
The following code from the multi-col does not display the data.
Do I have to bind the datatable to the combox for this to work.
It seems the databinding to the radcombo takes a while.. thanks in advance.

<

HeaderTemplate>

<table style="width: 100%; text-align: left">

<tr>

<td style="width: 125px;">

Company Name

</td>

<td style="width: 125px;">

City

</td>

<td style="width: 125px;">

Title

</td>

</tr>

</table>

</HeaderTemplate>

<ItemTemplate>

<table style="width: 100%; text-align: left">

<tr>

<td style="width: 125px;">

<%

# DataBinder.Eval(Container.DataItem, "CompanyName") %>

</td>

<td style="width: 125px;">

<%

# DataBinder.Eval(Container.DataItem, "City") %>

</td>

<td style="width: 125px;">

<%

# DataBinder.Eval(Container.DataItem, "ContactTitle") %>

</td>

</tr>

</table>

</ItemTemplate>

Jill McLoughlin
Top achievements
Rank 1
 answered on 17 Mar 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?