Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
61 views
How can I get the right click menu on my telerik:GridHTMLEditorColumns? I have the following in my grid

<

 

telerik:GridHTMLEditorColumn EditFormColumnIndex="0" Visible="false" DataField="Summary" HeaderText="Summary" />
when I right click the window..nothing happens. It is nice to have the copy/cut/paste options like the normal editor. I checked the intellisense and nothing popped out at me.

mac

 

Princy
Top achievements
Rank 2
 answered on 02 Jun 2009
2 answers
160 views
Hello!

I am trying to add a bit of javascript to a collegues page, to check if a user has previewed their order before they are allowed to submit it, but the ajax panel is causing me problems.

This is a very narrowed down test page I have created to try and work out whats happening:

<body> 
    <form id="form1" runat="server">  
 
    <script type="text/javascript">  
 
        function TextChanged() {  
 
            var textChanged;  
            textChanged = document.getElementById("textChangedField")  
            textChanged.value = "1";  
        }  
 
        function Previewed() {  
 
            var textChanged;  
            textChanged = document.getElementById("textChangedField")  
            textChanged.value = "0";  
        }  
 
        function CheckPreview() {  
            var textChanged;  
            textChanged = document.getElementById("textChangedField")  
 
            if (textChanged.value == "1") {  
                alert('You must preview your document before you can order it');  
                return false;  
            } else {  
                return true;  
            }  
            return true;  
        }  
    </script> 
 
    <asp:ScriptManager ID="ScriptManager1" runat="server">  
    </asp:ScriptManager> 
    <telerik:ReportViewer ID="ReportViewer1" runat="server">  
        <Resources ProcessingReportMessage="Generating preview..." /> 
    </telerik:ReportViewer> 
    <input type="hidden" id="textChangedField" value="0" /> 
    <asp:TextBox ID="textbox" runat="server" onKeyUp="TextChanged()"></asp:TextBox> 
    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="textbox" 
        ValidationGroup="Template" ErrorMessage="RequiredFieldValidator"></asp:RequiredFieldValidator> 
    <asp:Button ID="PreviewButton" runat="server" Text="Preview" ValidationGroup="Template" 
        CausesValidation="true" OnClick="ButtonRefresh_Click" OnClientClick="Previewed();" /> 
    <asp:Button ID="OrderButton" OnClientClick="return CheckPreview();" runat="server" 
        Text="Order" ValidationGroup="Template" CausesValidation="true" OnClick="OrderButton_Click" /> 
    <asp:Label ID="LabelTotal" runat="server"></asp:Label> 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableHistory="True">  
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="PreviewButton">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="ReportViewer1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="OrderButton">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="ReportViewer1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
    </form> 
</body> 

There is a report viewer, a textbox and two buttons.
The javascript function "textchanged" sets a hidden field when the text is changed so when the user clicks the order button a alert box is popped up telling them to preview the report if they haven't already..

So far this all works..

There is also a required field validator on the textbox, which doesn't always show when you click the order button if the textbox is empty, but always shows when you click the preview button.
but the main problem occurs when the user has actually previewed the report, they click the order button, the javascript runs and returns true, but the orderbutton_click event in the code behind doesn't fire.

I know this is something to do with the ajax manager, because without it it all works, but we are using this as we want the report to update after each button click regardless of whether it validates or not.

Is this what is causing the problem? or is it a bug? What is the best way around this?

Thanks

bex

just incase you need to know, the reason the Javascript is in the body, is because on the main page, all this code is within a content panel.


Bex
Top achievements
Rank 1
 answered on 02 Jun 2009
3 answers
153 views
Hi,

The information I need i probably in one of the other threads, but I'm getting a little confused.

What I'm trying to do:
I have a RadEditor in an (Ajax enabled) aspx page and I would like the 'Apply CSS Class' dropdown box to show only those css classes I have defined in a separate .css file 'CustomUserClasses.css' in the folder '~/EditorConfigs'.

The result is that the dropdown box shows all the css classes defined in the .css file that formats the page the RadEditor is in. Appearantly it finds them automaticly. But the classes I defined in CustomUserClasses.css (.important and .unimportant, just for testing purposes) aren't shown.

What I did in the code behind file is similar to this:           
protected void Page_Load(object sender, EventArgs e) 
if (!IsPostBack) 
rePageContentsEditor.CssFiles.Clear(); 
rePageContentsEditor.CssFiles.Add(new EditorCssFile("~/EditorConfigs/CustomUserClasses.css")); 
rePageContentsEditor.ContentAreaCssFile = "~/EditorConfigs/CustomUserClasses.css"
rePageContentsEditor.ToolsFile = "~/EditorConfigs/TestToolsFile.xml"

Because of what I read in other threads I tried to set both the CssFiles and the ContentAreaCssFile properties and I set the ToolsFile last.

I'm sure it's actually quite simple if you know what to do, but I'm not getting anywhere (on this rather warm friday afternoon :-)).
Please help.

Regards,

Mink


Tervel
Telerik team
 answered on 02 Jun 2009
3 answers
90 views
I have a rad window which contains asp dropdown control. when i mimize and then restore the window, the dropdown control is hidden. what seems to be wrong?
Georgi Tunev
Telerik team
 answered on 02 Jun 2009
6 answers
2.5K+ views
I am trying test using the RadControls for ASP.NET AJAX in a SharePoint environment and have not had much luck.  I have not been able to get past the following error when creating a simple webpart using one of your controls:
~/Telerik.Web.UI.WebResource.axd' is missing in web.config. RadScriptManager requires a HttpHandler registration in web.config.

My SharePoint instance is using IIS 6, and I've added the Telerik.Web.UI.WebResource.axd entry to my web.config file as shown below.

My web.config has the following:
    <httpHandlers>
      <remove verb="GET,HEAD,POST" path="*" />
      <add verb="GET,HEAD,POST" path="*" type="Microsoft.SharePoint.ApplicationRuntime.SPHttpHandler, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
      <add verb="OPTIONS,PROPFIND,PUT,LOCK,UNLOCK,MOVE,COPY,GETLIB,PROPPATCH,MKCOL,DELETE,(GETSOURCE),(HEADSOURCE),(POSTSOURCE)" path="*" type="Microsoft.SharePoint.ApplicationRuntime.SPHttpHandler, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
      <add verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
      <remove verb="*" path="*.asmx" />
      <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2008.3.1125.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" verb="*" validate="false" />
    </httpHandlers>

Any suggestions would be greatly appreciated.
balaji
Top achievements
Rank 1
 answered on 02 Jun 2009
1 answer
381 views
I have a radGrad that hasn't changed in some time that for some reason no longer shows the selected row.

As a test I created a blank page, added a grid and it works fine. I've compared the two pages and the grid has the same code.

Here's the two pages with the grid code.

Working grid code:

<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True"   
    AllowPaging="True" DataSourceID="LoggerDS" GridLines="None">  
    <HeaderContextMenu>  
        <CollapseAnimation Type="OutQuint" Duration="200">  
        </CollapseAnimation>  
    </HeaderContextMenu>  
    <PagerStyle Mode="NextPrevAndNumeric" />  
    <MasterTableView autogeneratecolumns="False" datasourceid="LoggerDS" CommandItemDisplay="Top" HorizontalAlign="Center">  
        <RowIndicatorColumn>  
            <HeaderStyle Width="20px"></HeaderStyle>  
        </RowIndicatorColumn>  
        <ExpandCollapseColumn>  
            <HeaderStyle Width="20px"></HeaderStyle>  
        </ExpandCollapseColumn>  
        <Columns>  
            <telerik:GridBoundColumn DataField="MonitorDate" DataType="System.DateTime" ItemStyle-HorizontalAlign="Center" 
                HeaderText="Date Monitored" SortExpression="MonitorDate" UniqueName="MonitorDate">  
<ItemStyle HorizontalAlign="Center"></ItemStyle>  
            </telerik:GridBoundColumn>        
            <telerik:GridBoundColumn DataField="CallTime" DataType="System.DateTime" ItemStyle-HorizontalAlign="Center" 
                HeaderText="Call Time" SortExpression="CallTime" UniqueName="CallTime">  
<ItemStyle HorizontalAlign="Center"></ItemStyle>  
            </telerik:GridBoundColumn>  
                  <telerik:GridBoundColumn DataField="CallID" DataType="System.Int32" ItemStyle-HorizontalAlign="Center" 
                      HeaderText="Call ID" SortExpression="CallID" UniqueName="CallID" Display="False">  
<ItemStyle HorizontalAlign="Center"></ItemStyle>  
                 </telerik:GridBoundColumn>  
            <telerik:GridBoundColumn DataField="CombinedDuration" DataType="System.TimeSpan" ItemStyle-HorizontalAlign="Center" 
                HeaderText="Length of Call" SortExpression="CombinedDuration" UniqueName="CombinedDuration">  
<ItemStyle HorizontalAlign="Center"></ItemStyle>  
            </telerik:GridBoundColumn>  
            <telerik:GridBoundColumn DataField="StationNumber" ItemStyle-HorizontalAlign="Center" 
                HeaderText="Station Number" SortExpression="StationNumber" Display="False" UniqueName="StationNumber">  
<ItemStyle HorizontalAlign="Center"></ItemStyle>  
            </telerik:GridBoundColumn>  
            <telerik:GridBoundColumn DataField="CallNumber" ItemStyle-HorizontalAlign="Center" 
                HeaderText="Call Number" SortExpression="CallNumber" UniqueName="CallNumber">  
<ItemStyle HorizontalAlign="Center"></ItemStyle>  
            </telerik:GridBoundColumn>  
            <telerik:GridBoundColumn DataField="AgentInitials" HeaderText="Agent Initials" ItemStyle-HorizontalAlign="Center" 
                SortExpression="AgentInitials" UniqueName="AgentInitials">  
<ItemStyle HorizontalAlign="Center"></ItemStyle>  
            </telerik:GridBoundColumn>  
            <telerik:GridBoundColumn DataField="ClientNumber" HeaderText="Client Number" ItemStyle-HorizontalAlign="Center" 
                SortExpression="ClientNumber" UniqueName="ClientNumber">  
<ItemStyle HorizontalAlign="Center"></ItemStyle>  
            </telerik:GridBoundColumn>  
        </Columns>  
        <PagerStyle Mode="NextPrevAndNumeric" />  
        <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"   
            Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center"   
            Wrap="True" />  
       
            <CommandItemTemplate>  
                <asp:Button ID="Button1" runat="server" Text="Review Selected Call" OnClientClick="return LoadReviewForm();" />  
            </CommandItemTemplate>  
         </MasterTableView>  
    <FilterMenu>  
        <CollapseAnimation Type="OutQuint" Duration="200">  
        </CollapseAnimation>  
    </FilterMenu>  
<ClientSettings EnablePostBackOnRowClick="true">  
    <Selecting AllowRowSelect="True" />  
</ClientSettings>  
</telerik:RadGrid>  
 

Here's the test page grid code:

    <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="LoggerDS">  
<MasterTableView AutoGenerateColumns="False" DataSourceID="LoggerDS">  
<RowIndicatorColumn>  
<HeaderStyle Width="20px"></HeaderStyle>  
</RowIndicatorColumn>  
 
<ExpandCollapseColumn>  
<HeaderStyle Width="20px"></HeaderStyle>  
</ExpandCollapseColumn>  
    <Columns>  
        <telerik:GridBoundColumn DataField="CallID" DataType="System.Byte"   
            HeaderText="CallID" SortExpression="CallID" UniqueName="CallID">  
        </telerik:GridBoundColumn>  
        <telerik:GridBoundColumn DataField="CallTime" DataType="System.DateTime"   
            HeaderText="CallTime" SortExpression="CallTime" UniqueName="CallTime">  
        </telerik:GridBoundColumn>  
        <telerik:GridBoundColumn DataField="CallDuration" DataType="System.Int32"   
            HeaderText="CallDuration" SortExpression="CallDuration"   
            UniqueName="CallDuration">  
        </telerik:GridBoundColumn>  
        <telerik:GridBoundColumn DataField="StationNumber" HeaderText="StationNumber"   
            SortExpression="StationNumber" UniqueName="StationNumber">  
        </telerik:GridBoundColumn>  
        <telerik:GridBoundColumn DataField="AgentInitials" HeaderText="AgentInitials"   
            SortExpression="AgentInitials" UniqueName="AgentInitials">  
        </telerik:GridBoundColumn>  
        <telerik:GridBoundColumn DataField="ClientNumber" HeaderText="ClientNumber"   
            SortExpression="ClientNumber" UniqueName="ClientNumber">  
        </telerik:GridBoundColumn>  
        <telerik:GridBoundColumn DataField="CallNumber" HeaderText="CallNumber"   
            SortExpression="CallNumber" UniqueName="CallNumber">  
        </telerik:GridBoundColumn>  
    </Columns>  
</MasterTableView>  
    </telerik:RadGrid> 

Any suggestions?

Thanks,
Joe
Dimo
Telerik team
 answered on 02 Jun 2009
10 answers
438 views
I love that you added an imageditor to Rad Editor, but is there any way to the adjust the jpg compression? I've tried resizing an image, and cropping an image. In both tests the thumb created has so low quality that its useless.
Lini
Telerik team
 answered on 02 Jun 2009
17 answers
290 views
Hi friends,

I am having a strange problem that is driving me crazy.

I am trying to get for my pager something between "NextPrev" and "NextPrevAndNumeric" mode. There´s something in "NextPrevAndNumeric" that I like but at the same time is adding one more thing that I want to delete.

The format is the following:

<<  <  1 2 3 4 5 6 7 8 9... >  >>   Page size: (checkbox) select    ...........................................

I would like to delete "Page size: checkbox select" part. For so I thought I would have to change it from the text in PagerTextFormat property. Unfortunately this text can´t be found in this property and therefore, it´s not possible to delete it.

I wouldn´t like to use PagerTemplate tag.

Is there any other way to remove this part?Am I missing something?
fca
Top achievements
Rank 2
 answered on 02 Jun 2009
1 answer
137 views
Hey,

I am having a problem hiding the expand icon on a Grid.  I've been trying to follow the examples in the documentation, but I'm trying to do it a little different than what is posted.  I have a column in the master view that tells me if I have additional records in a detail table.  So I'm trying to utilize this column in order to show or hide the expand icon.

Here is an example of what I have so far, but I must admit, I'm really lost.

  Dim nestedViewItems As GridItem() = tableView.GetItems(GridItemType.Item) 
            For Each nestedViewItem As GridItem In nestedViewItems 
                If nestedViewItem.DataItem("AdditionalAddresses") > 0 Then 
                    Dim NestedGridItem As GridNestedViewItem = NestedGridItems(nestedViewItem.ItemIndex) 
                    Dim cell As TableCell = NestedGridItem.NestedTableViews(0).ParentItem("ExpandColumn"
                    cell.Controls(0).Visible = False 
                    nestedViewItem.Visible = False 
                End If 
            Next 

I am getting in the if statement based on my "AdditionalAddresses" column, however, I can't seem to find out how to reference the "expandColumn" cell.

Thanks,
Bob
Shinu
Top achievements
Rank 2
 answered on 02 Jun 2009
2 answers
59 views
Hi All,

The problem.
When i click on the Insert btn (CommandItemTemplate) of the Detail table, it does not go into "Insert Mode", ie no New Grid Row is provided (inline mode) to capture data into.
Is there a requirement I'm missing??

Scenario:
  • I am not using the <ParentTableRelation> . (I mention it because I don't know if this could cause the issue).  
  • DataBinding occurs in the DetailTableDataBind event.(MainGrid uses OnNeedDataSource).

Thanks
Neal

 

Neal
Top achievements
Rank 1
 answered on 02 Jun 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?