Telerik Forums
UI for ASP.NET AJAX Forum
8 answers
180 views
I have a radgrid and a radajaxmanager (2008 Q3) in a page.

It is a simple page, basically, it has the radgrid's NeedDataSource and an itemdatabound to generate the row numbering. 

When the page is first load, the filtering function is fine.

Then, if I perform a second filtering, the filter context memu does not appear, with script error:

'null' is not or not an object 

If I removed the radajaxmanager, second filtering is ok.

The code:

 

Protected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs)  
        Dim myTable As New DataTable  
        myTable = dbSearchPart_Cost 
        If myTable Is Nothing Then  
            msgMessage.Text = "System error.  Cannot connect to database! " 
            GoTo error_exit  
        End If  
        RadGrid1.DataSource = myTable 
 
        GoTo exit_sub  
error_exit:  
        msgMessage.CssClass = "ErrorText" 
exit_sub:  
        myTable = Nothing 
    End Sub  
 
    Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound  
        If (TypeOf e.Item Is GridDataItem) Then  
            Dim lbl As Label = CType(e.Item.FindControl("numberLabel"), Label)  
            lbl.Text = e.Item.ItemIndex + 1  
        End If  
    End Sub 

The aspx page
<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" GridLines="None" 
                    OnNeedDataSource="RadGrid1_NeedDataSource" Skin="Forest" EnableViewState="False" 
                    AllowPaging="True" PageSize="50" ShowStatusBar="True" AllowSorting="True" AllowFilteringByColumn="True"  > 
                    <HeaderContextMenu Skin="SkyBlue">  
                        <CollapseAnimation Duration="200" Type="OutQuint" /> 
                    </HeaderContextMenu> 
                    <MasterTableView EnableViewState="False"  DataKeyNames="PartID">  
                        <Columns> 
                            <telerik:GridBoundColumn DataField="PartID" UniqueName="ID" Visible="False">  
                            </telerik:GridBoundColumn> 
                            <telerik:GridTemplateColumn UniqueName="RowNo" HeaderText="Item" AllowFiltering="False">  
                                <ItemTemplate> 
                                    <asp:Label ID="numberLabel" runat="server" Width="30px" /> 
                                </ItemTemplate> 
                                <HeaderStyle Width="30px" /> 
                            </telerik:GridTemplateColumn> 
                            <telerik:GridTemplateColumn UniqueName="chkItem" AllowFiltering="False">  
                                <ItemTemplate> 
                                    <asp:CheckBox ID="chkItem" runat="server" Width="30px" /> 
                                </ItemTemplate> 
                                <HeaderStyle Width="30px" /> 
                            </telerik:GridTemplateColumn> 
                            <telerik:GridHyperLinkColumn Text="&lt;img src='icon/icon_write.gif' border='0'/&gt;" 
                                DataNavigateUrlFields="PartID" DataNavigateUrlFormatString="~/index.aspx?mode=PartEdit&amp;opn=edit&amp;ID={0}" 
                                UniqueName="Edit" AllowFiltering="False">  
                                <HeaderStyle Width="30px" /> 
                            </telerik:GridHyperLinkColumn> 
                            <telerik:GridTemplateColumn DataField="PartID" AllowFiltering="False" UniqueName="Setup">  
                                <ItemTemplate> 
                                    <img src="icon/icon_plus.gif" onclick="ShowNewWindow('<%# Eval("PartID") %>');return false;" 
                                        style="cursor: pointer;" /> 
                                </ItemTemplate> 
                                <HeaderStyle Width="30px" /> 
                            </telerik:GridTemplateColumn> 
                            <telerik:GridTemplateColumn UniqueName="PartActive" DataField="PartActive" SortExpression="PartActive" 
                                FilterControlWidth="15px">  
                                <ItemTemplate> 
                                    <asp:CheckBox ID="chkActive" Checked='<%# GetActive(Eval("PartActive")) %>' Enabled="false" 
                                        runat="server" /> 
                                </ItemTemplate> 
                                <HeaderStyle Width="30px" /> 
                            </telerik:GridTemplateColumn> 
                            <telerik:GridBoundColumn DataField="PartNo" UniqueName="PartNo" FilterControlWidth="60px">  
                                <HeaderStyle Width="80px" /> 
                            </telerik:GridBoundColumn> 
                             <telerik:GridBoundColumn DataField="PartName" UniqueName="PartName">  
                                <HeaderStyle Width="200px" /> 
                            </telerik:GridBoundColumn> 
                            <telerik:GridTemplateColumn UniqueName="Desc" DataField="Desc1, Desc2, Desc3" 
                                SortExpression="Desc1"   AllowFiltering="false">  
                                <ItemTemplate> 
                                                                       <asp:Label ID="PartDesc" Text='<%#GetLength(Eval("Desc1") + Eval("Desc2") + Eval("Desc3"), 250)%>' 
                                        runat="server"></asp:Label> 
                                </ItemTemplate> 
                                <HeaderStyle Width="200px" /> 
                            </telerik:GridTemplateColumn> 
                            <telerik:GridTemplateColumn UniqueName="PartPrice" DataField="PriceCurrency1,PriceCurrency2, PriceCurrency3, PriceCurrency4, PriceCurrency5, Price1, Price2, Price3, Price4, Price5" SortExpression="Price1"  AllowFiltering="false">  
                                <ItemTemplate> 
                                    <%# Eval("PriceCurrency1") %> 
                                    <%# Eval("Price1") %> 
                                    <br /> 
                                    <%# Eval("PriceCurrency2") %> 
                                    <%# Eval("Price2") %> 
                                    <br /> 
                                    <%# Eval("PriceCurrency3") %> 
                                    <%# Eval("Price3") %> 
                                    <br /> 
                                    <%# Eval("PriceCurrency4") %> 
                                    <%# Eval("Price4") %> 
                                    <br /> 
                                    <%# Eval("PriceCurrency5") %> 
                                    <%# Eval("Price5") %> 
                                </ItemTemplate> 
                                <HeaderStyle Width="100px" /> 
                            </telerik:GridTemplateColumn> 
                            <telerik:GridTemplateColumn UniqueName="PartCost" DataField="CostCurrency, Cost" SortExpression="Cost"  AllowFiltering="false">  
                                <ItemTemplate> 
                                    <%# Eval("CostCurrency") %> 
                                    <%#Eval("Cost")%> 
                                </ItemTemplate> 
                                <HeaderStyle Width="100px" /> 
                            </telerik:GridTemplateColumn> 
                            <telerik:GridTemplateColumn UniqueName="PartQty" DataField="PartID" FilterControlWidth="60px"  AllowFiltering="false" > 
                                <ItemTemplate> 
                                    <asp:Literal ID="PartQty" Text='<%# GetQty(Eval("PartID")) %>' runat="server"   /> 
                                </ItemTemplate> 
                                <HeaderStyle Width="100px" /> 
                            </telerik:GridTemplateColumn> 
                            <telerik:GridBoundColumn DataField="ProductGroup" UniqueName="ProductGroup" FilterControlWidth="50px">  
                                <HeaderStyle Width="100px" /> 
                            </telerik:GridBoundColumn> 
                        </Columns> 
                        <PagerStyle Mode="NextPrevNumericAndAdvanced" /> 
                    </MasterTableView> 
                    <PagerStyle Mode="NumericPages" /> 
                    <FilterMenu Skin="Forest">  
                        <CollapseAnimation Duration="200" Type="OutQuint" /> 
                    </FilterMenu> 
                </telerik:RadGrid> 

And the ajaxmanager:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnablePageHeadUpdate="False" 
    DefaultLoadingPanelID="RadAjaxLoadingPanel1">  
    <AjaxSettings> 
        <telerik:AjaxSetting AjaxControlID="RadGrid1">  
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
          <telerik:AjaxSetting AjaxControlID="btnRefresh">  
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
    </AjaxSettings> 
</telerik:RadAjaxManager> 
 
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" 
    Width="75px">  
    <img alt="Loading..." src="icon/spinner.gif" style="border: 0px;" /> 
</telerik:RadAjaxLoadingPanel> 
Veli
Telerik team
 answered on 16 Jul 2009
2 answers
133 views
Hello,
I have a general question on the demo found at http://demos.telerik.com/aspnet-ajax/scheduler/examples/radtooltip/defaultcs.aspx
I was able to duplicate this in my project, and it works perfectly.  I do not like simply cutting and pasting unless I fully understand the detail.   I am currious why the Scheduler appointment created and databoud events are assigned the way they are in the example.  Instead of declaring them in tag attributes in the ascx file,  they are assigned values in the code behind in the page load.  In addition, using the += and without checking for postback appears to me as though we are adding multiple duplicate event handlers.  I do not pertend to be an expert on this, in fact, it is why I ask the question as to gain a better understanding.  The following shows the page load from this exampe.

private void Page_Load(object sender, EventArgs e)
        {
            RadScheduler1.AppointmentCreated += RadScheduler1_AppointmentCreated;
            RadScheduler1.DataBound += RadScheduler1_DataBound;
        }
Jim
Top achievements
Rank 2
 answered on 16 Jul 2009
13 answers
347 views
Hello,

From what I see in your demo, your captcha is missing:
- using random colors for letters (very nice to see) and not only one color,
- optionally working as a page validator (could be turn on by a property) with validation group.
- auto reset after ajax request

Hope it will be in Q2 :)

Thanks
CS
Pero
Telerik team
 answered on 16 Jul 2009
2 answers
121 views
I added entries within the <tools> element in this file:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\wpresources\RadEditorSharePoint\4.5.6.0__1f131a624888eeed\RadControls\Editor\ToolsFile.xml

as follows:

    <!-- Added for media files --> 
    <tool name="FlashManager" /> 
    <tool name="MediaManager" /> 

I saved the file, reset IIS on the server and the buttons appear on the toolbar when I edit a RADControl web part.  But when I click on the buttons I get an error dialog:

Could not find the command FlashManager.  Please update your command list.

Anyone got any idea why?  The help file says I should be able to use the FlashManager control right?

My server is 64 bit Windows Server 2003
Lars Nielsen
Top achievements
Rank 1
 answered on 16 Jul 2009
1 answer
114 views
In a couple of Grids of mine i have a column with a ComboBox in it. The ComboBox is using LoadOnDemand and javascript to handle this is auto-generated by the ComboBox for each row in the grid.

Is there any good way or best practices to reduce the amount of javascript being generated?

Thanks in advance!
Georgi Krustev
Telerik team
 answered on 16 Jul 2009
2 answers
338 views
Is it possible to take the grid row into Inline Edit Mode on a single click. I want the previous row's update command to be fired and the edited row's Edit Command events to be fired. If the update command fails due to validation, I want to be able to retain the user in the previous row. There is an example using double-click and click which I have already looked into but I want to something similar with a single row click.

Thanks
Shanthala Somashekar
Top achievements
Rank 1
 answered on 16 Jul 2009
2 answers
106 views
I don't know if I'm missing something but the tools bold, italic, Ordered, unorderedlist, indent, outdent don't work. Can someone please help?


 

 

 
<telerik:RadEditor ID="htmlEditor" runat="server" OnClientLoad = "OnClientLoad" 
                        AllowScripts="True" Width="100%" Height="500" Skin="Vista" EditModes="Design,Html"  > 
                        <Tools> 
                            <telerik:EditorToolGroup> 
                            <telerik:EditorTool Name="btnSave" Text="Save" ShowIcon="false" ShowText="true" /> 
                            <telerik:EditorSeparator Visible="true" /> 
                            <telerik:EditorTool Name="Cut" /> 
                            <telerik:EditorTool Name="Copy" /> 
                            <telerik:EditorTool Name="Paste" /> 
                            <telerik:EditorSeparator Visible="true" />   
                                                       
                            <telerik:EditorTool Name="Undo" /> 
                            <telerik:EditorTool Name="Redo" /> 
                              
                            <telerik:EditorSeparator Visible="true" /> 
                            <telerik:EditorTool Name="FontName"  />    
                            <telerik:EditorTool Name="RealFontSize" Text="Size"/>     
                            <telerik:EditorTool Name="ForeColor" />    
                            <telerik:EditorTool Name="Bold" ShortCut="CTRL+B" />    
                            <telerik:EditorTool Name="Italic" ShortCut="Ctrl+I" />    
                            <telerik:EditorTool Name="Underline" ShortCut="Ctrl+U" />    
                            <telerik:EditorTool Name="JustifyLeft" />    
                            <telerik:EditorTool Name="JustifyCenter" />    
                            <telerik:EditorTool Name="JustifyRight" />    
                            <telerik:EditorTool Name="InsertUnorderedList" />    
                            <telerik:EditorTool Name="InsertOrderedList" />    
                            <telerik:EditorTool Name="Indent" />    
                            <telerik:EditorTool Name="Outdent" />    
                            <telerik:EditorSeparator Visible="true" /> 
 
                            <telerik:EditorTool Name="TemplateManager" /> 
                            <telerik:EditorSeparator  Visible="true" /> 
                            <telerik:EditorTool Name="btnPreviewIE" Text="Preview IE" ShowIcon="false" ShowText="true"  /> 
                            <telerik:EditorTool Name="btnPreviewFF" Text="Preview Firefox" ShowIcon="false" ShowText="true"  /> 
                            <telerik:EditorTool Name="btnPreviewSafari" Text="Preview Safari" ShowIcon="false" ShowText="true"  /> 
                          </telerik:EditorToolGroup> 
                            
                          </Tools> 
                        <Snippets> 
                            <telerik:EditorSnippet Name="First Name">  
                                &nbsp;&nbsp;<h1>%%FirstName%%</h1> 
                            </telerik:EditorSnippet> 
                            <telerik:EditorSnippet Name="Last Name">  
                                &nbsp;&nbsp;<h1>%%LastName%%</h1>     
                            </telerik:EditorSnippet> 
                        </Snippets> 
                        <MediaManager DeletePaths="~/WebApp" UploadPaths="~/WebApp"   
                            ViewPaths="~/WebApp" /> 
                        <DocumentManager SearchPatterns="*.*"  DeletePaths="~/Common" UploadPaths="~/Common"   
                            ViewPaths="~/Common" /> 
                        <TemplateManager DeletePaths="~/Templates" UploadPaths="~/templates" ViewPaths="~/Templates" />                             
                        <Content>                  
                        </Content> 
                        <ImageManager DeletePaths="~/resources/crm/images" SearchPatterns="*.png,*.gif"   
                            UploadPaths="~/resources/crm/images" ViewPaths="~/resources/crm/images" /> 
                    </telerik:RadEditor>       

 

Shiv
Top achievements
Rank 1
 answered on 16 Jul 2009
1 answer
92 views
Hi all,


I need to know how to increase the font size of the date inside the cell in month view in scheduler. Please post some examples.

Thanks,
Saravanan.S


Princy
Top achievements
Rank 2
 answered on 16 Jul 2009
18 answers
356 views
Hello,
From the rad editor - select image manager.
All images are viewable, I can upload, delete, and re-name.

However if I select an image and go to properties the height is always 15 and the width is always 0.
If I just select an image (skipping viewing properties) and insert in into the rad editor content area there will be a style that set width=0 and height =15.

What's the bug here?
thanks!!

rolling with:
2009, sp 1
c#
.net 3.5
iis7
Ben Baker
Top achievements
Rank 1
 answered on 16 Jul 2009
1 answer
82 views
i have added mutiple usercontrols in a single page, and each usercontrols are using RadToolTipManager for displaying data in tooltip of RadGrid(item cell), but im facing problem, as sometimes it shows tooltip and sometimes doesn't. Is there any limitation of using multiple RadToolTipManager in a single page. Or what is the solution for this problem? Can anybody please suggest it?
Svetlina Anati
Telerik team
 answered on 16 Jul 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?