Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
249 views
I have a RadGrid with a GridButtonColumn containing a Select button, CommandName="Select".  In the the RadGrid's <Client Events> I added 'OnRowSelected' = "myFunction()".  I want to be able to click on the Select button and trigger the OnRowSelected event to use my Javascript function.  But this is not working.  Here is my code:

 

    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
    function myFunction()
    {
      alert('testing');
    }
    </script>
    </telerik:RadCodeBlock>

<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" AllowSorting="True" DataSourceID="SqlDataSource1" GridLines="None">
    <HeaderContextMenu EnableAutoScroll="True">
    </HeaderContextMenu>
    <MasterTableView AutoGenerateColumns="False" DataSourceID="SqlDataSource1">
    <RowIndicatorColumn>
    <HeaderStyle Width="20px" />
    </RowIndicatorColumn>
    <ExpandCollapseColumn>
    <HeaderStyle Width="20px" />
    </ExpandCollapseColumn>
    <Columns>
    <telerik:GridButtonColumn CommandName="Select" Text="Select" UniqueName="column">
    </telerik:GridButtonColumn>
    </Columns>
    </MasterTableView>
    <ClientSettings  Selecting-AllowRowSelect="true">
    <Selecting AllowRowSelect="true" />
   <ClientEvents OnRowSelected="myFunction" />
    </ClientSettings>
    </telerik:RadGrid>

 

 

 

 

 

 

 

 

 

 

Richard M
Top achievements
Rank 1
 answered on 20 May 2010
3 answers
90 views
Hi, we have a load-on-demand TreeView with checkboxes.  Is there a way to retrieve those nodes that have their checkboxes checked?  

I've tried to use this code to retrieve them, but it only seems to return one item every time no matter how many nodes' checkboxes I check:

 var tree = $find('<%=rpbPanelBar.Items(0).Controls(0).FindControl("rtvTreeView").ClientID %>'); 
        
         for (var k = 0; k <  tree.get_selectedNodes().length; k++) { 
            var node = tree.get_selectedNodes()[k];   
            var i = node.get_value(); 
            alert(i);   
         } 

Thanks!
Nikolay Tsenkov
Telerik team
 answered on 20 May 2010
1 answer
252 views
Based upon other conditions I need to change the value of a combobox inside a filter template on a grid.  Since the combobox is treated as a on runtime control, I have no access to it on the code behind.  How can I find the control and set the DataSourceID on the code behind?  Below is the combobox definition. 

 <telerik:GridBoundColumn DataField="Name" HeaderText="Applicant Name"
                        <FilterTemplate> 
                            <telerik:RadComboBox ID="ddlApplicantName" AppendDataBoundItems="true" Width='190px' 
                                Skin='Office2007' MarkFirstMatch="true" AllowCustomText="true" runat="server" 
                                DataSourceID="CurrentPostingOtherName" DataTextField="Name" DataValueField="Name" 
                                OnClientSelectedIndexChanged="NameChange" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("Name").CurrentFilterValue %>'
                                <Items> 
                                    <telerik:RadComboBoxItem Text="All" /> 
                                </Items> 
                            </telerik:RadComboBox> 
                            <telerik:RadScriptBlock ID="RadScriptBlock4" runat="server"
                                <script type="text/javascript"
                                    function NameChange(sender, args) { 
                                        var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>"); 
                                        tableView.filter("Name", args.get_item().get_value(), "EqualTo"); 
 
                                    } 
                                </script> 
                            </telerik:RadScriptBlock> 
                        </FilterTemplate> 
                    </telerik:GridBoundColumn> 

Pavlina
Telerik team
 answered on 20 May 2010
1 answer
85 views


Hi All,
<telerik:RadComboBox ID="RadComboBoxProduct" runat="server" Height="200px" Width="200px"
                            DropDownWidth="298px" EmptyMessage="Choose a Product" HighlightTemplatedItems="true"
                            EnableLoadOnDemand="true" OnItemsRequested="RadComboBoxProduct_ItemsRequested">
                            <HeaderTemplate>
                                <table style="width: 275px" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td style="width: 177px;">
                                            Product Name</td>
                                        <td style="width: 60px;">
                                            Quantity</td>
                                        <td style="width: 40px;">
                                            Price</td>
                                    </tr>
                                </table>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <table style="width: 275px" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td style="width: 177px;">
                                            <%# DataBinder.Eval(Container, "Text")%>
                                        </td>
                                        <td style="width: 60px;">
                                            <%# DataBinder.Eval(Container, "Attributes['UnitsInStock']")%>
                                        </td>
                                        <td style="width: 40px;">
                                            <%# DataBinder.Eval(Container, "Attributes['UnitPrice']")%>
                                        </td>
                                    </tr>
                                </table>
                            </ItemTemplate>
                        </telerik:RadComboBox>

This is the RadComboBox using header and item templates. Can I add textboxes and buttons to allow quick filtering of the content of the column.upon clicking the “apply filter” button, , this would likely involve an AJAX call to refresh the bound context table for the dropdown. It should look similar to the filters on the grid.

 

Regards

Ravi

mcamail2002@gmail.com

www.yourtechniche.com

Simon
Telerik team
 answered on 20 May 2010
3 answers
111 views
Hi
I need to add labels the X axis as shown in the figure. How?
(Above shows how the output; below as needed)
Ves
Telerik team
 answered on 20 May 2010
4 answers
108 views
When I select an object, such as an image, it shows the nodes and borders.  While selected, the nodes and borders scroll along with the editor.  They are visible but the content of course isn't.  See attachment.

Is there a fix to this or a way to not show the nodes and borders?
Rumen
Telerik team
 answered on 20 May 2010
2 answers
101 views
I have a RadGrid in a usercontrol, and am just using the default skin.  On page load, the usercontrol is not visible, but after clicking on a button the usercontrol is made visible.  The problem is once the grid is shown, it does not have any skin applied. There are other skinned controls in the usercontrol, and they display correctly. The postback is ajaxified with an ajax manager, and if remove the ajax, the grid displays correctly. 

The odd part is I have PagerStyle.AlwaysVisible set to true on the grid, and if I change it to false, the grid displays correctly.

The user control is on another page where it is always visible, and it displays correctly there.

I tried to create a simple project to demonstrate the behavior, but I could not reproduce the issue in the simple project.  I will build a project that is more representitive of the actual project to send, but it will take some time. So I thought I'd ask if you had any ideas or things to try.

Thanks,
Justin

Justin Lee
Top achievements
Rank 1
 answered on 20 May 2010
7 answers
77 views
I have a unique requirment that I need to group vertically but stacked over the top of the grouped events not down the left side. In other words a header bar going all the way across the calendar with the Grouping name centered. Is this possible in CSS or code behind
Peter
Telerik team
 answered on 20 May 2010
4 answers
142 views
I have a RadChart on a webpage.
I want to display the same chart (image) in a RadWindow (popup).
Is that possible without having to create a second RadChart control ?

Yours
  Bjössi
XXXX
Top achievements
Rank 1
 answered on 20 May 2010
7 answers
243 views
Hello,
does anyone knows how to create progress bar indicator  for entire page without AjaxLoading panel.
When I click search button I need progress bar while radgrid is loading or when I change dropdown values?

Thanks for your help.
Prangadj
Top achievements
Rank 1
 answered on 20 May 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?