Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
82 views
Hi,

using the latest RadToolBar, I could not find a way or an example demonstrating how to have a HoveredImageUrl different for a checked button than for an unchecked button. Basically what I would have expected is a "CheckedHoveredImageUrl" property.

Is there any easy way to have that behavior on the toolbar buttons?

ps: I'm not going server-side on button clicks, only some js gets executed.

Thanks
Nicolas
Top achievements
Rank 1
 answered on 21 Aug 2009
1 answer
131 views
Hi Support

I have a page setup with a floating catalog dock zone like this

<asp:Panel ID="panFloat" runat="server" width="180px" style="z-index:1;background-image:url('../../../pixx/vistaBGPanel.jpg');background-repeat:repeat;padding:0px;border:0px;">   
<asp:UpdatePanel ID="updOptions" runat="server" UpdateMode="Conditional">    
                    <ContentTemplate>
<div style="position:relative">
<telerik:RadSplitter id="MainSplitter"  runat="server" Width="180px" Height="450px" Orientation="Horizontal" Skin="Vista" >
                        <telerik:RadPane id="main"  runat="server" height="100%" Width="100%">                            
                            <telerik:RadPanelBar runat="server" ID="RadPanelBar1" Height="100%" Width="100%" ExpandMode="SingleExpandedItem" Skin="Vista" BackColor="Transparent" >
                            <Items>
                                <telerik:RadPanelItem Text="Component ToolBox" Expanded="true">
                                <Items><telerik:RadPanelItem><ItemTemplate>
                                    <telerik:raddocklayout id="RadDockLayout_Catalog" runat="server" Skin="Vista">
                                        <telerik:raddockzone id="zoneCatalog" runat="server" Skin="Vista" Orientation="Vertical" Height="368px">
</Items>
                            </telerik:RadPanelBar>
                                                    
                        </telerik:RadPane>     
                    </telerik:RadSplitter>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>
    <ajaxToolkit:AlwaysVisibleControlExtender
        HorizontalSide="Left"  
        VerticalSide="Top"
        EnableViewState="true"
        TargetControlID="panFloat"
        BehaviorID="panFloater"
        runat="server"/>

which floats to the left of a set of dock zones that fill the page defined like this

<telerik:raddocklayout id="RadDockLayout_Page" runat="server" Skin="Vista">
<telerik:raddockzone id="zoneTop" runat="server" Skin="Vista" >
                    <telerik:raddock runat="server" ID="default_Menu" Skin="Vista" BackColor="Transparent" Title="Menu" OnClientDragStart="OnClientDragStart" OnClientDragEnd="OnClientDragEnd" DefaultCommands="None">
                    <ContentTemplate>
                        <hpartsMASTER:Menu ID="defpart_Menu" title="Menu Block" runat="server"/>
                    </ContentTemplate>
                    </telerik:raddock>
                </telerik:raddockzone> </telerik:raddocklayout>

my problem is that when a dock is dragged into the floating catalog, if a zone is beneath the catalog the zone beneath will get the dock rather than the catalog upon drop, in spite of the catalog zone being highlighted on drag and not the one beneath.

any ideaz, using firefox, Q12009 release

thanks
Rob

</ContentTemplate>




Pero
Telerik team
 answered on 21 Aug 2009
2 answers
94 views
I have a RadGrid with a DetailTable that throws an error on export to pdf in IE7 and earlier.  Export works fine in IE8, Firefox, and Chrome, but throws the following error in IE7 and earlier:
    System.SystemException: At least one of minimum, optimum, or maximum IPD must be specified on table.

Here is the source code for the RadGrid
<telerik:RadGrid ID="rgrdPayroll" runat="server" AutoGenerateColumns="False" DataSourceID="odsPersonnelByPI" 
    GridLines="None"> 
    <MasterTableView DataSourceID="odsPersonnelByPI" DataKeyNames="DisplayName" HierarchyLoadMode="ServerBind"> 
        <DetailTables> 
            <telerik:GridTableView runat="server" DataSourceID="odsPayrollByPI" GridLines="None"> 
                <ParentTableRelation> 
                    <telerik:GridRelationFields DetailKeyField="DisplayName" MasterKeyField="DisplayName" /> 
                </ParentTableRelation> 
                <Columns> 
                    <telerik:GridBoundColumn DataField="SlAcct6No" HeaderText="Account" UniqueName="SlAcct6No"> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="AcctName" HeaderText="Account Name" UniqueName="AcctName"> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="Pay" DataType="System.Decimal" HeaderText="Pay" 
                        ReadOnly="True" SortExpression="Pay" UniqueName="Pay" DataFormatString="{0:$#,#.#0;-$#,#.#0;$0.00}"> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="Benfit" DataType="System.Decimal" HeaderText="Benefit" 
                        ReadOnly="True" SortExpression="Benfit" UniqueName="Benfit" DataFormatString="{0:$#,#.#0;-$#,#.#0;$0.00}"> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="Total" DataType="System.Decimal" HeaderText="Total" 
                        ReadOnly="True" SortExpression="Total" UniqueName="Total" DataFormatString="{0:$#,#.#0;-$#,#.#0;$0.00}"> 
                    </telerik:GridBoundColumn> 
                </Columns> 
            </telerik:GridTableView> 
        </DetailTables> 
        <ExpandCollapseColumn Visible="True"> 
        </ExpandCollapseColumn> 
        <Columns> 
            <telerik:GridBoundColumn DataField="DisplayName" HeaderText="Personnel" SortExpression="DisplayName" 
                UniqueName="DisplayName"> 
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="Total" DataType="System.Decimal" HeaderText="Total" 
                ReadOnly="True" SortExpression="Total" UniqueName="Total Salary" DataFormatString="{0:$#,#.#0;-$#,#.#0;$0.00}"> 
            </telerik:GridBoundColumn> 
        </Columns> 
    </MasterTableView> 
</telerik:RadGrid> 

And here is the C# code that runs when the export button is clicked:

protected void btnPDFPersonnel_Click(object sender, EventArgs e) 
{ 
    rgrdPayroll.ExportSettings.FileName = ddlPIs.SelectedValue.Substring(0, ddlPIs.SelectedValue.IndexOf(',')) + "_Personnel"; 
    rgrdPayroll.ExportSettings.OpenInNewWindow = true; 
    rgrdPayroll.ExportSettings.ExportOnlyData = true; 
    rgrdPayroll.ExportSettings.IgnorePaging = false; 
    rgrdPayroll.ExportSettings.Pdf.PageWidth = Unit.Parse("297mm"); 
    rgrdPayroll.ExportSettings.Pdf.PageHeight = Unit.Parse("216mm"); 
    foreach (GridItem item in rgrdPayroll.MasterTableView.Items) 
    { 
        item.Expanded = true; 
    } 
    rgrdPayroll.MasterTableView.ExportToPdf(); 
 
} 
 

Has anybody run across this error before in IE7?  Why would this same code work in the other browsers by not IE7?

Thanks,

Brian

Brian Furner
Top achievements
Rank 2
 answered on 21 Aug 2009
3 answers
513 views

For a project I'm working on, we're looking for a way to dynamically add filters to a page which then control the dataoutput in a RadGrid. We want to add the filters dynamically because we want the customer to be able to change which properties can be filtered and what filtertype (textbox, dropdown, colourpicker, etc.) should be used.

The filter should work as follows:

  • The customer links a filter to a certain property and specifies the filtertype (for this example: dropdown). This is specified in a database table.

  • A user control which contains all the filter loads all filters specified, this is done dynamically according to the database table
  • The filters load all values of the specified property as options. The first time the page loads; this would be the (disctinct) values of all items. 
  • Now the user selects a value from one of the filters; the page reloads 
  • Only items which have the specified filter value are retrieved, the user may specify one or more filters at the same time. 
  • Once a user drills down by filtering, only filtervalues of the retrieved items should be used in the other filters to hide values which aren't present in the resulting list of items; so all other filters have to be rebound according to the new query.

 

I have the following problems:

  • When I create the filters runtime, events are lost because the controls get recreated each postback. 

  • I could place the filters in PreInit which should solve this, but then determining which controls should be loaded becomes a problem since loading all environment vars isn't finished yet?
  • I don't know a good way of returning all the filter values to a central point from which I can make a good query. 
  • The query has to be dynamic. I'm using linq which I want to make dynamic so I don't have to select everything everytime. How to make a dynamic select query based on a string stored in the database? 
  • I have to select items based on the filtervalues and then adjust the rest of the filters to the already made selection. That kind of messes up the whole regular databinding sequence.

Any help in one of the above would be great!

PS: One thing I thought about was passing along filter values in the postback which would have to be recognizable. That way the server could use them for selection and then create the filters and autoselect the previously selected filtervalues. I'm not quite sure how to acheive this though...

Daniel
Telerik team
 answered on 21 Aug 2009
3 answers
148 views
We have a fairly simple radEditor, and in firefox, it's fine:  when we bold something, its bold.  When we double-click on something previously bolded, the bold icon is highlighted, and the same for the rest of the style-changing icons (italics, underline, paragraph alignment, etc - literally ALL of them).

However, in IE8, nothing.  If we change the font, the font will change in the editor window, but that's it:  bold, italics, alignment, underline, nothing that changes the actual _appearance_ of the font in the editor window.  When you look at the HTML code, the tags are there, but in design and preview mode, its just plain text.

When I turn compatability mode on in IE8, BOOM!  The editor doesn't work at ALL (I can include a screenshot if asked - just a jumble of broken images and unrecognizable junk). 

So, in FF, we're fine, in IE8, we dead.  Any thoughts would be much appreciated.

Rumen
Telerik team
 answered on 21 Aug 2009
8 answers
242 views
the text is like "Width 321 pixels". I want to change this text that appears when dragging the columns on resize. how can i do that?
Dimo
Telerik team
 answered on 21 Aug 2009
1 answer
76 views
Could you please send a working example of hierarchical ragrid for microsoft  MVC. If it is not possible, please let me know alternative way to do it. Also it would be very much appraciated if you could send some working examples of radgrid in the MVC framework.
Thanks
Anil
Georgi Krustev
Telerik team
 answered on 21 Aug 2009
3 answers
161 views
hi all,

is there any telerik control that alllow to select month and year only? I dont want to show the calendar. I want a monthyearpicker.

waiting for reply
thanks



Martin
Telerik team
 answered on 21 Aug 2009
5 answers
170 views
Hi,

I have a hierarchical grid defined where I am programattically binding the detail tables. I am also generating some dynamic columns at runtime depending upon the user's input and adding them to the master as well as the detail tables.

Everything seems fine barring the issue of column names of the dynamic columns getting disappeared as soon as I expand the grid. The values still remain intact and so does the dataformatstring.

I see some discussions around this issue in the following thread but the suggestions provided does not work for me.
http://www.telerik.com/community/forums/aspnet-ajax/grid/radgrid-runtime-columns.aspx

Here's my code snippet

   <telerik:RadGrid ID="rgScenario" runat="server" Width="100%" Skin="Custom" EnableEmbeddedSkins="false"   
                    AutoGenerateColumns="false" AllowSorting="false" AllowPaging="false" AllowFilteringByColumn="false" OnDetailTableDataBind="rgScenario_DetailTableDataBind" OnNeedDataSource="rgScenario_NeedDataSource">  
                        <MasterTableView DataKeyNames="xxxx" runat="server" EnableColumnsViewState="true">  
                            <DetailTables> 
                                <telerik:GridTableView DataKeyNames="yyyy" runat="server" Name="Detail1"  Width="100%" EnableColumnsViewState="true" > 
                                    <DetailTables> 
                                        <telerik:GridTableView DataKeyNames="zzzz" runat="server" Name="Detail2" Width="100%" EnableColumnsViewState="true">  
                                            <Columns> 
                                                <telerik:GridBoundColumn HeaderText="Area" DataField="Area" UniqueName="Area"></telerik:GridBoundColumn> 
                                                <telerik:GridBoundColumn HeaderText="Days" DataField="Days" UniqueName="Days"></telerik:GridBoundColumn> 
                                            </Columns>   
                                        </telerik:GridTableView>   
                                    </DetailTables> 
                                      
                                    <Columns> 
                                        <telerik:GridBoundColumn HeaderText="Start Area" DataField="StartAreaName" UniqueName="StartAreaName"></telerik:GridBoundColumn> 
                                        <telerik:GridBoundColumn HeaderText="End Area" DataField="EndAreaName" UniqueName="EndAreaName"></telerik:GridBoundColumn> 
                                    </Columns>    
                                </telerik:GridTableView>   
                            </DetailTables>   
                                      
                            <Columns> 
                                <telerik:GridBoundColumn HeaderText="Vessel" DataField="VesselType" UniqueName="Vessel"></telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn HeaderText="Days" DataField="TotalVoyageDaysNum" UniqueName="TotalVoyageDaysNum"></telerik:GridBoundColumn> 
                            </Columns>   
                        </MasterTableView>   
       
                    </telerik:RadGrid>  


 
 
 
public partial class ComparisonReport : System.Web.UI.Page  
{  
 
    protected void Page_Load(object sender, EventArgs e)  
    {  
        try  
        {  
                if (!IsPostBack)  
                {  
                    //Populate data into an IList say ParentIList  
                    ShowHideRiskColumns(input);  
 
                }  
                rgScenario.DataSource = ParentIList;  
            }  
        }  
        catch(Exception ex)  
        {  
              
        }  
          
    }  
 
    private void ShowHideRiskColumns(string input)  
    {  
        GridBoundColumn parentDynamicColumn = new GridBoundColumn();  
        parentDynamicColumn.HeaderText = "Some text";  
        parentDynamicColumn.UniqueName = "Some text";  
        parentDynamicColumn.DataFormatString = "{0:#,###.##}";   
 
        GridBoundColumn childDynamicColumn= new GridBoundColumn();  
        childDynamicColumn.HeaderText = "Some text";  
        childDynamicColumn.UniqueName = "Some text";  
 
        GridBoundColumn subChildDynamicColumn = new GridBoundColumn();  
        subChildDynamicColumn.HeaderText = "Some text";  
        subChildDynamicColumn.UniqueName = "Some text";  
          
        
        rgScenario.MasterTableView.Columns.Add(parentDynamicColumn);  
        rgScenario.MasterTableView.DetailTables[0].Columns.Add(childDynamicColumn);  
        rgScenario.MasterTableView.DetailTables[0].DetailTables[0].Columns.Add(subChildDynamicColumn);  
 
       switch(input)  
       {  
           case 1:  
        //Set the datafield according to the input  
               break;  
 
           case 2:  
              //Set the datafield according to the input  
               break;  
 
       }  
        
    }  
 
 
   protected void rgScenario_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)  
    {  
        if (!e.IsFromDetailTable)  
        {  
            rgScenario.DataSource = iList;  
        }  
 
    }  
 
    protected void rgScenario_DetailTableDataBind(object source, Telerik.Web.UI.GridDetailTableDataBindEventArgs e)  
    {  
        GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem;  
        switch (e.DetailTableView.Name)  
        {  
            case "Detail1":  
                {  
                    e.DetailTableView.DataSource = detailList1;  
                    break;  
                }  
 
            case "Detail2":  
                {  
                    e.DetailTableView.DataSource = detailList2;  
                    break;  
                }  
        }  
 
    }  
}  
 

Saurabh Srivastava
Top achievements
Rank 1
 answered on 21 Aug 2009
2 answers
93 views

Hi,

1.I am using RadScheduler.

2. In my page. I have usedmy own css class file.

2.I have set the propertyfor H2 in Css file (for standard heding to all the pages).

h2{

margin:0px0px 0px 0px;

padding:0px0px 0px 10px;

width:406px;

height:28px;

background-image:url(../images/welcom.png);background-repeat:no-repeat;

font-size:18px;font-weight:bold;

line-height:1.4em;

}

3.If I applying  the css to my page, Scheduler control Headingsould conflit with my h2 property.

4. How can I solve this problem.

Peter
Telerik team
 answered on 21 Aug 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?