Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
106 views
I have a grid that has 7 frozen columns whose data is bound, and up to 50 other columns which are dynamically created based on data in a table.(currently 24 columns are being created)  Everything seems to work fine until I go into edit mode and the frozen columns are disappearing or being pushed out.  Will scroll all the way back to the left and columns are missing.  If I tab through all the columns eventually I can return the the editcolumn or the frozen columns.  Also this seems to be happening if we edit one of the values.  We tested this page fairly thoroughly and seems like a new problem that arose.

*Note it seems to be working fine with Chrome or FireFox, but not in Internet Explorer.

Any help is appreciated.
Tsvetoslav
Telerik team
 answered on 29 Jul 2010
2 answers
131 views
Is there any way to wrap the title or have multi-line titles on the RadTab? I can easily set the text in code and include a line break but since the tabs are images they do not render correctly when text wraps.

Thanks!
jfkrueger
Top achievements
Rank 1
 answered on 29 Jul 2010
1 answer
158 views
Im having trouble adding a client side event as an attribute to the RadRating through the code behind. The RadRating is in a GridEditForm within a Grid so I'm having trouble "finding" controls when I try to do the javascript through the ASPX page.

Below is an example of my attempt. As you see I am trying to add a simple alert to the onclientrated event. When tracing the code, it doesn't seem to add the attribute. If you have a different solution to help me find controls within the Radgrid Editforms, please let me know.

Thanks Kellie

protected void RadGridAssetExtrasCondition_ItemDataBound(object sender, GridItemEventArgs e)
{
    switch (e.Item.OwnerTableView.Name)
    {
        case "AssetExtrasCondition":
            if (e.Item is GridCommandItem)
            {
                Do some stuff here
            }
            if (e.Item is GridDataItem)
            {
                Do some stuff here
            }
            if ((e.Item is GridEditFormItem || e.Item is GridEditFormInsertItem) && e.Item.IsInEditMode)
            {
                var ctrlLabelConditionRatingDescription = (Label)e.Item.FindControl("LabelConditionRatingDescription");
                var ctrlRadRatingCondition = (RadRating)e.Item.FindControl("RadRatingCondition");
  
  
                // Creating the Rad Rating stars dynamically
                foreach (var item in this.ConditionRatings.Items)
                {
                    var ratingItem = new RadRatingItem
                                         {
                                             Value = Convert.ToDecimal(item.Rating),
                                             ToolTip = item.Rating.ToString()
                                         };
                    ctrlRadRatingCondition.Items.Add(ratingItem);
                }
  
                ctrlRadRatingCondition.Attributes.Add("onclientrated", "alert('hello');");
  
                if (!e.Item.OwnerTableView.IsItemInserted)
                {
                   Do some stuff here
                }
            }
            break;
    }
}
Tsvetie
Telerik team
 answered on 29 Jul 2010
1 answer
273 views
Are there any circumstances which would cause cacheDependency to forget the temporary files to delete?
Can it survive a machine reboot?
T. Tsonev
Telerik team
 answered on 29 Jul 2010
1 answer
116 views
Hi,

Iam creating a masterview for a telerik grid and binding few columns on firsttime pageload. One among these columns is Editable column. But when I click on 2nd page in the grid, my editable column is displayed as a non-editable column. How to make sure that this column is always editable ?  Is there any way to clear the grid view and reconfigure on every postback ? Please suggest.

protected void Page_Init()
    {
       ConfigureGrid();
          
    }
  
  
private void ConfigureGrid()
    {
  
        OrderTypeRankingGrid.AddNeedDataSourceEventHandler(NeedDataSource); // Binding master table view
        OrderTypeRankingGrid.AddGridCommandEventHandler(DataGrid_ItemCommand); // Events for the standard ngm controls
  
        OrderTypeRankingGrid.AllowColumnsReorder = false;
           
        OrderTypeRankingGrid.GridHeaderText = "Order Type Ranking"; 
        var masterView = OrderTypeRankingGrid.ConfigureMasterTableView("vDivisionOrderTypeRanking", new string[] { "DivisionOrderTypeRankId" });
        masterView.AllowFilteringByColumn = true;
        masterView.AllowSorting = true;
        masterView.FullEditMode = true;
        masterView.EditMode = GridEditMode.InPlace;
        masterView.EnableShowHideColumns = true;
        masterView.SetPaging(GridPagerMode.NextPrevAndNumeric);
        masterView.GridTableView.ShowHeader = true;
        masterView.ShowHeader = true;
        masterView.ShowFooter = true;
        masterView.ShowHeadersWhenNoRecords = true;
        masterView.AllowPaging = true;
          
        //Enable standard Ngm controls
          
          
        masterView.AddNgmCommandButton(NgmButtonType.Save, "btnSave", null, null, "Save Function Id", Unit.Pixel(50));
        masterView.AddNgmCommandButton(NgmButtonType.Cancel, null, null, null, null, Unit.Pixel(50));
          
        masterView.CommandItemDisplay = GridCommandItemDisplay.Bottom;
  
        if (!IsPostBack)  //must check for postback; otherwise, columns will be duplicated
        {
              
            //masterView.AddBoundColumn("DivisionOrderTypeRankId", "Rank ID", null, true, false, true, Unit.Percentage(7.0));
            masterView.AddBoundColumn("CategoryCode", "Category Code", null, true,  false, true, Unit.Percentage(7.0));
            masterView.AddBoundColumn("PurposeCode", "Purpose Code", null, true, false, true, Unit.Percentage(7.0));
            masterView.AddBoundColumn("ReasonCode", "Reason Code", null, true, false, true, Unit.Percentage(7.0));
            masterView.AddBoundColumn("ReasonDescription", "Reason Description", null, true, false, true, Unit.Percentage(7.0));
            masterView.AddBoundColumn("OrderTypeRank", "Rank", null, false, false, true, Unit.Percentage(7.0));
  
        }
          
    }
  
  
  
  
protected void NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
    {
        if (IsPostBack)
        {
  
            if (!e.IsFromDetailTable && (this.productDivision == 1 || this.productDivision == 2))
            {
                 
                IDivisionOrderTypeRankService divisionOrderTypeRankServiceAgent = null;
                divisionOrderTypeRankServiceAgent = (IDivisionOrderTypeRankService)ContextRegistry.GetContext().GetObject("DivisionOrderTypeRankServiceAgent");
                IList<DivisionOrderTypeRankDTO> divisionOrderTypeRankDTOs = divisionOrderTypeRankServiceAgent.GetDivisionOrderTypeRankByDivision(productDivision);
                OrderTypeRankingGrid.DataSource = divisionOrderTypeRankDTOs;
                  
            }
        }
    }
Maria Ilieva
Telerik team
 answered on 29 Jul 2010
1 answer
192 views
Hello ...Is there a way to have the docking panels dynamically resize when the browser window is resized (both horizontally and   vertically)? I got this done horizontally... but how vertically...?
Pero
Telerik team
 answered on 29 Jul 2010
2 answers
220 views

Is there a way to have the docking panels dynamically resize when the browser window is resized ( vertically)? i got this done horizontally. but wondering how to do it vertically.


 <telerik:RadDockLayout runat="server" ID="RadDockLayout1" OnSaveDockLayout="RadDockLayout1_SaveDockLayout"
            OnLoadDockLayout="RadDockLayout1_LoadDockLayout" EnableEmbeddedSkins="false"
            Skin="None">
            <table style="table-layout: fixed;">
                <tr>
                    <td id="left" style="width: 250px; height: 100%; vertical-align:top;">
                   
                        <telerik:RadDockZone runat="server" ID="RadDockZoneLeftTop" Width="249px"  BorderWidth="0"
                            Docks="1" Orientation="Vertical" FitDocks="true"  HighlightedCssClass="CustomCssClass">
                        </telerik:RadDockZone>
                      
                        <telerik:RadDockZone runat="server" ID="RadDockZoneLeftBottom" Width="249px"   BorderWidth="0"
                            Docks="1" Orientation="Vertical" FitDocks="true"  HighlightedCssClass="CustomCssClass">
                        </telerik:RadDockZone>
                    </td>
                    <td id="centre" style="width: 100%; height: 100%; vertical-align: top;">
                   
                </td>
                    
                    <td id="right" style="width: 250px; height: 100%; vertical-align: top;">
                        <telerik:RadDockZone runat="server" ID="RadDockZoneRightTop" Width="249px"  BorderWidth="0"
                            Docks="1" Orientation="Vertical" FitDocks="true"  HighlightedCssClass="CustomCssClass">
                      </telerik:RadDockZone>
                    
                        <telerik:RadDockZone runat="server" ID="RadDockZoneRightBottom" Width="249px" BorderWidth="0"
                            Docks="1" Orientation="Vertical" FitDocks="true"  HighlightedCssClass="CustomCssClass">
                        </telerik:RadDockZone>
                    </td>
                </tr>
            </table>
            
        </telerik:RadDockLayout>

I use this method to generate the Raddocks dynamically in page_init()
 private RadDock CreateRadDockFromState(DockState state, int number)
    {
        RadDock dock = new RadDock();
        dock.ID = string.Format("RadDock{0}", number);
        dock.ApplyState(state);
        dock.Closed = false;
        dock.DockHandle = DockHandle.TitleBar;
        dock.DockMode = DockMode.Docked;
        dock.EnableRoundedCorners = true;
        dock.EnableAnimation = true;
        dock.DefaultCommands = Telerik.Web.UI.Dock.DefaultCommands.None;
        dock.Width = Unit.Pixel(249);
        dock.Height = Unit.Pixel(300);
        DockCommand dc = new DockCommand();
        dc.AutoPostBack = true;
        dc.Name = "ShowWidgets";
        dc.Text = "Show Widgets";
        dock.Commands.Add(dc);
        dock.Command += new DockCommandEventHandler(Show_Widgets);
        dock.DockPositionChanged += new DockPositionChangedEventHandler(RadDock_DockPositionChanged);
        dock.OnClientDockPositionChanged = "OnClientDockPositionChanged";
        dock.OnClientDragStart = "OnClientDragStart";
        dock.OnClientInitialize = "DockInit";
        dock.Resizable = true;
        return dock;
    }
Pero
Telerik team
 answered on 29 Jul 2010
1 answer
102 views

Below code running old version but i have updated version no run now.

function

 

 

fileUploaded(sender, args) {

 

$find(

 

'RadAjaxManager1').ajaxRequest();

 

sender.deleteFileInputAt(0);

 

}



 

 

<telerik:radasyncupload runat="server" ID="AsyncUpload1" MaxFileInputsCount="1"

 

 

 

 

OnClientFileUploaded="fileUploaded" TargetPhysicalFolder="~/Image/Upload"

 

 

 

Width="90px" OverwriteExistingFiles="True" >

 

 

 

<Localization Select="Choose Avatar" />

 

 

 

</telerik:radasyncupload>

 





 

 

Try

 

 

 

' file.Add(e.File)

 

 

 

Dim fileStream As IO.Stream = e.File.InputStream

 

 

 

Dim imageData As Byte() = New Byte(fileStream.Length - 1) {}

 

fileStream.Read(imageData, 0,

 

CInt(fileStream.Length))

 

Thumbnail1.DataValue = imageData

fileStream.Close()

 

 

Catch ex As Exception

 

 

 

End Try

 

Yana
Telerik team
 answered on 29 Jul 2010
1 answer
108 views
I have a textbox within a panelbar and am unable to get the control to validate from a button on the page. This textbox is added dynamically. Thanks
Nikolay Tsenkov
Telerik team
 answered on 29 Jul 2010
4 answers
119 views
Hi,

Everytime I create a new Grid, the default size is 100%, even though I set the width of each column doesn't help.
Of course I can sum up the column width manually and then assign to WIDTH property of the grid, but is there any way that I can set the width of the Grid based on the column size?

Thanks.
Dimo
Telerik team
 answered on 29 Jul 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?