Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
141 views
I have an ASP.NET button on a user control. When I call RadWindow.Open() from a OnClienClick event handler the window seems to flash but never actually come up.  The button is doing a post back and there is no way from the ASP.NET button to cancel the postback.  Does anyone have an idea what I can do about it?
Fiko
Telerik team
 answered on 11 Dec 2008
1 answer
132 views
Hi There,

My radEditor has stopped working properly. The page render finds some script errors "ASP.NET AJAX Client-side Framework failed to load." and "Sys is undefined".

Probably is not a Telerik problem, but you should be aware of it.

Thank you very much.

Best regards
Bruno Nunes
 
Sebastian
Telerik team
 answered on 11 Dec 2008
4 answers
260 views
I know this can be done but I don't know how! :)

I have an radEditor and a radColorPicker.
Now, I want to change the editors background color when selecting a color, how do I do that?

/Mattias
Rumen
Telerik team
 answered on 11 Dec 2008
1 answer
117 views
I have a field that has a dataformatstring applied which is keeping the FooterText from showing up. Is there a way I can specify a different format string for the footer text or is there a better way to do this? Also how would I include text in a dataformatstring.

 

<telerik:GridBoundColumn UniqueName="PercentSiteRevenue" SortExpression="PercentSiteRevenue"

 

 

HeaderText="% Site Revenue" DataField="PercentSiteRevenue" ItemStyle-HorizontalAlign="Right"

 

 

HeaderStyle-HorizontalAlign="Right" DataFormatString="{0:0.0%}" FooterStyle-HorizontalAlign="Right"

 

 

FooterText="Avg: " Aggregate="Avg">

 

 

<HeaderStyle></HeaderStyle>

 

 

</telerik:GridBoundColumn>

.. In the footer I get only the value and not the "Avg: ".

Thanks,
Levi

 

Daniel
Telerik team
 answered on 11 Dec 2008
1 answer
69 views

Hi!

I have an aspx with a RadSplitter with a couple of RadPanes.

In the codebehind on not postback requests I set pane.Collapsed=true.

When the page is being loaded the pane first appears expanded expanded and is collpased just moment later.

OnClientResized clientside event is fired but OnClinetCollapsed is not.

When I create the same splitter and panes in code, not an apsx, the pane appers collapsed right away (though I'm not sure now).

Also it is collapsed right away after postbacks.

I suppose this cliend side collapse is expected behaviour, but I want to avoid it.

Ho do I awoid this client side collapsing in the first case?

(We have version 2008.2.826.20)

Thanks!

Svetlina Anati
Telerik team
 answered on 11 Dec 2008
1 answer
202 views
Hi Svetlina ,

I want to implement rad tooltip within gridview and the links (<a href="#" title="xyz"> </a>) are dynamically created.

any suggestion how to do this
bcz i have not set any id to the links. and the tooltip have to fetch the records from database via any querystring.

 public string ReplaceKeyWords(Match m)
    {
      
        string s = null;

        string g = m.Value.ToString();
        s = "<a  title='ok'    href=' " + "tooltips.aspx?param=" + m.Value.ToString() + "'  ";
        if (g == "")
        {
            return s + "nothing" + ">" + "<span class=highlight>" + g + "</span>" + "</a>"; return "<span class=highlight>" + g + "</span>";

        }
        else
        {
            return s  + ">" + "<span class=highlight>" + g + "</span>" + "</a>"; return "<span class=highlight>" + g + "</span>";

        }

    }


Thanks
Chris
Svetlina Anati
Telerik team
 answered on 11 Dec 2008
3 answers
189 views
I have installed the trial RadControls for ASPNET AJAX Q3 2008 on Vista Business SP1 (as Admin), using VS2008 SP1.  I did not install the sample apps locally.

When I place controls (RadDatePicker and RadSlider so far) on pages that are not in the root folder of my applocation (i.e., in a subfolder) I experience the following behavior (in design view):
  • I can select a skin in the SmartTag
  • The control does not take on the appearance of the skin in VS
  • The control does use the skin at runtime
  • If I close the aspx file, and re-open it, there is a message box instead of the control stating "Error Creating Control - [ControlName] '[SkinName] could not be set on property skin'.
  • The control still renders correctly at runtime
  • I notice that in the property panel of the control, that there is not a drop list of skins - just an entry box

These controls render correctly in designer so long as I do not change the skin in the SmartTag.
On pages at the root, the list of skins is in both the SmartTag and property panel, and the controls with non-default skins render in both designer and runtime.  Any ideas?

Best,
Scott

Pavel
Telerik team
 answered on 11 Dec 2008
1 answer
211 views
What is the proper way to bind data to RadGrid via the ADO.NET Entity Framework?

For example, something like...

protected void radGrid_NeedDataSource( object source, GridNeedDataSourceEventArgs e ) 
    using( EntityContext c = new EntityContext() ) 
    { 
        var query = from x in context.Topics 
                    select new 
                    { 
                        field = x.foo 
                    } 
 
        radGrid.DataSource = query; 
    } 

... will fail because the context has been disposed before the grid actually evaluates the LINQ query.
Vlad
Telerik team
 answered on 11 Dec 2008
7 answers
266 views

Hey Folks. Could use some helpful advice and direction.

We're in the process of migrating to the new ajax controls. We currently have a file structure setup where we tell the classic controls which directory holds all the skin files. This has to change for the ajax controls but until we setup a way to handle the skins for the ajax controls, I need a way to use my own skin for the grid in the meantime without having to change or create a new file structure.

Another employee here found a way to overwrite an existing embedded telerik skin.
He applied the office 2007 skin and then, in the body tag temporarily for now, overwrote some CSS for this embedded skin.
I've tried to emulate this. It works on initial load but I'm having some problems and I am doing some things a little differently from the app that I'm using as a model.
First of all, my grid is inside an Update Panel in order to support ajax. One of the main aspects of my screen is having the user click an edit/view button which is stationed in column one of each row. When this is clicked I use a modal popup extender to show a dialog that allows the user to do some things.

The main problem here is the ajax postback. Whenever an ajax postback occurs, even when I click the grid filter icon or the grid refresh, everything is reset. The skin reverts to the blue office 2007 default skin and the grid is resized to the original size. I have javascript that resizes the grid when the browser is resized.

I need a way to cancel these updates on the ajax postback or a way to keep them up to date when postbacks occur. Can anyone offer any help?

Here's some of the markup using version 2008.2.1001.35 of the Ajax controls.

<asp:UpdatePanel ID="UpdatePanel" runat="server" UpdateMode="Conditional" >   
 
<Triggers>   
<asp:AsyncPostBackTrigger ControlID="MyGrid" /> 
<asp:AsyncPostBackTrigger ControlID="btnActivate"/>  
</Triggers> 
 
<ContentTemplate> 
 
<telerik:RadGrid ID="MyGrid" Skin="Office2007"   
GridLines="None" 
runat="server" 
PageSize="15"   
AllowPaging="True"   
AllowSorting="True"   
ShowGroupPanel="False"   
AutoGenerateColumns="False" 
 
<MasterTableView CommandItemDisplay="Top"   
TableLayout="Fixed" 
 
<Columns> 
<telerik:GridTemplateColumn UniqueName="EditColumn" AllowFiltering="False" Groupable="False">  
<ItemTemplate> 
<asp:ImageButton CausesValidation="false" ID="btnEdit" CommandName="Edit" OnClick="btnEdit_Click" runat="server" /> 
</ItemTemplate>   
   
</Columns> 
   
<CommandItemTemplate> 
   
<asp:LinkButton ID="lbRefresh" runat="server" CommandName="RebindGrid" ToolTip="Refresh"<asp:Image ID="imgRefresh" runat="server" AlternateText="Refresh" ImageUrl="../Images/Reload.gif" /> 
</asp:LinkButton> 
<asp:LinkButton ID="lbFilter" runat="server" CommandName="ToggleFilter" ToolTip="Filter"<asp:Image ID="imgFilter" runat="server" AlternateText="Filter" ImageUrl="../Images/Filter.gif" /> 
</asp:LinkButton> 
</CommandItemTemplate> 
   
</MasterTableView> 
   
<ClientSettings> 
<Resizing AllowColumnResize="true" /> 
<Scrolling UseStaticHeaders="true" AllowScroll="true" ScrollHeight="100%" /> 
</ClientSettings> 
   
</telerik:RadGrid> 
   
   
</ContentTemplate> 
   
</asp:UpdatePanel> 
 
 

Here's the CSS that I'm using to overwrite the Office 2007 skin. I'm putting this in the body tag. Why does this get reset on ajax postback?

    <style type="text/css">  
 
        .RadGrid  
        {  
            background:#FFFFFF;  
            border:1px solid #cac9b9;  
            color:#333;  
            outline:none; /* Firefo dashed outline when interacting with the DOM table */  
            zoom:1; /* IE6 dangles the scrollbars off the left side */  
        }  
 
        .RadGrid table thead th  
        {  
            background:none;  
            border-color:#acacac;  
            border-bottom:none;  
        }  
          
        .RadGrid table thead th { padding-top:0; padding-bottom:0; }  
 
        .GridHeaderDiv_Office2007  
        {  
            background:#e1decd url(images/gray-bg.gif) repeat-x;  
            border-bottom:1px solid #acacac;  
        }  
          
        #MainGrid .GridHeaderDiv_Office2007  
        {  
            padding-right:16px;  
            width:auto !important;  
        }  
          
        .GridHeaderDiv_Office2007 table thead tr th { border-left-width:0; border-right-width:1px; }  
 
        .GridPager_Office2007 { background:#efecdf url(images/gray-bg.gif) repeat-x; }  
        .GridPager_Office2007 td { border-top-color:#acacac; }  
          
        .RadMenu_Vista .rmLeftImage { left:5px; }  
          
        .GridDataDiv_Office2007 table tbody tr td { border-color:#e1e6f0; }  
   
          
    </style> 
 
 

Here's some sample javascript I'm using.

 

 

function pageLoad()  
{  
 sizeGridToViewport();  
}  
function sizeGridToViewport() {  
 var height = $telerik.getClientBounds().height;  
   
 if (height != arguments.callee.lastValue)   
 {  
  arguments.callee.lastValue = height;  
  var dataDiv = $get('MyGrid_GridData'),  
  display = dataDiv.style.display;  
  dataDiv.style.display = 'none'// removes thing to size from the document flow  
   
  dataDiv.style.height = height - document.forms[0].offsetHeight - 30 + 'px';  
  dataDiv.style.display = display; // reset  
   
 }  
}  
// Expand grid to fit window size  
Sys.Application.add_init(function() { $addHandler(window'resize', sizeGridToViewport) });  
 

 

Dimo
Telerik team
 answered on 11 Dec 2008
10 answers
1.9K+ views

I am using a radgrid with 2 fields.categoryid and category description.And I set category id as my datakeyname.How can I obtain the data of category description field when I select a particular row.I need all the appropriate cell values of the selected row.Pls help me in this issue ASAP.

 

 

<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource3" GridLines="None" Style="left: 24px; position: absolute; top: 168px" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" Height="24px" PageSize="5" Skin="Sunset" Width="512px" AllowAutomaticUpdates="True" AutoGenerateEditColumn="True" AllowAutomaticDeletes="True">

 

 

 

<MasterTableView DataKeyNames="categoryid" DataSourceID="SqlDataSource3" EditMode="InPlace" ClientDataKeyNames="categoryid" >

 

 

 

<Columns>
<telerik:GridBoundColumn DataField="categoryid" DataType="System.Int64" EmptyDataText="&amp;nbsp;" HeaderText="Category ID" SortExpression="categoryid" UniqueName="categoryid" ReadOnly="True"></telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="categorydescription" EmptyDataText="&amp;nbsp;" HeaderText="Description" SortExpression="categorydescription" UniqueName="categorydescription"> </telerik:GridBoundColumn>

 

 

 

<telerik:GridButtonColumn UniqueName="SelectColumn" Text="Select" CommandName="Select"></telerik:GridButtonColumn>
</Columns>

 

 

 

<ExpandCollapseColumn><HeaderStyle Width="20px" /></ExpandCollapseColumn>
<RowIndicatorColumn><HeaderStyle Width="20px" /></RowIndicatorColumn></MasterTableView><FilterMenu EnableTheming="True" Skin="Sunset"><CollapseAnimation Duration="200" Type="OutQuint" /></FilterMenu><HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"Font-Underline="False" Wrap="True" /><PagerStyle Mode="NextPrevAndNumeric" /><ClientSettings><Selecting AllowRowSelect="True" /></ClientSettings><EditItemStyle Font-Names="Tahoma" Font-Size="9pt" /></telerik:RadGrid>

 

 

 

 

Princy
Top achievements
Rank 2
 answered on 11 Dec 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?