Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
35 views
Hi,
I have some problem with rad menu.
Rad menu opening behind rad window in IE 6,7. It is happening only in IE6,7.
I am attaching a screen shot, please see it and tell me why it is happening. I have done all setting like overlay, Z-Index but nothing is working.
Kamen Bundev
Telerik team
 answered on 30 Sep 2010
3 answers
194 views
Hi, 

I am successfully able to use radgrid for inline insert.

However, on click of add a new item, the grid goes to the last page showing the items in the end.

Is there a way to force the grid to display the same items? (ie, remain on the same page)

Thanks
Vishesh
vishesh kumar
Top achievements
Rank 1
 answered on 30 Sep 2010
4 answers
98 views
I am creating a new instance of a popup and then adding the OnClientResize,
var popup = window.radopen(Url, null);
popup.OnClientResize = OnClientResize();
When the popup opens/loads the function is fired, however it is never fired again when resizing.

However, if i add it to the radwindowmanager, and assign the same function to it, it will work every time.
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" KeepInScreenBounds="true"
                          ReloadOnShow="false" VisibleStatusbar="false" ShowContentDuringLoad="false"
                          EnableShadow="true" OnClientResize="OnClientResize">
</telerik:RadWindowManager>
I do not wish to add it it to the radwindowmanager as the function i need to call is not available on that page.

Any help with this would be much appreciated.
Georgi Tunev
Telerik team
 answered on 30 Sep 2010
5 answers
432 views
Hi Telerik,

After a week of researching this topic it seems that most people are confused about how to use RadAjaxManagerProxy when creating MasterPage/ContentPage sites and WebUserControls.

The problem with not being able to insert a RadAjaxManager in a ContentPage/UserControl is that if you call the clientside function ajaxRequest your call is made to the RadAjaxManager server side function, which you have no control over when you're developing the contentpage or usercontrol. We need to be able to fire callbacks and catch them in the contentpage or webusercontrol.

I know you can use ajaxRequestWithTarget but this has two problems - it requires you to register the expected postback variables in the Page or UserControl Render function as follows:

Protected Overrides Sub Render(ByVal writer As System.Web.UI.HtmlTextWriter)
     Page.ClientScript.RegisterForEventValidation(cmdProjectSelected.UniqueID, "2")
    Page.ClientScript.RegisterForEventValidation(cmdProjectSelected.UniqueID, "3")
    Page.ClientScript.RegisterForEventValidation(cmdProjectSelected.UniqueID, "4")
    Page.ClientScript.RegisterForEventValidation(cmdProjectSelected.UniqueID, "5")
    MyBase.Render(writer)
End Sub

And then you have to catch the event on the server side in RaisePostBackEvent - which implies that ajaxRequestWithTarget does a postback, not a callback like ajaxRequest, which is less efficient. The reason you need to register the expected postback variables is because if you don't, you'll get a security error from Asp.Net: "Sys.WebForms.PageRequestManagerServerErrorException: Invalid postback or callback argument" - meaning that ASP is preventing this postback because it doesn't know the data being posted since it wasn't in the ViewState for the target specified in ajaxRequestWithTarget. Also, it's not an elegant solution when you have to add a hidden button to your page which does the postback for you.

Most developers are now moving to nice elegant jQuery solutions that make callbacks everywhere, and if RadAjax does not have an elegant way to make callbacks simple then it's not a workable solution. 

I really like the simple way you can make a callback via the RadAjaxManager, but we really need this functionality in the RadAjaxManagerProxy as well!

Dimitri 
Tsvetina
Telerik team
 answered on 30 Sep 2010
3 answers
124 views
I have read the post on a custom provider to get to the root folder in the ViewPaths property but I can't get it to work.  Is there any update or another way to use a physical path or to set the viewpathproperty to the root folder?
Fiko
Telerik team
 answered on 30 Sep 2010
3 answers
419 views
Hi,

Telerik Grid Version: Telerik Grid ASP. NET AJAX Q1 2010 SP1

Requirements:
We need to build a self-referencing RadGrid with custom columns (ca 200 - 500 columns), inline editing and yahoo scrolling (ca 500 - 5000 rows).

  • Why Custom columns

The grid datasource should have 24 x 5 = 120 columns at least but the grid itself should show at least 24 columns (2 years = 2 x 12 months).
However, each row should show the content of 5 fields (that's why we need overall 24 x 5 = 120 columns).

  • Why inline Edit

The user should be able to edit only 1 of the 5 fields per row. We tried double edit click, but for performance reason, it didnt work well.

  • Why yahoo scrolling

To improve performance and for better usability, the user shouldnt wait before all the rows are rendered before editing them.

  • Why self-referencing

The grid shows tasks with level and outline numbers. The user want to see a hierarchy, so he can collapse/expand task from any level.

See the picture "preview" in attachment to see how the grid currently looks

Problem:
We could successfully implement the grid with custom column, inline editing and yahoo scrolling. Everything so far is working fine.
Our only problem now is to make the grid self-referencing.
When trying this, we have an Error "System.OutOfMemoryException".
When debugging, we found that, this error occurs just after RadGrid1_NeedDataSource in RadGrid1_ColumnCreated
We suspect that the problem has to do with the huge amount of columns (around 100) and the fact that we enable self-referencing.

Any Idea or suggestions?

Code:
The grid is created programmatically because the columns are created dynamically.

aspx : The grid will be later added in PlaceHolder1

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" 
                    OnAjaxRequest="RadAjaxManager1_AjaxRequest">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="RadGrid1">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1"/>
                            <telerik:AjaxUpdatedControl ControlID="Label1" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                    <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                </AjaxSettings>
                <ClientEvents />
            </telerik:RadAjaxManager>         
            <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" 
            Height="75px" Width="75px" Transparency="25"/>            
         <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1" LoadingPanelID="RadAjaxLoadingPanel1">                     
            <asp:PlaceHolder runat="server" ID="PlaceHolder1" >
            </asp:PlaceHolder>
            <br />
            <asp:Label ID="L_Text_LastChange" runat="server" Text="Last change on: " CssClass="labelText"></asp:Label>                    
        </telerik:RadAjaxPanel>

page_init
protected void Page_Init(object sender, EventArgs e)
        {
            RadGrid1.ID = "RadGrid1";
            RadGrid1.AllowMultiRowEdit = true;
            RadGrid1.AllowMultiRowSelection = true;
            RadGrid1.GroupingEnabled = true;
            RadGrid1.Skin = "Windows7";
        RadGrid1.Width = Unit.Percentage(97);
        //the initial amount of rows to show
        RadGrid1.PageSize = 20;//20 
        RadGrid1.AllowPaging = true;
        RadGrid1.AllowSorting = true;
        RadGrid1.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric;
        RadGrid1.AutoGenerateColumns = false;
        RadGrid1.GridLines = GridLines.None;
        RadGrid1.ShowFooter = false;
  
        //PagerStyle
        RadGrid1.PagerStyle.Visible = false;
        //MasterTableView
        RadGrid1.MasterTableView.TableLayout = GridTableLayout.Fixed;
        RadGrid1.MasterTableView.AutoGenerateColumns = true;
        RadGrid1.MasterTableView.EditMode = GridEditMode.InPlace;
//ClientSettings
        RadGrid1.ClientSettings.Scrolling.ScrollHeight = Unit.Pixel(350);//350
//Yahoo Scrolling
        RadGrid1.ClientSettings.Scrolling.AllowScroll = true;
        RadGrid1.ClientSettings.Scrolling.UseStaticHeaders = true;
        RadGrid1.ClientSettings.Scrolling.SaveScrollPosition = true;
        RadGrid1.ClientSettings.ClientEvents.OnScroll = "HandleScrolling";
        //Because of ClientSelectColumn
        RadGrid1.ClientSettings.Selecting.AllowRowSelect = true;
  
        //Custom row selection
        RadGrid1.ClientSettings.ClientEvents.OnRowSelected = "SelectRows";
        RadGrid1.ClientSettings.ClientEvents.OnRowDeselected = "DeSelectRows";
//Add editColumn
        RadGrid1.MasterTableView.DataKeyNames = new string[] { "ID", STR_TaskOutlineNumber, ColName_TaskName, STR_TaskLevel, "SAPInternalIDTask", "SAPSystem", STR_HasChanged, STR_ColumnChanged };
        RadGrid1.MasterTableView.ClientDataKeyNames = RadGrid1.MasterTableView.DataKeyNames;
//Add custom column
        addCustomColumns(RadGrid1, gridSource);
  
            //Set Grid Events
            RadGrid1.PreRender += new EventHandler(RadGrid1_PreRender);
            RadGrid1.ColumnCreated += new GridColumnCreatedEventHandler(RadGrid1_ColumnCreated);
            RadGrid1.UpdateCommand += new GridCommandEventHandler(RadGrid1_UpdateCommand);
            RadGrid1.NeedDataSource += new GridNeedDataSourceEventHandler(RadGrid1_NeedDataSource);
            //Add the grid to the placeholder
            this.PlaceHolder1.Controls.Add(RadGrid1);
   
            //TODO: Not working, throw error "System.OutOfMemoryException", need help here!!!
        //Build self-referencing   
        //RadGrid1.MasterTableView.HierarchyLoadMode = GridChildLoadMode.Client;
        //RadGrid1.MasterTableView.HierarchyDefaultExpanded = true;
        //RadGrid1.MasterTableView.SelfHierarchySettings.ParentKeyName = "ParentNr";
        //RadGrid1.MasterTableView.SelfHierarchySettings.KeyName = "Nr";
        //RadGrid1.ClientSettings.AllowExpandCollapse = true;
        }

page_load
protected void Page_Load(object sender, EventArgs e) 
        
            if (!Page.IsPostBack) 
            
                //Init values when the page is being loaded or accessed for the first time 
                initValues(); 
                initLabels(); 
                // this would bind the grid calling NeedDataSource 
                RadGrid1.Rebind();  
            
         }

RadGrid1_NeedDataSource

protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            RadGrid1.DataSource = gridSource;
        }

RadGrid1_ColumnCreated

protected void RadGrid1_ColumnCreated(object sender, Telerik.Web.UI.GridColumnCreatedEventArgs e)
        {
            GridBoundColumn boundColumn = e.Column as GridBoundColumn;
            //Hide all columns, they will be made visible again later
            if (boundColumn != null)
                boundColumn.Visible = false;            
        }

Radoslav
Telerik team
 answered on 30 Sep 2010
3 answers
276 views
in my grid the EditMode is "EditForms". I also have a ItemEditTemplate which contains the update and cancel button. Is there a way that i can disable/hide the default update and cancel buttons and use mine?
Princy
Top achievements
Rank 2
 answered on 30 Sep 2010
2 answers
134 views
Dear Telerik Team

I have used the Rad Toolbar in a user control file.

and I dragged this user control on my Web Form page to use it.

I handle the events of Rad Toolbar items in my web form page (Event Bubbling).

When I run my application, the problem that I faced is when clicking any item in Rad Toolbar ----> No Post Back happened !!!!

and so My event handlers cannot run !!

so, What is the problem ? and How I can solve it ???

Best Regards

Noha
Top achievements
Rank 1
 answered on 30 Sep 2010
1 answer
48 views

Hello,

  Long story in short way -- please take a look at presentation:

http://www.telerik.com/help/aspnet-ajax/understandingtypesstackedbar.html

  The text of items are next to each part of bar, how I can achieve this?

  My case: in my case texts from both series are displayed next to last (top) parts of bars. I tried to add 

<Appearance>
  <TextAppearance Position-Auto=false Position-AlignedPosition="Bottom"</TextAppearance>
   </Appearance>

in ChartSeries section, but no matter what I enter -- bottom, top, etc. nothing is changing.

  Thank you in advance for help.

Remark: Telerik, please expand your documentation and simply add code that produces given screenshots, it is a bit frustrating when you see exactly want you want to achieve, and yet you struggle to do this having only few hints. Thank you.

Maciej Pilichowski
Top achievements
Rank 1
 answered on 30 Sep 2010
1 answer
71 views
Here's what I'm trying to do:  I have a griddropdowncolumn with a data source attached.  I've enabled the EmptyListItemText.  What I would like is, if the datasource is empty, add another item to the griddropdowncolumn which would say "add an item".  When the user selects this text, it would bring up a popup edit form with a couple of fields.  The user would fill in those fields and do an insert.  This new value would then show up in the griddropdowncolumn.  I guess I would need to use the ItemDataBound event to add the "add the item" text.  But how do I determine that someone selected this text?  I guess I'm asking what event would get fired when someone picks a different item in the griddropdowncolumn.  Thanks for any help I can get.
Princy
Top achievements
Rank 2
 answered on 30 Sep 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?