Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
326 views
Hi Friends,

i have 2 asp:Panel in the RadAjaxPanel with default buttons set for each panels
i just want know how to make the default button work when i focus to its appropriate textbox and press enter.
plzz help aspd

<telerik:RadScriptManager id="RadScriptManager1" runat="server" EnableTheming="True"></telerik:RadScriptManager>
<telerik:RadAjaxLoadingPanel id="RadAjaxLoadingPanel1" Runat="server" Transparency="30" style="background:url('../Images/LoadingTitle.gif') center center no-repeat #f3f3e2;"></telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxPanel ID="CMSRadAPan" runat="server" EnableHistory="True" HorizontalAlign="NotSet" LoadingPanelID="RadAjaxLoadingPanel1">
<asp:Panel ID="pnl1" runat="server" defaultbutton="Button1" style="border:1px outset #abcdef;background-color:#abcdef">
 <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
 <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
 <asp:Button ID="Button1" runat="server" Text="Button1" OnClick="Button1_Click" />
</asp:Panel>

<asp:Panel ID="Panel1" runat="server" defaultbutton="Button2" style="border:1px outset #fedcba;background-color:#fedcba">   
 <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
 <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>    
 <asp:Button ID="Button2" runat="server" Text="Button2" OnClick="Button2_Click" />
</asp:Panel>

</telerik:RadAjaxPanel>


Thanks

 

 

 

 

Maria Ilieva
Telerik team
 answered on 12 Aug 2010
0 answers
67 views

The text of panel item I want to format following way. How do I do this. I want to show Name of the Item + a Tab + Amount for that item.

I am bouding panel bar to a dataTable, before bounding I would like to format the text in a data table following way. I tried vbTab. It did not work.

“Name” + VBTAB + “Amount”

A K
Top achievements
Rank 1
 asked on 12 Aug 2010
1 answer
268 views
Hi,

In my page there's a RadSplitter with 3 RadGrids, 2 of them are in a SlidingPane, see aspx-code below.
I want to drag items from the two grids in the slidingPanes into the other grid. Therefore I use the RadAjaxManager with dynamically added AjaxSettings on preRender.

This is what happens:
The first time I drag an item into the grid everything works fine, except the following text appears above the grid:
"16651|updatePanel|ctl00_ContentPlaceHolderMain_ctl00_ContentPlaceHolderMain_grdPlaylistItemsPanel|"

When after that I drag another item into the grid, I get a JS error:
"Runtime-fout Microsoft JScript: Sys.InvalidOperationException: Could not find UpdatePanel with ID 'ctl00_ContentPlaceHolderMain_ctl00_ContentPlaceHolderMain_grdPlaylistItemsPanel'. If it is being updated dynamically then it must be inside another UpdatePanel."

I tried adding the AjaxSettings in the aspx-page or dynamically, but that makes no difference. I even tried to use the AjaxManagerProxy instead of the AjaxManager. Then I don't get the error, but I don't see the loadingPanel.

Here's my code:
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderMain" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Office2007" />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
         
    </telerik:RadAjaxManager>
    <asp:UpdatePanel runat="server" ID="UpdatePanel">
        <ContentTemplate>
            <cc1:QYNPanel ID="QynPanel" runat="server">
                <asp:Label ID="lblHeader" runat="server" CssClass="panel-header"></asp:Label>
                <table class="form">
                    <tr>
                        <td>
                            <asp:Label ID="lblName" runat="server" Text="Name"></asp:Label>
                        </td>
                        <td>
                            <uc1:QYNTextBox ID="txtName" runat="server" Name="Name" MaxLength="255" Width="500" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblDescription" runat="server" Text="Description"></asp:Label>
                        </td>
                        <td>
                            <uc1:QYNTextBox ID="txtDescription" runat="server" Name="Description" MaxLength="255"
                                Width="500" IsValidEmpty="True" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblPickPolicy" runat="server" Text="Playback Method"></asp:Label>
                        </td>
                        <td>
                            <asp:RadioButtonList ID="rblPickPolicy" runat="server" AutoPostBack="True">
                            </asp:RadioButtonList>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblArchived" runat="server" Text="Archived"></asp:Label>
                        </td>
                        <td>
                            <asp:CheckBox ID="chkArchived" runat="server" />
                        </td>
                    </tr>
                </table>
                <br />
                <br />
                <strong>Playlist Items</strong>
                <telerik:RadSplitter ID="RadSplitter1" runat="server">
                    <telerik:RadPane ID="RadPane1" runat="server">
                        <telerik:RadGrid ID="grdPlaylistItems" runat="server">
                            <MasterTableView TableLayout="Fixed">
                                <Columns>
                                    <telerik:GridTemplateColumn ItemStyle-Width="500" HeaderText="Thumbnail">
                                        <ItemTemplate>
                                            <asp:Image ID="imgThumbnail" runat="server" />
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridBoundColumn DataField="ItemName" HeaderText="Name"></telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="PlaylistItemType" HeaderText="Type"></telerik:GridBoundColumn>
                                    <telerik:GridNumericColumn DataField="Duration" FooterText="Total Duration: " HeaderText="Duration"
                                        Aggregate="Sum"></telerik:GridNumericColumn>
                                    <telerik:GridBoundColumn DataField="SortOrder" HeaderText="SortOrder" UniqueName="SortOrder"
                                        Visible="true"></telerik:GridBoundColumn>
                                    <telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="DeleteColumn"
                                        ItemStyle-Width="30" ConfirmDialogType="RadWindow" ConfirmText="Are you sure you want to delete this item?"></telerik:GridButtonColumn>
                                </Columns>
                            </MasterTableView>
                        </telerik:RadGrid>
                    </telerik:RadPane>
                    <telerik:RadPane ID="RadPane2" runat="server">
                        <telerik:RadSlidingZone ID="RadSlidingZone1" runat="server">
                            <telerik:RadSlidingPane ID="SlidingPaneMessages" runat="server">
                                <div class="radGrid">
                                    <strong>Drag message to playlist</strong>
                                    <br />
                                    <telerik:RadGrid ID="grdMessages" runat="server">
                                        <MasterTableView DataKeyNames="ScalaId, Name" ShowHeader="false">
                                            <SortExpressions>
                                                <telerik:GridSortExpression FieldName="Name" SortOrder="Ascending" />
                                            </SortExpressions>
                                            <Columns>
                                                <telerik:GridTemplateColumn>
                                                    <ItemTemplate>
                                                        <asp:Image ID="imgThumbnail" runat="server" />
                                                    </ItemTemplate>
                                                </telerik:GridTemplateColumn>
                                                <telerik:GridBoundColumn DataField="Name" DataType="System.String" ItemStyle-Width="150px"
                                                    ItemStyle-Wrap="true">
                                                </telerik:GridBoundColumn>
                                            </Columns>
                                        </MasterTableView>
                                    </telerik:RadGrid>
                                </div>
                            </telerik:RadSlidingPane>
                            <telerik:RadSlidingPane ID="SlidingPanePlaylists" runat="server">
                                <div class="radGrid">
                                    <strong>Drag subplaylist to playlist</strong>
                                    <br />
                                    <telerik:RadGrid ID="grdPlaylists" runat="server">
                                        <MasterTableView DataKeyNames="ScalaId, Name" ShowHeader="false">
                                            <SortExpressions>
                                                <telerik:GridSortExpression FieldName="Name" SortOrder="Ascending" />
                                            </SortExpressions>
                                            <Columns>
                                                <telerik:GridBoundColumn DataField="Name" DataType="System.String" ItemStyle-Width="150px"
                                                    ItemStyle-Wrap="true">
                                                </telerik:GridBoundColumn>
                                            </Columns>
                                        </MasterTableView>
                                    </telerik:RadGrid>
                                </div>
                            </telerik:RadSlidingPane>
                        </telerik:RadSlidingZone>
                    </telerik:RadPane>
                </telerik:RadSplitter>
                <table width="100%">
                    <tr>
                        <td colspan="2">
                            <asp:Label ID="lblValidationMessages" runat="server" Text="" CssClass="errorMessage"></asp:Label>
                        </td>
                    </tr>
                    <tr align="right">
                        <td>
                            <asp:Button ID="btnSave" runat="server" Text="Save" OnClick="OnSaveClick" />
                            <asp:Button ID="btnApply" runat="server" Text="Apply" OnClick="OnApplyClick" />
                            <asp:Button ID="btnDelete" runat="server" Text="Delete" Visible="false" OnClick="OnDeleteClick"
                                CausesValidation="false" OnClientClick="return confirm('Are you sure this playlist must be deleted?')" />
                            <asp:Button ID="btnCancel" runat="server" Text="Cancel" OnClick="OnBackClick" CausesValidation="false" />
                        </td>
                    </tr>
                </table>
            </cc1:QYNPanel>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
There is a MasterPage, but there's no Ajax or RadControls in it.

OnPreRender:
protected override void OnPreRender(EventArgs e)
{
    base.OnPreRender(e);
 
    //add AjaxManager settings
    RadAjaxManager1.AjaxSettings.AddAjaxSetting(grdPlaylistItems, grdPlaylistItems, RadAjaxLoadingPanel1);
    RadAjaxManager1.AjaxSettings.AddAjaxSetting(grdMessages, grdPlaylistItems, RadAjaxLoadingPanel1);
    RadAjaxManager1.AjaxSettings.AddAjaxSetting(grdPlaylists, grdPlaylistItems, RadAjaxLoadingPanel1);
 
     //set height of Splitter dynamically
    RadSplitter1.Height = (LoadedPlaylistItems.Count * 57) + 60;
}


Thanks!
Maria Ilieva
Telerik team
 answered on 12 Aug 2010
3 answers
139 views
Using Q1 2010 and IE7. I have a RadTabStrip which is dynamically loaded on Page_Load. Each of the pageviews is created at this time with a user control. One of the user controls has a radSlider, which loads OK. However, when I mouse over one of the tabs, the rad slider just disappears. The slider's div is still there in the page source with the proper dimensions, but the slider is gone. When I change to another tab, it reappears until I mouse over a tab again. This only happens in IE7. The pageviews have already been setup with relative positions, so the slider does move when the pageview is scrolled.

Here is the code for the slider:
<telerik:RadSlider runat="server" ID="RadSlider1" Orientation="Horizontal" EnableAjaxSkinRendering="false"
                Skin="WebBlue" Height="40" TrackPosition="BottomRight" ItemType="Item" EnableServerSideRendering="false" TrackMouseWheel="False">
            </telerik:RadSlider>

The width is set on page_load when the items are loaded.
Tsvetie
Telerik team
 answered on 12 Aug 2010
1 answer
198 views

Hi,

 

 Have a range slider I use for a date range (years), this has two handles ‘From’ and ’To’, I need to be able to track these two slider values so I can write them each to divs (two separate divs). I’ve got it working with one slider but can’t work out how to capture the second slider value, I hope you can help. Here is my code:



From <span class="SearchHeaderNumbers"><asp:label runat="server" ID="litDateFrom" ClientIDMode="Static" Text="" /></span> to <span class="SearchHeaderNumbers"><asp:label runat="server" ID="litDateTo" ClientIDMode="Static" Text="" /></span><br />
                        <div class="DateRange">
                            <telerik:RadSlider ID="rsDateRange" runat="server" AutoPostBack="true" BackColor="#F5F5F5" EnableEmbeddedSkins="true" SelectionStart="1996" ItemType="Tick" OnClientValueChanging="clientValueChange" ShowDecreaseHandle="false" ShowIncreaseHandle="false" SelectionEnd="2010" IsSelectionRangeEnabled="true" LiveDrag="true" DragText="" MinimumValue="1996" MaximumValue="2010" Width="167px" />
                        </div>

 

 

 

 

                            <script language="javascript" type="text/javascript">
  
                        function clientValueChange(sender, eventArgs) {
                            var myDateFrom = document.getElementById("litDateFrom")
                            myDateFrom.innerHTML = sender.get_value();
  
                            var myDateTo = document.getElementById("litDateTo")
                            // myDateFrom.innerHTML = ??? Some code ???
                        }
                      
                    </script>


as I mentioned I can get the value from sender.get_value() which which gives me the value for the start slider but the end slider I'm lost about.

Thanks
Ed

Tsvetie
Telerik team
 answered on 12 Aug 2010
1 answer
120 views
Hi,

Any quick way to add shadow to a rad dock?

Thanks.
Bozhidar
Telerik team
 answered on 12 Aug 2010
1 answer
115 views
Hi,

I have a problem with the the radwindow control.
In my application I have to use the radwindow control in every page and there is alot of pages. In the current situation I define the radwindow control in each page. I know that there is a better and smarter solution. I'm wondering if I can define the radwindow in the BasePage class and to call it whenever I want. I dont know if I can do that.
So I'm looking for a solution for this problem. If any one has a an idea please help me.

Regards,
Bader
Fiko
Telerik team
 answered on 12 Aug 2010
1 answer
122 views
Hello,
The RadTreeView nodes are getting readonly if the treeview is wrapped up by a RadXmlHttpPanel. They are neither getting expanded nor checked. Does anybody know how to solve this issue?
Thanks.
Fiko
Telerik team
 answered on 12 Aug 2010
2 answers
129 views

Hello telerik team,

I have an issue with many appointments on a single date.If you have many appointmnets on a day.It shows me a Link BUTTON
called "more" when i click on that "More" it opens all the appointments and i could see a small triangle pointing downward at the end of the appointment.If i click on that it goes to a page which cannot be displayed.How can i make that "small downward pointing triangle" invisble.

pls let me know.

Thank you
Smith

smith spd
Top achievements
Rank 1
 answered on 12 Aug 2010
1 answer
126 views
Hello,

I am currently declaring my select/insert/delete/update in the aspx form (using SqlDataSource), but have come to realise that a better implementation would be to use ObjectDataSource and a 3-tier architecture rather than SqlDataSource. Therefore, I have followed the method described in RadScheduler: Getting Started. However, I don't understand how the appointments are persisted using this method?

I'd like to build on the code in the Getting Started article to persist appointments in an SQL Server database.

Please can you advise how to go about doing this outlining the types of data sources that I should use as I'm a bit lost with where to go from here?

Regards,
Anthony
Anthony
Top achievements
Rank 1
 answered on 12 Aug 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?