Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
54 views
I've already solved this problem but I thought I should post it here anyway.

I have a grid on a screen.  I've not had this problem with any other grid in the app.  The lead part of the grid is as follows:

<telerik:RadGrid Width="100%" ID="RadGrid1" runat="server" AutoGenerateColumns="False" CellSpacing="0" GridLines="None" OnNeedDataSource="RadGrid1_NeedDataSource" OnItemCreated="RadGrid1_ItemCreated" OnUpdateCommand="RadGrid1_UpdateCommand" OnInsertCommand="RadGrid1_InsertCommand" OnItemCommand="RadGrid1_ItemCommand" OnItemDataBound="RadGrid1_ItemDataBound" AllowFilteringByColumn="True" OnPreRender="RadGrid1_PreRender" AllowPaging="True" AllowSorting="True" PageSize="20">

I found that if I made the brower window resizable and started stretching out the length, the window suddenly went mostly blank, with the exception of what looks like a button in the top left corner.  It's almost as if there's some sort of featureless control on there.  I've attached a screen shot.

The fix is simply to reduce the Width to 99%.  Then it works perfectly.  I should also mention that this particular grid does not have the centering CSS declarations some of the others have.   (Currently running 2012.2.607.40.  Whenever I get the latest I'll try again.)

(Just checked.  This only happens in Chrome. IE and Firefox are apparently unaffected.)
Maria Ilieva
Telerik team
 answered on 28 Jan 2013
6 answers
288 views
Hello,

I am having an issue with the RadListBox transfer buttons. It is happening in IE and in quirks mode only, yes I know about quirks mode and yes I have to use it for client compatibility issues. The buttons are rendering partially behind the listbox. Please see the screenshot for an example. The settings for the listbox are below though I don't think it is going to matter because what I need is a way to deal with IE5 compliant styling I think.

<telerik:RadListBox ID="rlbRoutes" runat="server" AllowTransfer="true" TransferToID="rlbSelectedRoutes"  CausesValidation="false"
    TransferMode="Move" AutoPostBackOnTransfer="true" SelectionMode="Multiple" Height="200px" Width="200px" visible="true" Enabled="true" OnTransferred="rlbRoutes_Transferred">
    <ButtonSettings Position="Right"  VerticalAlign="Middle"  ShowDelete="false" ShowTransferAll="true" ShowReorder="false"   HorizontalAlign="Right" />
</telerik:RadListBox>

The one really weird thing is that if I change the AreaWidth to 20, the buttons scoot to the right just a bit but they never fully come out from behind the box. Another weird thing about this is that I took all of the code for the listbox and put it in to a new project and it renders fine, even in quirks mode. I am truly at a loss on this. I am wondering if it has anything to do with the fact that I am using this as a custom control instead of putting it directly in the .aspx page. This is the only difference between the original project and the new test project I made.
Ivan Zhekov
Telerik team
 answered on 28 Jan 2013
3 answers
290 views
I have a JavaScript function called 'ResizeGrid' that resizes the RadGrid.

I want to run it after the user clicks the column header and sorts the grid.
Emil
Top achievements
Rank 2
 answered on 28 Jan 2013
1 answer
370 views
Hi 
I need to add a context menu to a treeviewcontext menu in asp.net Ajax. either to right on the tree view context or in the Menu format. The details to be bind from database.








Thanks
Boyan Dimitrov
Telerik team
 answered on 28 Jan 2013
5 answers
178 views

I have a grid with Auto Generate Columns at run time and Multi Row Selection:


<telerik:RadGrid ID="RadGrid1" runat="server" AllowMultiRowSelection="True"

       oncolumncreated="RadGrid1_ColumnCreated">

       <ClientSettings>

             <Selecting AllowRowSelect="True" />

       </ClientSettings>

       <MasterTableView DataKeyNames="InventarioID" GroupLoadMode="Client">

             <Columns>

                    <telerik:GridClientSelectColumn UniqueName="SelectColumn"/>

             </Columns>

       </MasterTableView>

</telerik:RadGrid>

C#:

protected void Page_Load(object sender, EventArgs e)

{

       string _anno = StringHelpers.Right(DateTime.Today.Year.ToString(), 2);

       RadGrid1.DataSource = new DataClaseDataContext().MyTable.Select(s => new {....my fields...});

}

protected void RadGrid1_ColumnCreated(object sender, GridColumnCreatedEventArgs e)

{

       if (e.Column is GridBoundColumn)

       {

             ((GridBoundColumn)e.Column).DataFormatString = "<nobr>{0}</nobr>";

       }

}  


This works well and auto adjusts the column width to content, but this functionality is lost when grouped.


<telerik:RadGrid ID="RadGrid1" runat="server" AllowMultiRowSelection="True"

                    oncolumncreated="RadGrid1_ColumnCreated">

       <ClientSettings>

             <Selecting AllowRowSelect="True" />

       </ClientSettings>

       <MasterTableView DataKeyNames="InventarioID" GroupLoadMode="Client">

             <Columns>

                    <telerik:GridClientSelectColumn UniqueName="SelectColumn"/>

             </Columns>

             <GroupByExpressions>

                    <telerik:GridGroupByExpression>

                           <SelectFields>

                                  <telerik:GridGroupByField FieldName="Area"/>

                           </SelectFields>

                           <SelectFields>

                                  <telerik:GridGroupByField FieldName="AreaDescription"

HeaderText=" " HeaderValueSeparator="" />

                           </SelectFields>

                           <GroupByFields>

                                  <telerik:GridGroupByField FieldName="Area"/>

                           </GroupByFields>

                    </telerik:GridGroupByExpression>

             </GroupByExpressions>

       </MasterTableView>

</telerik:RadGrid>  


Any help?


Eyup
Telerik team
 answered on 28 Jan 2013
1 answer
73 views
Hi,

How can override default editor style with our own colors/images?
We are using moss radeditor latest version. We require outlook kind of stylesheet.css and  we can use in our own skin assembly just like we have used for other telerik controls(radgrid,tabstrip etc).
We have not found such resource  for moss radeditor.

Can you provide us the stylesheet for radeditor or skin file ?


Thanks,
Ankit Trivedi


Rumen
Telerik team
 answered on 28 Jan 2013
1 answer
127 views
I have a RadComboBox that has a single templated item that is a RadTreeView.

I'm looking for suggestions about how I might go about giving the RadTreeView keyboard focus when the RadCombobox's dropdown is opened.

Assume my markup is simpliar to this ...
<telerik:RadComboBox runat="server"
                     ID="RadComboBox1"
                     AutoPostBack="false"
                     AccessKey="V"
                     OnClientFocus="ComboFocus"
                     OnClientDropDownOpened="DropDownOpened">
    <ItemTemplate>
        <telerik:RadTreeView ID="RadTreeView1"
                             runat="server"
                             CausesValidation="false">
            <Nodes
                <telerik:RadTreeNode Text="Node 1" Value="1" /> 
                <telerik:RadTreeNode Text="Node 2" Value="2" Selected="true" /> 
                <telerik:RadTreeNode Text="Node 3" Value="3" /> 
            </Nodes
        </telerik:RadTreeView>
    </ItemTemplate>
    <Items>
        <telerik:RadComboBoxItem/>
    </Items>
</telerik:RadComboBox>

Where the ComboFocus function simply opens the dropdown.

So, what I'm trying to establish is, is there anyway I can - programmatically - give my treeview control of the keyboard?

--
Stuart


Boyan Dimitrov
Telerik team
 answered on 28 Jan 2013
1 answer
53 views
When using a custom icon for the title icon in a notification it doesnt understand or expand ~ (tilde).
I found this problem in version 2012.3.1308.40.

.aspx/.ascx

    <telerik:RadNotification runat="server" ID="rNotify" ClientIDMode="Static" VisibleOnPageLoad="false"
        Animation="Slide" Position="TopCenter" Width="250px" Height="100px" AutoCloseDelay="5000"
        TitleIcon="~/images/etrack1_16x16.png" ContentIcon="">
    </telerik:RadNotification>

For now i have implemented a work around, by simply adding the following to the Page_PreRender method:

        protected void Page_PreRender(object sender, EventArgs e)
        {

            if (this.rNotify.TitleIcon.Contains("~"))
            {
                this.rNotify.TitleIcon = Page.ResolveClientUrl(this.rNotify.TitleIcon);
            }
        }
Marin Bratanov
Telerik team
 answered on 28 Jan 2013
1 answer
353 views
Hi,

We are using Telerik.Web.UI.dll version - 2009.3.1314.20 with visual studio 2008.
Currently our radgrid displays as below. No. of Factories are fixed and Factory names are known before the grid is configured as usual. Since we know the no. of factories and factory names (i.e. column names of the grid) well before we are using a simple DTO structure, a class with the following 5 properties and binding to the radgrid respectively - ItemName, Fac1, Fac2, Fac3, Fac4.

Item Name Factory 1   Factory 2   Factory 3   Factory 4
Item 1 12   13   14   15
Item 2 22   23   24   25
Item 3 32   33   34   35

But recently we have comeup with a new requirement that there will be a factory added on a regular basis, may be one factory per month / 2 months and we don't want to modify the code everytime when a factory is added. In this case, how can we modify the radgrid to meet this requirment ? Assuming that "Factory 5" is added next month and the output should be displayed as below. 

Item Name Factory 1   Factory 2   Factory 3   Factory 4 Factory 5
Item 1 12   13   14   15 16
Item 2 22   23   24   25 26
Item 3 32   33   34   35 36

So we don't know the no. of columns and column names during design time. I think single level DTO structure will not be sufficient. Can we use a two level DTO as below ? If yes, how can we bind a two level DTO to a grid ? How can we mention the "datafield" name while configuring a grid column using the two level DTO ?
Or can we add properties (factorynames) to a class dynamically in .NET 3.5 ?
Do we have any demo samples on this kind of behaviour ?
Any help on this is very much appreciated.

public class ItemFactoryDTO
    {
         
        [DataMember]
        public long ItemId
        { get; set; }
         
        [DataMember]
        public long ItemName
        { get; set; }
         
        [DataMember]
        public ICollection<FactoryQuantityDTO> factoryQuantityDTOs
        { get; set; }
        
    }
 
public class FactoryQuantityDTO
  {
    
    [DataMember]
    public string FactoryName { get; set; }
 
    [DataMember]
    public int? FactoryQuantity { get; set; }
 
  }


Antonio Stoilkov
Telerik team
 answered on 28 Jan 2013
2 answers
78 views
Hi Team,

Thank you for the amazing code snippets on client side binding, was able to implement it quickly. But I'm facing an issue on adding a new row to the grid. On creating a new row, client binding code is called to fetch all the rows and bind it again to the
grid.

ServiceNamespace.Service1.GetData(param1, param2, updateGrid);

//callback

 function updateGrid(result) {

  var tableView = $find("<%= Grid1.ClientID %>").get_masterTableView();    

  tableView.set_dataSource(result);

  tableView.dataBind();  




 

 


Bindu
Top achievements
Rank 1
 answered on 28 Jan 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?