Telerik Forums
UI for ASP.NET AJAX Forum
11 answers
294 views
Hi,

I have a RadGrid on a page where I have customized the column headers to embed a RadMenu for sorting and filtering.

The problem I run into is that when the filter sub-menu expands (to the right, property is set to 'auto') at the right-most columns, it gets clipped at the edge of the RadGrid.

The issue:

Click for image.

The 'root' menu item (eg, the one containing the sort options and filter parent menu items) is offset in the X by -99, which should not make any difference.

I have literally tried everything to get the sub-menu to change direction to the right when it gets clipped at the grid edge. I have also tried just about everything with z-indexing (down to a copy of the skin file for the menu where each css class had a z-index applied!).

Nothing has worked so far. I would like to detect that the sub-menu is being clipped at the right-most edge and change the expand direction to left in those cases.

Any ideas?

Regards,

Mike.



PureCode
Top achievements
Rank 2
 answered on 30 Sep 2008
1 answer
191 views
Hi,

i am opening a rad window wiht a page.

i have to close the window on ESC key press so i have written this code

function

Escape()

{

var esc=window.event.keyCode;

if(esc==27)

{

var oWindow = window.radWindow || window.frameElement.radWindow;oWindow.close();

}

}


and calling this function in the body onkeypress


<

body onkeypress="Escape();">

It is working fine in IE browsers but not working in Mozilla.
Could you please get the solution please.

Thank you.

Regards,
Sai

Serrin
Top achievements
Rank 1
 answered on 30 Sep 2008
4 answers
209 views
I am trying to use the Tabstrip/Multi-page as a wizard. I am trying to find a way to ignore the validation on the current tab if the user goes back.

How can I get the currently selected tab rather than the tab the user has just clicked? 

If I use OnClientTabSelecting like this:

function OnClientTabSelecting(sender, args)
{
var newTabIndex = sender.get_selectedTab().get_value();

...

I can get the tab the user has just clicked. How can I get the current tab (or pageview)?

Joel Reinford
Top achievements
Rank 1
 answered on 30 Sep 2008
3 answers
196 views
Hi,

I have a datagrid that I add/remove rows on the client side and save the results into a database by using following code:

            foreach (GridDataItem item in RadGrid1.Items)  
            {  
                int PrincipalID = Convert.ToInt32(item["PrincipalID"].Text);   
                TextBox box = item.FindControl("txtShare") as TextBox;  
                Share = Convert.ToDecimal(((TextBox)box).Text);  
                InsertShareIntoDB(PrincipalID, Share);  
            }  
 

Adding new rows and updating Share column works fine. What I can't figure out is deleting rows. I am using GridClientDeleteColumn, so when I click on it, the row disappears, as it should. Now on postback, I want to insert into the database only visible (not deleted) rows, but the code above goes through all the rows, even the ones deleted. How can I check on the server-side if a row was deleted?

Thanks,
Julia

Vladimir
Top achievements
Rank 1
 answered on 30 Sep 2008
1 answer
215 views
I have a Developer license and use RadControls for ASP.NET Ajax Q2-2008.
The project works fine on my developer box in which I installed the Telerik. Once I move the project to the QA server, it gets some errors in Build WebSite as:
Could not load file or assembly 'Telerik.Charting, Version=2.0.4.0, Culture=neutral, PublicKeyToken=d14f3dcc8e3e8763' or one of its dependencies. The system cannot find the file specified. (error in Web.Config) 

and

Warning 2 Unable to update auto-refresh reference 'telerik.web.ui.dll'. Cannot find assembly 'c:\Program Files\Telerik\RadControls for ASPNET AJAX Q2 2008\bin35\Telerik.Web.UI.dll'. 

Regards,

d-cpt
d-cpt
Top achievements
Rank 2
 answered on 30 Sep 2008
5 answers
233 views
If RadGrid.rows.count = 0 then
RadGrid.visible = False
else
RadGrid.visible = True
End If

is this possible?
Jeff
Top achievements
Rank 1
 answered on 30 Sep 2008
3 answers
193 views
Hi!

I don't know if this has been asked yet, but I wanted to add TWO custom buttons in the Radwindow's TitleBar.  I have seen the examples for adding a "Print" custom button in the titlebar, but how about if I wanted a "help" button and a "print" button?

Thanks!

Emeleen
Top achievements
Rank 1
 answered on 30 Sep 2008
4 answers
479 views
I have a grid where the values for one of the columns should be unique across all rows. I want to make it so that when they edit a row, the drop list for that column filters out the previously selected items so that it is not possible to add or change a row which would create a duplicate.

The column in question is a GridTemplateColumn which contains a RadComboBox. Right now, I'm resetting the DataSource and calling DataBind on the combobox in the grid's ItemDataBound event (when the item is a GridEditableItem).

However, when I hit the InsertCommand or UpdateCommand events, the SelectedValue of the combobox is always empty.

Is there is an example that demonstrates the dynamic loading of a RadComboBox used in a GridTemplateColumn in which the combo box is loaded at runtime based on the existing row's values and demonstrates the inserting and updating? That means no use of DataSource objects like ObjectDataSource, AccessDataSource, SessionDataSource etc. in the example.

Thomas
Top achievements
Rank 1
 answered on 30 Sep 2008
1 answer
239 views
Hi

I want to handle the client side events that fires when the date is changed on that date picker control of the radScheduler.

In the OnInit event of the page I hook up the event using

RadDatePicker

dp = this.RadScheduler1.FindControl("SelectedDatePicker") as RadDatePicker;
dp.ClientEvents.OnDateSelected =
"SchedulerSelectedDatePicker_OnDateSelected";


on my aspx page in the script i have the function

function SchedulerSelectedDatePicker_OnDateSelected(sender, eventArgs)
{
    var date = eventArgs.get_renderDay().get_date();
    int offset  = date.getTimezoneOffset();
}


My first problem is that for some reason the event is not firing. What could be the problem here.

Once I have sorted that and got it firing I want to pass the value of offset that I calculate in the function back to the server with the partial postback. What's my best  way of doing this? Stick the value in a hidden field or is there another way?

Cheers

Gary

T. Tsonev
Telerik team
 answered on 30 Sep 2008
3 answers
159 views
I have a problem when i following sample TreeView in ComboBox, I do a bit modify. I load node from XML file(same thing happen binf with datatable).

when select a node from treeview, the combobox item showing all Text values in the treeview at first time.  But it's fine if i select again.

For example:
Page init: blank
select node "Books": shows "booksArtsBiographies..." (suppose showing "Books")
select node "Music":  shows "Music"



please try following sample:
Aspx page:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default9.aspx.cs" Inherits="Default9" %> 
 
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml">  
<head runat="server">  
    <title></title>  
</head> 
<body> 
    <form id="form1" runat="server">  
    <script type="text/javascript">          
        function nodeClicking(sender, args)  
        {  
            var comboBox = $find("<%=RadComboBox1.ClientID%>");  
            var node = args.get_node()  
 
            comboBox.set_text(node.get_text());  
            comboBox.set_value(node.get_value());  
              
            comboBox.hideDropDown();  
        }          
</script> 
    <div> 
      
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
        </telerik:RadAjaxManager> 
      
        <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">  
        </telerik:RadScriptManager> 
      
        <telerik:RadComboBox ID="RadComboBox1" ShowToggleImage="True" OnItemsRequested="ItemsRequested" Runat="server">  
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
            <ItemTemplate> 
                <telerik:RadTreeView ID="RadTreeView1"   
                                OnClientNodeClicking="nodeClicking" Runat="server">  
                </telerik:RadTreeView> 
            </ItemTemplate> 
            <Items> 
                <telerik:RadComboBoxItem Selected="True"></telerik:RadComboBoxItem> 
            </Items> 
        </telerik:RadComboBox> 
      
    </div> 
    </form> 
</body> 
</html> 
 

Code:
using System;  
using System.Collections.Generic;  
using System.Linq;  
using System.Web;  
using System.Web.UI;  
using System.Web.UI.WebControls;  
using Telerik.Web.UI;  
using System.Xml.Linq;  
 
public partial class Default9 : System.Web.UI.Page  
{  
    protected void Page_Load(object sender, EventArgs e)  
    {  
        if (!IsPostBack && !RadAjaxManager1.IsAjaxRequest)  
        {  
            Populate();  
        }  
    }  
 
    private void Populate()  
    {  
        if (RadComboBox1.Items.Count == 0)  
        {  
            RadComboBox1.Items.Add(new RadComboBoxItem());  
        }  
 
        RadTreeView ParenTreeView = (RadTreeView)RadComboBox1.Items[0].FindControl("RadTreeView1");  
 
        ParenTreeView.LoadContentFile("TreeView.xml");  
    }  
 
 
 
    protected void ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)  
    {  
        Populate();  
    }  
}  
 

XML:
<?xml version="1.0" encoding="utf-8" ?> 
<Tree> 
  <Node Text="Books" Expanded="True">  
    <Node Text="Arts" /> 
    <Node Text="Biographies" /> 
    <Node Text="Children's Books" /> 
    <Node Text="Computers &amp;amp; Internet" /> 
    <Node Text="Cooking" /> 
    <Node Text="History" /> 
    <Node Text="Fiction" /> 
    <Node Text="Mystery" /> 
    <Node Text="Nonfiction" /> 
    <Node Text="Romance" /> 
    <Node Text="Science Fiction " /> 
    <Node Text="Travel" /> 
  </Node> 
  <Node Text="Music">  
    <Node Text="Alternative" /> 
    <Node Text="Blues" /> 
    <Node Text="Children's Music" /> 
    <Node Text="Classical" /> 
    <Node Text="Country" /> 
    <Node Text="Dance" /> 
    <Node Text="Folk " /> 
    <Node Text="Hard Rock" /> 
    <Node Text="Jazz" /> 
    <Node Text="R&amp;amp;B" /> 
    <Node Text="Soundtracks" /> 
  </Node> 
  <Node Text="Movies">  
    <Node Text="Action" /> 
    <Node Text="Animation" /> 
    <Node Text="Classics" /> 
    <Node Text="Comedy" /> 
    <Node Text="Documentary" /> 
    <Node Text="Drama" /> 
    <Node Text="Horror" /> 
    <Node Text="Musicals" /> 
    <Node Text="Mystery" /> 
    <Node Text="Westerns" /> 
  </Node> 
  <Node Text="Software">  
    <Node Text="Business &amp;amp; Office" /> 
    <Node Text="Database" /> 
    <Node Text="Networking" /> 
    <Node Text="Presentation" /> 
    <Node Text="Project Management" /> 
    <Node Text="Reports" /> 
    <Node Text="Spreadsheet" /> 
    <Node Text="Word Processing" /> 
  </Node> 
</Tree> 
Rosi
Telerik team
 answered on 30 Sep 2008
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?