Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
143 views
Hello,
I create a custom control which inherits CompositeControl and put it in template column. Controls contains textbox and button. Here is how I render it:
writer.AddAttribute(HtmlTextWriterAttribute.Id, ClientID);
            writer.AddAttribute(HtmlTextWriterAttribute.Style, "width:100%", false);
            writer.RenderBeginTag(HtmlTextWriterTag.Table);
            writer.RenderBeginTag(HtmlTextWriterTag.Tr);
            writer.AddAttribute(HtmlTextWriterAttribute.Style, "padding: 0;margin: 0;width:95%", false);
            writer.RenderBeginTag(HtmlTextWriterTag.Td);
            _textbox.RenderControl(writer);
            writer.RenderEndTag();
            writer.AddAttribute(HtmlTextWriterAttribute.Style, "padding: 0;margin: 0;width: 24px", false);
            writer.RenderBeginTag(HtmlTextWriterTag.Td);
            _clearButton.RenderControl(writer);
            writer.RenderEndTag();
            writer.RenderEndTag();
            writer.RenderEndTag();

And it looks like this: http://ybex.com/d/hftqcnpzn4hf6rel5tzore55a8gw6tulq10aeh67.html
And this also happens when I put your control, i.e. DateTimePicker in template column. When I create column, I set its width manually, so I suppose controls in template should "know" its parent width and fit accordingly.
How can I fit controls into cell? Also I would like to stretch column when filter control doesn't fit its width.
I'm not sure those 2 questions are not mutually exclusive but they're both issues I want to solve.
Thank you.
Pavlina
Telerik team
 answered on 21 Sep 2011
2 answers
139 views
I have the following on a page:

radscriptmanager
radajaxpanel
radajaxloadingpanel
button

I wire everything together, click the button and the loading panel displays the image as expected.  However say on the server a process is running very long and I want the user to be able to kill the request.  I don't mean a timeout I want to be able to kill the ajax request by maybe clicking a button embedded within the radajaxloadingpanel.  

Can you tell me if this is possible?

tia 
Robert
Top achievements
Rank 1
 answered on 21 Sep 2011
1 answer
137 views
Hello there!

I've been trying to create a layout for a page that will be displayed inside a RadWindow (which must support window resizing and maximizing) component in a Web-Desktop scenario application but it's has proven a difficult task.

One of the requirements, is that the page height content must be split between 2 controls: the top half of the page must contain a RadGrid and the bottom half must contain a RadTabStrip (which contains headers to paginate the RadMultiPage below) and a RadMultiPage which will contain input fields.

The 50-50 height ratio between controls should not be changed even if the window is resized.

Here's the current ASPX for the page:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Usuarios.aspx.cs" Inherits="BigWeb.PaginaUsuarios" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head id="Head1" runat="server">
    <link href="css/big.css" rel="stylesheet" type="text/css" />
    <title>Pagina teste BIG</title>
</head>
<body>
    <form id="frmBig" runat="server">
    <telerik:RadScriptManager ID="rsmScripts" runat="server">
    <Scripts>
       <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
       <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
       <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
       <asp:ScriptReference Path="js/livevalidation_standalone.compressed.js"/>
       <asp:ScriptReference Path="js/big.js"/>
   </Scripts>
    </telerik:RadScriptManager>
    <telerik:RadAjaxLoadingPanel ID="loadingPanel" runat="server"
        Skin="Hay" IsSticky="False" MinDisplayTime="5">
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadSkinManager ID="rsmBig" Runat="server" ShowChooser="True"
        Skin="Hay" onskinchanging="RadSkinManager1_SkinChanging">
        <TargetControls>
            <telerik:TargetControl ControlID="rgUsuarios" Skin="Hay" />
        </TargetControls>
    </telerik:RadSkinManager>
    <telerik:RadAjaxManager ID="ajaxManager" runat="server">
        <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="rgUsuarios">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="rgUsuarios"/>
                        <telerik:AjaxUpdatedControl ControlID="rtsAbas" />
                        <telerik:AjaxUpdatedControl ControlID="rmpAbas" LoadingPanelID="loadingPanel" />
                        <telerik:AjaxUpdatedControl ControlID="hidCodigoInterno" />
                        <telerik:AjaxUpdatedControl ControlID="hidIndexRowGrid" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="btnSalvar">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="rgUsuarios"
                            LoadingPanelID="loadingPanel" />
                        <telerik:AjaxUpdatedControl ControlID="rtsAbas" />
                        <telerik:AjaxUpdatedControl ControlID="rmpAbas" LoadingPanelID="loadingPanel" />
                        <telerik:AjaxUpdatedControl ControlID="hidCodigoInterno" />
                        <telerik:AjaxUpdatedControl ControlID="hidIndexRowGrid" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        <ClientEvents OnResponseEnd="ValidaCampos" />
    </telerik:RadAjaxManager>
    <div id="grid">
    <telerik:RadGrid ID="rgUsuarios" runat="server"
         AllowFilteringByColumn="True" AllowPaging="True"
        AllowSorting="True" CellSpacing="0" CssClass="GridLogos" Culture="pt-BR" GridLines="None" Skin="Hay"
        Width="100%" AutoGenerateColumns="False" ShowFooter="True" ShowGroupPanel="True" AllowMultiRowEdit="False"
        Height="50%" ViewStateMode="Enabled"
        PageSize="30" AllowCustomPaging="True">
        <ClientSettings AllowColumnsReorder="True" AllowRowsDragDrop="False"
            EnablePostBackOnRowClick="True" ReorderColumnsOnClient="True">
            <Selecting AllowRowSelect="True" />
        </ClientSettings>
        <MasterTableView>
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
 
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
 
<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
 
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
            <ItemStyle Height="7px" />
        </MasterTableView>
            <ItemStyle Height="7px" />
            <FilterMenu EnableImageSprites="False"></FilterMenu>
            <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
    </telerik:RadGrid>
    </div>
    <div style="clear:both;"></div>
    <div id="campos">
    <telerik:RadTabStrip ID="rtsAbas" runat="server" Width="98%"
        MultiPageID="rmpAbas" Skin="Hay" SelectedIndex="1">
        <Tabs>
            <telerik:RadTab runat="server" PageViewID="rpv"
                Text="Campos 1">
            </telerik:RadTab>
            <telerik:RadTab runat="server" PageViewID="RadPageView2" Text="Campos 2"
                Selected="True">
            </telerik:RadTab>
        </Tabs>
            </telerik:RadTabStrip>
            </div> 
        <asp:HiddenField ID="hidCodigoInterno" runat="server" />
        <asp:HiddenField ID="hidIndexRowGrid" runat="server" />
    </form>
</body>
</html>


The current CSS being applied:
body
{
    margin:0;
    padding:0;
    height:100%;
    width: 100%;
}
 
.GridLogos
{
    height:100%;
}
 
.CampoTexto
{
    margin: 6px;
}
 
#campos
{
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}
 
#grid
{
    float:left
}


There are 2 images attached to this thread: layoutbig.jpg is the current layout; desiredlayout.jpg is a mockup of the desired result.

Most likely, this solution won't be achieved without Javascript code for the resize function, here's a crappy example of a Javascript of my own:

$telerik.$(window).bind("resize", Resize);
$telerik.$(document).ready(function () { Resize(); });
 
function Resize()
{
    var grid = $find("rgUsuarios");
    var tabstrip = $find("rmpPaginas");
    var tabheaders = $find("rmpAbas");
    var gridHeight = ($(window).height() / 2) - tabheaders.get_element().style.height;
    var heightGrid = (window.innerHeight / 2);
    grid.get_element().style.height = heightGrid + "px";
    tabheaders.repaint();
    grid.repaint();
    tabstrip.repaint();
}


Please, any advices in order to achieve this layout?
Pavlina
Telerik team
 answered on 21 Sep 2011
1 answer
199 views
Hi ,

i want to create grid having parent and child relationship.
After clicking parent row i want to get ID and make call to DB and get child records and then display in same grid.

can you help me in this.

Note: i dont want to populate all child for all parent on load. when user clicks on parent i want to get only child records for that parent  from DB and display.

Jayesh Goyani
Top achievements
Rank 2
 answered on 21 Sep 2011
2 answers
104 views
Hello there

I'd like to know if there is a way to have some kind of ListView with virtual directories, which represent photos, musics or videos organized in virtual folders by date, artist or type for example, facebook like browsing I suppose. When a user clicks on a folder, he enters in a view which lists all photos or videos for that directory only, (and also with a possible link to go back). What kind of radcontrols combination should I use to achieve this, if possible? I was thinking of a combination of FileExplorer and Listview maybe!?!? Hope u understood my question :)

Thx a lot, anemet.
Alin
Top achievements
Rank 1
 answered on 21 Sep 2011
10 answers
292 views
Sometimes there are duplicate sub menu items created for no apparent reason.  Sometimes it works fine.

Say there are 3 submenu items under a parent, select one of those, move off it, go back to it a second later and those same 3 subitems have been repeated usually 1-3 times so that there are now 6-12 items under the parent.  It's also always the full set of subitems that are repeated, it's never just 1 or 2 out of the 3.

It seems to be somewhat random.  The menu is created in code and I've confirmed that code is ONLY being hit on the initial page load and not any postbacks.  The only other interaction in code with the menu is to enable or disable certain items depending on what the user had selected.

Other than the client menu item click handler, all code referencing the menu is on the server side.
Peter
Telerik team
 answered on 21 Sep 2011
5 answers
102 views
HI all,

Been working with the scheduler and using both the RadDock and the RadWindowManager to create advanced edit form for scheduler. So I am wondering which one is the recommended/best practice to use?

Thanks,

Brian 
Stuart Hemming
Top achievements
Rank 2
 answered on 21 Sep 2011
6 answers
422 views
Hi,

I have radgrid. i am using export to excelML from radgrid. i want give caption or header like "Employee Report 2011-2012". how to get set manually in code behind?

Is there any possible way this one?

Thanks,
Dhamu.
Dhamodharan
Top achievements
Rank 1
 answered on 21 Sep 2011
4 answers
308 views
I am getting the below error after I added the radtooltip to the rad grid, The data is bound in the code behind but the rad grid is defined in the page code, please advise how to get the radtooltip working with this set up... 
Value cannot be null. Parameter name: Cannot find a server control with ID=headerChkbox3. If you need to specify a client-side element ID, please set IsClientID to true.
<
telerik:RadGrid ID="TopicRadGrid" EnableAJAX="True" OnNeedDataSource="TopicRadGrid_NeedDataSource"  ShowHeader="true" ShowFooter="false" AllowMultiRowSelection="true"  runat="server" Width="400px">
                                                        <MasterTableView AutoGenerateColumns="False">
                                                            <Columns>
                                                                <telerik:GridTemplateColumn UniqueName="CheckBoxTemplateColumn3" HeaderStyle-Width="30px">
                                                                   <HeaderTemplate>
                                                                        <asp:CheckBox id="headerChkbox3"  Text="  Select All" OnCheckedChanged="ToggleTopicSelectedState" AutoPostBack="True" runat="server"></asp:CheckBox>
                                                                        <telerik:RadToolTip ID="RadToolTip2" runat="server"   TargetControlID="headerChkbox3" Width="250px"  RelativeTo="Element" Position="MiddleRight" EnableShadow="true" Text="Please select all the topics you want to subscribe">                                                                          
                                                                         </telerik:RadToolTip>
                                                                    </HeaderTemplate>                                            
                                                                    <ItemTemplate>
                                                                        <asp:CheckBox id="CheckBox3"  OnCheckedChanged="ToggleTopicRowSelection"  AutoPostBack="True" runat="server"></asp:CheckBox>
                                                                        <telerik:RadToolTip ID="RadToolTip1" runat="server" TargetControlID="CheckBox3" Width="250px"  RelativeTo="Element" Position="MiddleRight" EnableShadow="true">
                                                                           <%# DataBinder.Eval(Container, "DataItem.Description") %>
                                                                         </telerik:RadToolTip>
                                                                         <asp:Label ID="Label1" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.topic") %>'>
                                                                         </asp:Label>
                                                                    </ItemTemplate>
                                                                </telerik:GridTemplateColumn>
                                                            </Columns>
                                                        </MasterTableView>
                                                        <ClientSettings EnableRowHoverStyle="true" >                                                              
                                                        </ClientSettings>
                                                        </telerik:RadGrid>
Simba
Top achievements
Rank 1
 answered on 21 Sep 2011
2 answers
170 views
<asp:Image ID="imgMain" runat="server"/>
<telerik:RadToolTip ID="RadToolTip2" runat="server" TargetControlID="imgMain" Width="400px" RelativeTo="Element" EnableShadow="true" Position="BottomCenter" Animation="Slide"            AnimationDuration="300" ShowDelay="200" Skin="Vista" HideEvent="LeaveToolTip">
</telerik:RadToolTip>

Hi im using the RadToolTip as above.
Im also adding a Image inside the RadToolTip at runtime, the ImageUrl of this Image is set via my own custom Image Handler which is used within the site and works fine.

When the user hovers over 'imgMain' the RadToolTip should show the same image but at a different size, but all im getting is the RadToolTip showing the title.
If i hard code the Image Urls into the Image inside the RadToolTip is shows fine so i know its not a problem with my ImageHandler.

Is there any known issues with dynamically showing images from a Image Handler iside a RadToolTip?

My Server side code is below
imgMain.ImageUrl = String.Format("~/dbimagehandler.ashx?record=product&empty=showt&imageno=1&recno=-1&wid={0}&hgt={1}&productid={2}", "188", "196", this.ProductId)
 
imgMain.AlternateText = ds.Ds.Tables["Table"].Rows[0]["Title"].ToString();
imgMain.ToolTip = ds.Ds.Tables["Table"].Rows[0]["Title"].ToString();
 
RadToolTip2.TargetControlID = imgMain.ID;
Image imgsmall = new Image();
imgsmall.ImageUrl = String.Format("~/dbimagehandler.ashx?record=product&empty=showt&imageno=1amprecno=-1&wid={0}&hgt={1}&productid={2}", "376","392", this.ProductId);
RadToolTip2.Controls.Add(imgsmall);

Any help on this would be mcuh apreciated.

Neil
Top achievements
Rank 1
 answered on 21 Sep 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?