Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
106 views

Following  are  2 paneltems in the panel bar.  On button click of btnAddAccountChecking I am trying to expand  CheckingAddUserControl panel item. It does expand the panel item but after that it breaks on Telerik general   undefined object null javascript error  .

This is the code to attach java function for CheckingAddUserControl Client side processing.

Dim btnAddChecking As ImageButton = CType(pnlTopLevel.Items().FindItemByValue("CheckingAdd").Items().FindItemByValue("CheckingAddbtn").FindControl("btnAddAccountChecking"), ImageButton)

Dim openWinScript As String = "SetVisibility('CheckingAddUserControl');"

                  btnAddChecking.OnClientClick = openWinScript

This is the JavaScript Function:

     <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">  

    <script type="text/javascript">

           

            function SetVisibility(itemValue) {

                  var panelBar = $find("<%= pnlBarAccounts.ClientID %>");

                  var panelItem = panelBar.findItemByValue(itemValue);

                  panelItem.expand();

         }

            

    </script>

</telerik:RadCodeBlock>

These are the panelitems

 

<telerik:RadPanelItem value="CheckingAdd" runat="server" Text="CheckingAdd" Expanded="true" style="display:none;">

                                                <Items>

                                                      <telerik:RadPanelItem value="CheckingAddbtn" runat="server" Text="" Expanded="true">

                                                            <ItemTemplate>

                                                                  <br />

                                                                  <asp:ImageButton ID="btnAddAccountChecking" runat="server"  />

                                                            </ItemTemplate> 

                                                      </telerik:RadPanelItem>

                                                </Items>

                                                 </telerik:RadPanelItem>

                                          <telerik:RadPanelItem value="CheckingAddUserControl" runat="server" Expanded="false" Visible="true">

                                                <Items>    

                                                      <telerik:RadPanelItem  runat="server" Expanded="true" >

                                                            <ItemTemplate>

                                                                  <UC1:CheckingAcct ID="CheckingAcct1" runat="server"   AcctID="0" />

                                                            </ItemTemplate> 

                                                      </telerik:RadPanelItem>

                                                </Items>

                                          </telerik:RadPanelItem>

A K
Top achievements
Rank 1
 asked on 23 Apr 2010
2 answers
156 views
Hi,

I want to create a pie chart like the attached image 'GraphNeeded.jpg' but I am not able to remove the outer border which contains the caption text( I am only able to create the pie chart like 'Piechart.png' ). Is there any way to

1. Remove the outer border coming with pie chart
2. Any way to align pie chart to left and the legend to right inside pie chart area
3. Provide an underline to view all


Please advice.

Thanks,
Pramod M
Pramod M
Top achievements
Rank 1
 answered on 23 Apr 2010
6 answers
236 views
I am not sure why this is happening, but it ONLY happens when exporting to Excel.  I have this same export functionality on other pages that work fine, for some reason this page doesn't like it and I am not sure why.

I specify the file name and format on the grid itself and then simply have these buttons:
<asp:ImageButton ID="btn_ExportCSV" runat="server" 
                OnClick="btn_ExportCSV_Click" BorderColor="#F0A54E"  
                BorderStyle="Ridge"  
                ImageUrl="~/images/export_csv.jpg" />&nbsp;&nbsp;&nbsp;&nbsp; 
            <asp:ImageButton ID="btn_ExportEXCEL" runat="server" 
                OnClick="btn_ExportEXCEL_Click" BorderColor="#F0A54E"  
                BorderStyle="Ridge"  
                ImageUrl="~/images/export_excel.jpg" />&nbsp;&nbsp;&nbsp;&nbsp; 
            <asp:ImageButton ID="btn_ExportWORD" runat="server" 
                OnClick="btn_ExportWORD_Click" BorderColor="#F0A54E"  
                BorderStyle="Ridge"  
                ImageUrl="~/images/export_word.jpg" />         
 Protected Sub btn_ExportEXCEL_Click(ByVal sender As ObjectByVal e As System.EventArgs) Handles btn_ExportEXCEL.Click 
        ConfigureExport() 
        grid_applications.MasterTableView.ExportToExcel() 
    End Sub 
 
    Protected Sub btn_ExportWORD_Click(ByVal sender As ObjectByVal e As System.EventArgs) Handles btn_ExportWORD.Click 
        ConfigureExport() 
        grid_applications.MasterTableView.ExportToWord() 
    End Sub 
 
    Protected Sub btn_ExportCSV_Click(ByVal sender As ObjectByVal e As System.EventArgs) Handles btn_ExportCSV.Click 
        ConfigureExport() 
        grid_applications.MasterTableView.ExportToCSV() 
    End Sub 
 
 
    Public Sub ConfigureExport() 
 
        For x = 2 To 22 'display only columns I want 
 
            grid_applications.MasterTableView.Columns(x).Visible = True 
 
        Next 
 
    End Sub 

When I click CSV or WORD it works fine. When i click Excel Export I get:

The RegisterRequiresViewStateEncryption() method needs to be called before or during Page_PreRender.

Line 131:                BorderStyle="Ridge" 
Line 132:                ImageUrl="~/images/export_word.jpg" />        
Line 133:<telerik:RadGrid ID="grid_applications" runat="server" DataSourceID="sqlds_Applications" 
Line 134:        GridLines="None" Width="1100px" AllowFilteringByColumn="True" 
Line 135:        AllowPaging="True" AllowSorting="True" PageSize="30" ShowGroupPanel="True">




Bruno
Top achievements
Rank 2
 answered on 23 Apr 2010
3 answers
370 views
I have a RadCodeBlock defined on my page with some JS code but I need to add more JS script dynamically/programatically.
Can someone help?

Chris
Libertas Technologies
Top achievements
Rank 1
 answered on 23 Apr 2010
4 answers
198 views
Hi,

in my application, there are some RadPanes inside an RadSlidingPane which is inside an RadSlidingZone filling the entire page. Is it possible to have scrolling enabled in one of these nested RadPanes?

It seems as if there are scrollbars, but they aren't visible. I tried many tricks I found on your website but without results.

Best regards
Lucas
Lucas Bonifacius
Top achievements
Rank 1
 answered on 23 Apr 2010
2 answers
232 views
Hi there!

I need to set a mask for the input of a combobox. Does this component already has any capability to do this by itself? If I attach an event to the textbox (_input) of the combobox, would it be overriden by the filter's property default behaviour?

I´d really appreciate any help

Best regards

Eduardo.
Eduardo Oliveira
Top achievements
Rank 1
 answered on 23 Apr 2010
2 answers
92 views
Hi

I was working on having a floating div show up at the end of the tree node when the mouse hovers on the node,I was able to position the div based on the mouse position but, is there a way to get the length/width of the tree node, because I want to position my div to show up right at the point where the node ends not where my mouse is at?

I am doing all this on the client side.May be there is another way of doing this, if so please let me know.

Thanks
Rishi
Top achievements
Rank 1
 answered on 23 Apr 2010
3 answers
275 views
Hello, I implemented the "Listview/Image Gallery"-demo and it looks great (thanks for that :-)).
But in my case the pictures can be both landscape and portrait, and i'm unable to center the images in the middle of the fieldset as you can see in the attachment. What am I doing wrong?

<h2> 
            Foto's</h2> 
        <div> 
            <asp:ScriptManager EnableViewState="false" runat="server" ID="ScriptManagerPand"/> 
            <telerik:RadAjaxLoadingPanel EnableViewState="false" runat="server" ID="RadAjaxLoadingPanelPand" MinDisplayTime="200" /> 
            <telerik:RadFormDecorator EnableViewState="false" runat="server" ID="RadFormDecoratorPand" DecoratedControls="All" Skin="Outlook"/> 
            <telerik:RadAjaxPanel EnableViewState="false" runat="server" ID="RadAjaxPanelPand" LoadingPanelID="RadAjaxLoadingPanelPand"
                <telerik:RadListView EnableViewState="false" runat="server" ID="RadListViewPand" DataSourceID="ObjectDataSourcePand" 
                    AllowPaging="true" PageSize="20" DataKeyNames="Id" OverrideDataSourceControlSorting="true"
                    <LayoutTemplate> 
                        <div id="ListPand"
                            <asp:Panel EnableViewState="false" runat="server" ID="PanelPand" Style="float: left; margin-left: 160px" 
                                Visible="<%#Container.PageCount > 1 %>"
                                <asp:Button runat="server" ID="PrevButton" CommandName="Page" CommandArgument="Prev" 
                                    Text="Vorige" Enabled="<%#Container.CurrentPageIndex > 0 %>"/> 
                                <asp:Button runat="server" ID="NextButton" CommandName="Page" CommandArgument="Next" 
                                    Text="Volgende" Enabled="<%#Container.CurrentPageIndex < Container.PageCount - 1 %>"/> 
                            </asp:Panel> 
                            <div> 
                                <telerik:RadSlider runat="server" ID="RadSliderPand" MaximumValue="3" MinimumValue="1" 
                                    Value="2" LiveDrag="false" SmallChange="1" AutoPostBack="true" OnValueChanged="RadSliderPand_ValueChanged" 
                                    Width="150px" CausesValidation="false" Skin="Outlook" /> 
                            </div> 
                            <div style="clear: both;"
                            </div> 
                            <fieldset runat="server" id="itemPlaceholder" /> 
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<div style="clear: both;"
                            </div> 
                        </div> 
                    </LayoutTemplate> 
                    <ItemTemplate> 
                        <fieldset style="float:left; width: <%#ImageWidth.Value+4%>px; height: <%#ImageHeight.Value+4%>px; margin-bottom: 4px"
                            <telerik:RadBinaryImage EnableViewState="false" Style="cursor: pointer; background: #eeeeee; padding: 2px 2px 2px 2px;" runat="server" ID="RadBinaryImagePand" 
                                DataValue='<%#Eval("Data") %>' Height='<%#ImageHeight %>' Width='<%#ImageWidth %>' 
                                ResizeMode="Fit" ImageAlign="Middle" onclick="<%#CreateWindowScript(DirectCast(Container.DataItem, Photo)) %>" AlternateText="Klik om te vergroten" 
                                ToolTip="<%#DirectCast(Container.DataItem, Photo).ID %>" class="myClass" onmouseover="containerMouseover(this)" onmouseout="containerMouseout(this)" /> 
                        </fieldset> 
                    </ItemTemplate> 
                </telerik:RadListView> 
            </telerik:RadAjaxPanel> 
            <asp:ObjectDataSource runat="server" ID="ObjectDataSourcePand" SelectMethod="GetData" 
                TypeName="Data.DataProvider"
                <SelectParameters> 
                    <asp:Parameter Name="PandID" /> 
                </SelectParameters> 
            </asp:ObjectDataSource> 
            <telerik:RadWindowManager runat="server" ID="RadWindowManagerPand"
                <Windows> 
                    <telerik:RadWindow VisibleStatusbar="false" runat="server" ID="WindowHuurpandFoto" NavigateUrl="HuurpandFoto.aspx" 
                        Width="635px" Height="530px" AutoSize="false" Behaviors="Close,Move" ShowContentDuringLoad="false" 
                        Modal="true" ReloadOnShow="true"
                    </telerik:RadWindow> 
                </Windows> 
            </telerik:RadWindowManager> 
        </div> 

     Protected Sub RadSliderPand_ValueChanged(ByVal sender As Object, ByVal e As EventArgs) 
        Dim selectedValue As Integer = DirectCast(sender, RadSlider).Value 
 
        Select Case selectedValue 
            Case 1 
                If True Then 
                    ImageHeight = Unit.Pixel(76) 
                    ImageWidth = Unit.Pixel(76) 
                    RadListViewPand.PageSize = 20 
                    Exit Select 
                End If 
            Case 2 
                If True Then 
                    ImageHeight = Unit.Pixel(158) 
                    ImageWidth = Unit.Pixel(158) 
                    RadListViewPand.PageSize = 10 
                    Exit Select 
                End If 
            Case 3 
                If True Then 
                    ImageHeight = Unit.Pixel(287) 
                    ImageWidth = Unit.Pixel(287) 
                    RadListViewPand.PageSize = 6 
                    Exit Select 
                End If 
        End Select 
        RadListViewPand.CurrentPageIndex = 0 
        RadListViewPand.Rebind() 
    End Sub 
 
    Protected Property ImageWidth() As Unit 
        Get 
            Dim state As Object = If(ViewState("ImageWidth"), Unit.Pixel(160)) 
            Return DirectCast(state, Unit) 
        End Get 
        Private Set(ByVal value As Unit) 
            ViewState("ImageWidth") = value 
        End Set 
    End Property 
 
    Protected Property ImageHeight() As Unit 
        Get 
            Dim state As Object = If(ViewState("ImageHeight"), Unit.Pixel(160)) 
            Return DirectCast(state, Unit) 
        End Get 
        Private Set(ByVal value As Unit) 
            ViewState("ImageHeight") = value 
        End Set 
    End Property 

Thanks!

Rosen
Telerik team
 answered on 23 Apr 2010
3 answers
171 views
Hi,

I need to get a grid data when paging...actually I have this code and it works good, but may be exist a better way to do this.


            string ids = ""
            this.rg_lead.AllowPaging = false
            this.rg_lead.DataBind(); 
 
            foreach (GridDataItem item in this.rg_lead.Items) 
            { 
                if (!ids.Contains("," + item["id"].Text + ",") && ids.Split(',')[0] != item["id"].Text) 
                { 
                    ids += item["id"].Text + ","
                } 
            } 
 
            this.rg_lead.AllowPaging = true
            this.rg_lead.DataBind(); 

Thanks
Radoslav
Telerik team
 answered on 23 Apr 2010
1 answer
111 views
Hi,

are there any known issues with the Radgrid (ASP.NET AJAX Q1 2010 version) in IE8 compatibility mode in SharePoint 2010?
We sometimes encountered layout issues the the column width and the filters are rendered to the bottom of the filter row

Thanks a lot,
Michael
Sebastian
Telerik team
 answered on 23 Apr 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?