Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
126 views
Hi,

is it possible to change the properties offesetx and offsety on client side programming? How can i access this values client side?
Princy
Top achievements
Rank 2
 answered on 17 Jun 2009
1 answer
211 views
Dear Telerik,

We have a grid created in code (Q1 2009). When a user drags a column to the group header, it works great. When the column is dragged away from the header it UnGroups correctly.

Recently we started optimizing the application. One thing we did is to set the EnableViewState=false on the Page containing the grid to make the page lighter

<%@Page UICulture="auto" Language="C#" AutoEventWireup="true" EnableViewState="false" CodeFile="T.aspx.cs" Inherits="_T" %> 

Everything worked great until we discovered a crash when the column is dragged away from the header. It gives the following dump:

Exception.Message
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Stack Trace
System.Collections.CollectionBase.System.Collections.IList.get_Item(Int32 index)
Telerik.Web.UI.GridGroupByExpressionCollection.get_Item(Int32 index)
Telerik.Web.UI.GridGroupPanel.Ungroup(String index)
Telerik.Web.UI.RadGrid.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

After various attempts to solve the problem with no luck, we put back the EnableViewState=true on the Page containing the grid:
<%@Page UICulture="auto" Language="C#" AutoEventWireup="true" EnableViewState="true" CodeFile="T.aspx.cs" Inherits="_T" %> 
 
And the crash disappeared.

Note some other grid setting:

        radGrid.GridLines = GridLines.None;  
 
        radGrid.EnableViewState =  
        radGrid.AllowMultiRowSelection =  
        radGrid.ClientSettings.Selecting.AllowRowSelect =  
        radGrid.ClientSettings.Selecting.EnableDragToSelectRows = true;  
 
        radGrid.AllowAutomaticDeletes =  
        radGrid.AllowAutomaticInserts =  
        radGrid.AllowAutomaticUpdates =  
        radGrid.FilterMenu.Visible =  
        radGrid.ClientSettings.AllowKeyboardNavigation =  
        radGrid.MasterTableView.EnableColumnsViewState =  
        radGrid.AutoGenerateColumns = false;  
 
        radGrid.ClientSettings.ClientEvents.OnGridCreated = "GridCreated";  
        radGrid.ClientSettings.ClientEvents.OnKeyPress = "GridKeyPressed";  
        radGrid.ClientSettings.ClientEvents.OnRowSelected = "GridRowSelected";  
        radGrid.ClientSettings.ClientEvents.OnActiveRowChanged = "GridRowChanged";  
 
        radGrid.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.None;  
 
        radGrid.MasterTableView.ClientDataKeyNames = new string[] { "uid" };  
 
        radGrid.ClientSettings.AllowColumnsReorder =  
        radGrid.ClientSettings.Resizing.AllowColumnResize =  
        radGrid.ClientSettings.Resizing.EnableRealTimeResize =  
        radGrid.ClientSettings.Resizing.ClipCellContentOnResize = radGrid.Columns.Count > 2;  
 
        radGrid.ClientSettings.AllowKeyboardNavigation =  
        radGrid.ClientSettings.Resizing.ResizeGridOnColumnResize = true;  
          
        radGrid.ClientSettings.ClientEvents.OnRowDblClick = "GridRowDoubleClicked";  
        radGrid.MasterTableView.SortExpressions.AllowNaturalSort = false;  
 
        radGrid.ShowGroupPanel =  
        radGrid.ClientSettings.AllowDragToGroup =  
        radGrid.ClientSettings.Scrolling.AllowScroll =  
        radGrid.AllowFilteringByColumn =  
        radGrid.ClientSettings.AllowGroupExpandCollapse = true;  
          
        radGrid.GroupingSettings.CaseSensitive = false;  
 
        radGrid.AllowPaging = true;  
        radGrid.PagerStyle.Mode = GridPagerMode.Slider;  
        radGrid.ClientSettings.Scrolling.SaveScrollPosition =  
        radGrid.ClientSettings.Scrolling.UseStaticHeaders =  
        radGrid.ClientSettings.Scrolling.AllowScroll = true;  
        radGrid.PreRender += new EventHandler(GridPreRender);  
 

Can you please help?

Salah A. Malaeb
Veli
Telerik team
 answered on 17 Jun 2009
2 answers
139 views
I strongly suggust that Telerik team should add "DropDownCheckList" control to RadControls, both for ASP.NET AJAX and WinForm, just like jQuery does.


Regards.
Miao Weibin
Top achievements
Rank 1
 answered on 17 Jun 2009
0 answers
413 views
RadListBox is a powerful ASP.NET AJAX control to display a list of items. It allows for multiple selection of items, reorder and transfer between two listboxes. Drag and drop is fully supported as well. You can easily control the appearance by arranging the buttons in different layouts or changing their text. Icons and checkboxes are also supported within the listbox items.

The ListBox implements a highly efficient semantic rendering, which uses list items and CSS instead of tables. As a result the HTML output is significantly reduced, which dramatically improves performance.

RadListBox can be bound to all ASP.NET 2.0 declarative datasources (ObjectDataSource, XmlDataSource, SqlDataSource, etc) as well as the ASP.NET 3.5 LinqDataSource. Binding to XML strings as well as automatic database updates are fully supported.

The ListBox control has a rich client-side API and comprehensive set of events guaranteeing full control over various functions performed on the client. You can easily add/delete/update items at the client side and all the changes will be persisted on the server as well. The rich client-side API provides unbeatable performance and desktop-like experience.

RadListBox is shipped with a rich set of skins that allow you to easily build slick interfaces with the look-and-feel of Windows Vista, Office 2007, Outlook, etc. The skins can be easily switched using a single property.

To get familiar with the control please follow these online resources:


Telerik Admin
Top achievements
Rank 1
Iron
 asked on 17 Jun 2009
2 answers
84 views
Hi,

I'm currently designing a 2.0 website and I need to build a tag cloud. I'm also using telerik controls and I'm asking you if there's any solution to build a tag cloud using the grid telerik control or any other telerik control?
I tried some examples in asp.net or c# but none worked.
Cátia
Top achievements
Rank 1
 answered on 17 Jun 2009
4 answers
143 views
Hi All,
           I have two levels of hireachy  Grid whose data iam trying to ExportToExcel . Iam using the code as:

 

this.radMainGrid.ExportSettings.Excel.Format = Telerik.Web.UI.GridExcelExportFormat.ExcelML; 
in order to apply the styles to the Grid.
for the above code line it is throwing me error as  Object Referecnce not Set to Instance of an object.
Here we are using Trial version of the Grid.

 


 this.radMainGrid.ExportSettings.OpenInNewWindow = true;  
            this.radMainGrid.ExportSettings.ExportOnlyData = true;  
            this.radMainGrid.ExportSettings.Excel.Format = Telerik.Web.UI.GridExcelExportFormat.ExcelML;  
            this.radMainGrid.MasterTableView.ExportToExcel(); 

Can any one pls let me why it is throwing me this error.

Pls let me know its very urgent.

Regards,
Asra.
Daniel
Telerik team
 answered on 17 Jun 2009
1 answer
144 views
Hi,

I want to be able to set a different style for my appointments and I have read the documentation to find out how to do this. My issue is that I do not want to set the style based on any of the "base" properties of my data source.

I have created my own object and have included the necessary properties for it to be considered an "appointment" and bound the datasource of the scheduler to a list of these objects.

The example I am following shows the overriding of the OnAppointmentCreated handler and then switching on the "subject" in order to set the CssClass property of the appointment object. So my question is - can I use a different property that I have in my custom "appointment" object to switch on? For example, I have a Rating property in my class and would like to check this property in order to set the CssClass property. Can this be done?

Any help is greatly appreciated,
Dan
Peter
Telerik team
 answered on 17 Jun 2009
2 answers
175 views
Hello,

I've implemented a slider control that is populated at runtime with a dynamic list of items. It works fine from a code point of view but the UI falls over in some cases when the number items exceeds the width parameter set for the slider. Needing to set this width parameter is essentially the cause of the problem. I want the width to be automatic dependent on the number of items loaded. Is this possible?

My code:

<telerik:RadSlider ID="sldrSurvey" runat="server" /> 

private void PopulateSlider() 
    { 
        sldrSurvey.ItemType = SliderItemType.Item; 
        sldrSurvey.Height = Unit.Pixel(40); 
        sldrSurvey.Width = Unit.Pixel(300); // I don't want to set this 
        sldrSurvey.Skin = "Vista"; 
 
        HashList<int, string> list = (HashList<int, string>)ValueList; 
        if (list.Count != 0) 
        { 
            foreach (KeyValuePair<int, string> item in list) 
            { 
                 RadSliderItem sliderItem = new RadSliderItem(); 
                 sliderItem.Text = item.Value; 
                 sliderItem.Value = item.Key.ToString(); 
                 sldrSurvey.Items.Add(sliderItem); 
            } 
        } 
 
        sldrSurvey.DataBind(); 
    } 
Michael Dunbar
Top achievements
Rank 2
 answered on 17 Jun 2009
13 answers
501 views
Is there any telerik control like Listbox available for a web page.
Ivo
Telerik team
 answered on 17 Jun 2009
1 answer
183 views
Code:

Aspx:

<telerik:GridTemplateColumn UniqueName="Temp" HeaderText="Title" Visible="false">
                                    <ItemTemplate>
                                    ....
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:FileUpload ID="FileUpload1" runat="server" />
                                    </EditItemTemplate>
</telerik:GridTemplateColumn>

When Click Insert:

C#:
protected void RadGrid1_InsertCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
    {
        GridEditFormInsertItem InsertItem = (GridEditFormInsertItem)e.Item;
        FileUpload strvanban = (FileUpload)InsertItem ["Temp"].FindControl("FileUpload1");
        string strfilename = strvanban.FileName;
        string strpath = "/Uploadfiles/";
        strfilename.SaveAs(Server.MapPath(".") + strpath + strfilename );
..........
    }

Get values = "". Help me get Value strfilename

Thanks
Princy
Top achievements
Rank 2
 answered on 17 Jun 2009
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?