Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
161 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
438 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
310 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
173 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
71 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
94 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
1 answer
421 views
Hi,

I am having an issue where when I try to upload a 125MB .FLV or a 53 MB .FLV on my live site the Ajax UI never starts and I eventually get a connection reset error. The uploader starts up with no problem, however, when I use a 5 MB .FLV. My maxRequestLength is set to 1024000 but I do not think any of those settings are wrong because when I try it on my local machine I can upload the 125 MB .FLV. Can you think of any reason why this would be happening live and not local?

I also tried setting the executionTimeout="360000" but it just took longer to throw the error.

Any help would be appreciated.

Thanks,

Aaron
Peter
Telerik team
 answered on 30 Sep 2010
0 answers
273 views
I'm use Chart with auto refresh and use Timer in every 2 second. but always see flicker/blink.

How to Auto refresh Chart without flicker (blink) in every 2 second. But not use Javascript.

Please help me...
Heri .
Top achievements
Rank 1
 asked on 30 Sep 2010
2 answers
111 views
Hi,

I use the RadDatePicker to let the user select a date. Instead of displaying the whole date, only the year and the quarter should be displayed then. I thought of an ICustomerFormatter and IFormatProvider to write a new custom format for the quarter portion of the date. So I have to pass my own format provider to the control. How do I do that? I tried to overwrite RadDatePicker but this seems not enough, because the input control itself is a RadDatePicker-Control.
Any ideas to start with, or is it just the wrong way to achieve the displaying of my own custom format?
jbssa
Top achievements
Rank 1
 answered on 30 Sep 2010
2 answers
168 views
Hi,
I'm getting ??? in my file names when using your custom ftp provider.
Is there some way to set encoding of file names in the fileexplorer?

Regards,
Mattias
Dobromir
Telerik team
 answered on 30 Sep 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
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
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
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
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?