Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
348 views
Dear ,
I use 2 user control :header and item user control .Item user control contain another user control name :dayshift
In Firefox it work true.But in IE ,this is 2 issue :First,height table can set fit 100% container(in item template).Second, Header and Item align wrong although I set HeaderStyle.Width and ItemStyle.Width is the same value(I try set both on design and on code).
Please help me.I'm using Rad Controls for Asp.net Ajax Q3
This is my code
dayshift:
   <table cellpadding="0" cellspacing="0" style="border: none; margin: 0px; padding: 0px;text-align: center; width: 100%">
    <tr>
                    <td align="center">                        
                        <asp:Panel ID="pShift" runat="server" HorizontalAlign="Center">                        
                            <asp:CheckBox ID="UR017001chkShift" runat="server" />
                        </asp:Panel>                        
                    </td>
                </tr>
                <tr>
                    <td align="center">
                        <asp:ImageButton ID="UR017001ibAccept" ImageUrl="~/Images/accept.png" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td align="center">
                        <asp:ImageButton ID="UR017001ibCancel" ImageUrl="~/Images/remove.png" runat="server"
                            OnClick="UR017001ibCancel_Click" />
            </td>
        
    </tr>
</table>
User control Header:
<table cellspacing='0' cellpadding='0' border='0' width='100%'>
    <tr>
        <td class='ShiftShopping-header-top'>
            <asp:Literal ID="lithDay" runat="server" />
        </td>
    </tr>
    <tr>
        <td>
            <table cellspacing='0' cellpadding='0' border='0' width='100%'>
                <tr>
                        <asp:Repeater ID="repHeaderLeft" runat="server">
                            <ItemTemplate>
                                <td class="ShiftShopping-header-bot-left" style="width: <%# DataBinder.Eval(Container.DataItem, "Percent")%>%;">
                                    <%# DataBinder.Eval(Container.DataItem, "WorkShiftCode")%>
                                </td>
                            </ItemTemplate>
                        </asp:Repeater>
                          
                        <td class="ShiftShopping-header-bot-right">
                        <asp:Literal runat ="server" Text="<%$Resources:Strings,UR017001Timer %>" />
                        </td>
                </tr>
            </table>
        </td>
    </tr>
</table>
User control for Item template:
<table cellspacing='0' cellpadding='0' border='0' width='100%' style="height:100%">
    <tr style="height:100%">
        <asp:Repeater ID="repItemLeft" runat="server"
            onitemdatabound="repItemLeft_ItemDataBound">
            <ItemTemplate>
                <td class="ShiftShopping-item-left" style="width: <%# DataBinder.Eval(Container.DataItem, "Percent")%>%;">
          <uc1:DayShift ID="DayShiftLeft" runat="server"   />
                      
                </td>
            </ItemTemplate>
        </asp:Repeater>
        
        <td class="ShiftShopping-item-right">
            <asp:Literal ID="litTimer" runat="server" />
        </td>
    </tr>
</table>

 CSS:
 <style type="text/css">
      .ShiftShopping-wrap-header tr td
    {       
        
    }
    .ShiftShopping-wrap-header
    {                
        padding: 0px !important;
        margin: none !important;        
    }
    .ShiftShopping-wrap-cell td
    {
        padding: 0px !important;
        margin: none !important;       
    }
    .ShiftShopping-wrap-cell
    {
        height:100%;
    }
    .ShiftShopping-header-top
    {      
        border-bottom: 1px solid #9EB6CE !important;
        text-align: center;
    }
    .ShiftShopping-header-bot-left
    {
        text-align: center;
        border-right:1px solid #9EB6CE !important;
    }
    .ShiftShopping-header-bot-right
    {          
        
        
        text-align: center;
    }
    .ShiftShopping-item-left
    {        
    height:100%;    
        text-align: center;
        border-right:1px solid #d0d7e5 !important;

    }
    .ShiftShopping-item-right
    {
        height:100%;
        text-align: center;
            }
    
     .ShiftShopping-wrap-header td
    {        
            
        padding: 0px !important;
        margin: none !important;  
             height:100%;
    }
    .ShiftShopping-wrap-cell td td
    {
        padding: 0px !important;
        margin: none !important;    
        border:none;
    }
</style>
At last,my RadGrid:
 <telerik:RadGrid ID="UR009001rgShipShopping" AllowPaging="true" PageSize="10" runat="server"
    AutoGenerateColumns="False" CellPadding="0" CellSpacing="0" Width="98%" OnItemDataBound="UR009001rgShipShopping_ItemDataBound"
    OnNeedDataSource="UR009001rgShipShopping_NeedDataSource"
    onitemcreated="UR009001rgShipShopping_ItemCreated">
    <HeaderContextMenu EnableTheming="True">
        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
    </HeaderContextMenu>
    <ClientSettings>
        <Scrolling AllowScroll="true" UseStaticHeaders="True" ScrollHeight="235px" />
    </ClientSettings>
    <FilterMenu EnableTheming="True">
        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
    </FilterMenu>
    <MasterTableView DataKeyNames="EmployeeID" TableLayout="Fixed">
        <HeaderStyle CssClass="ShiftShopping-wrap-header" />
        <ItemStyle CssClass="ShiftShopping-wrap-cell"/>
        <AlternatingItemStyle CssClass="ShiftShopping-wrap-cell"/>
        <RowIndicatorColumn>
            <HeaderStyle Width="20px"></HeaderStyle>
        </RowIndicatorColumn>
        <ExpandCollapseColumn>
            <HeaderStyle Width="20px"></HeaderStyle>
        </ExpandCollapseColumn>
        <Columns>
            <telerik:GridTemplateColumn ItemStyle-HorizontalAlign="center" HeaderText="<%$ Resources:Strings, UR000001grvhEmployeeInfo %>"
                HeaderStyle-HorizontalAlign="Center">
                <ItemTemplate>
                    <table cellpadding="0" border="0px" cellspacing="0" width="100%" style="overflow: hidden">
                        <tr>
                            <td align="center" style="overflow: hidden">
                                <asp:Literal ID="UR009001litEmployeeInfo" runat="server" />
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
                <HeaderStyle HorizontalAlign="Center" Width="80px"></HeaderStyle>
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="80px" Wrap="true">
                </ItemStyle>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn>
                <HeaderTemplate>
                 <uc4:HeaderShiftShopping ID="dshMonday" runat="server" />  
                </HeaderTemplate>
                <ItemTemplate>
                    <uc5:ItemShiftShopping ID="dsMonday" runat="server" />
                </ItemTemplate>
                <HeaderStyle  />
                <ItemStyle />
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn>
                <HeaderStyle />
                <HeaderTemplate>
               
                    <uc4:HeaderShiftShopping ID="dshTuesday" runat="server" />  
                </HeaderTemplate>
                <ItemTemplate>
                  <uc5:ItemShiftShopping ID="dsTuesday" runat="server" />
                </ItemTemplate>
                <HeaderStyle  />
                <ItemStyle  />
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn>
                <HeaderTemplate>
                 <uc4:HeaderShiftShopping ID="dshWednesday" runat="server" />
                </HeaderTemplate>
                <ItemTemplate>
                    <uc5:ItemShiftShopping ID="dsWednesday" runat="server" />
                </ItemTemplate>
                <HeaderStyle />
                <ItemStyle />
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn>
                <HeaderTemplate>
                    <uc4:HeaderShiftShopping ID="dshThursday" runat="server" />
                </HeaderTemplate>
                <ItemTemplate>
                   <uc5:ItemShiftShopping ID="dsThursday" runat="server" />
                </ItemTemplate>
                <HeaderStyle  />
                <ItemStyle  />
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn>
                <HeaderTemplate>
                    <uc4:HeaderShiftShopping ID="dshFriday" runat="server" />
                </HeaderTemplate>
                <ItemTemplate>
                     <uc5:ItemShiftShopping ID="dsFriday" runat="server" />
                </ItemTemplate>
                <HeaderStyle  />
                <ItemStyle  />
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn>
                <HeaderTemplate>
                  <uc4:HeaderShiftShopping ID="dshSaturday" runat="server" />
                </HeaderTemplate>
                <ItemTemplate>
                <uc5:ItemShiftShopping ID="dsSaturday" runat="server" />
                </ItemTemplate>
                <HeaderStyle  />
                <ItemStyle />
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn>
                <HeaderTemplate>
                  <uc4:HeaderShiftShopping ID="dshSunday" runat="server" />
                </HeaderTemplate>
                <ItemTemplate>
                    <uc5:ItemShiftShopping ID="dsSunday" runat="server" />
                </ItemTemplate>
                <HeaderStyle />
                <ItemStyle />
            </telerik:GridTemplateColumn>
            
              <telerik:GridTemplateColumn ItemStyle-HorizontalAlign="center" HeaderText="<%$ Resources:Strings, UR017001Total %>"
                HeaderStyle-HorizontalAlign="Center">
                <ItemTemplate>
                    <table cellpadding="0" border="0px" cellspacing="0" width="100%">
                        <tr>
                            <td align="center" style="width: 100%">
                                <asp:Literal ID="litTotalWeek" runat="server" />
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
                <HeaderStyle HorizontalAlign="Center" Width="32px"></HeaderStyle>
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="32px" Wrap="False">
                </ItemStyle>
            </telerik:GridTemplateColumn>
        </Columns>
        <ItemStyle BorderStyle="None" />
    </MasterTableView>
</telerik:RadGrid>



Dimo
Telerik team
 answered on 14 Apr 2009
2 answers
326 views

Hi,

 

I have radgrid on my page with some template colomns. All the columns has textboxs with text_changed events.

 

If user clicks on any of the textbox of any row of grid, I want to know the row number. Is it possible from client side to know the row number?

 

I tried ItemCommand event, it gets raised when I click on any textbox but if I tab from one textbox to another at that time it doesn’t get raised. And on moving from one textbox to another I want to know row number from grid.

 

Please let me know any client or server side event to get the row number. It would be better if there is a way to get it from client side.

Tarulatta Patel
Top achievements
Rank 1
 answered on 14 Apr 2009
1 answer
155 views
Hi All,

         I am using RadGrid in which skin is Vista, mode="NextPrevAndNumeric" in PagerStyle tab. But it is showing only paging(1,2,3..) without the pagesize dropdown.

         Herewith i have attached my RadGrid for your vision. Please reply as soon as possible.


Code:

<asp:UpdatePanel ID="Update1" runat="server">
                        <ContentTemplate>

                            <telerik:RadGrid Width="99.5%" ID="grdIDR" runat="server" OnNeedDataSource="callthis"
                                AllowPaging="True" AllowSorting="True" Skin="Vista" AutoGenerateColumns="False" ShowFooter="true"
                                enableajax="True" GridLines="Vertical" ClientSettings-Resizing-AllowColumnResize="true"
                                ClientSettings-Resizing-EnableRealTimeResize="true" PageSize="5" OnPageIndexChanged="grdIDR_PageIndexChanged"
                                OnItemDataBound="grdIDR_ItemDataBound" MasterTableView-CommandItemDisplay="Top">
                                <PagerStyle mode="NextPrevAndNumeric" AlwaysVisible="true" />  
                                <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">
                                    <Selecting AllowRowSelect="True" />
                                    <ClientEvents />
                                </ClientSettings>
                                <ExportSettings FileName="PaymentScheduleGrid" OpenInNewWindow="True" ExportOnlyData="True">
                                </ExportSettings>
                                <MasterTableView GroupLoadMode="Client" TableLayout="Fixed" Width="100%">
                                    <NoRecordsTemplate>
                                        <asp:Label ID="lblNRF" runat="server" Text="No Records to display."></asp:Label>
                                    </NoRecordsTemplate>                                    
                                    <CommandItemTemplate>
                                        <table width="100%" style="background-color: whitesmoke; border-color: whitesmoke;"
                                            border="0">
                                            <tr>
                                                <td align="right">
                                                    <asp:LinkButton ID="linkbutton1" ToolTip="Export to Excel" runat="server" ForeColor="black">
                                                    <img title="export to excel"
                                                                                    style="border:0px;vertical-align:middle;" alt=""
                                                                                    src="../images/excel.jpg"  width="13" height="13" />&nbsp;Export to Excel
                                                    </asp:LinkButton>
                                                </td>
                                            </tr>
                                        </table>
                                    </CommandItemTemplate>
                                    <Columns>
                                        <telerik:GridBoundColumn DataField="sno" SortExpression="sno" HeaderText="S.No."
                                            UniqueName="sno">
                                            <ItemStyle HorizontalAlign="Left" Width="45px" />
                                            <HeaderStyle HorizontalAlign="Center" Width="45px" />
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="Name" SortExpression="Name" HeaderText="Customer Name"
                                            UniqueName="Name">
                                            <ItemStyle HorizontalAlign="Left" />
                                            <HeaderStyle HorizontalAlign="Center" />
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="CustID" SortExpression="CustID" HeaderText="Cust ID"
                                            UniqueName="CustID">
                                            <ItemStyle HorizontalAlign="Center" Width="80px" />
                                            <HeaderStyle HorizontalAlign="Center" Width="80px" />
                                        </telerik:GridBoundColumn>
                                        <telerik:GridHyperLinkColumn DataTextField="ESIID" SortExpression="ESIID" HeaderText="ESIID"
                                            UniqueName="ESIID">
                                            <ItemStyle HorizontalAlign="Center" Width="145px" />
                                            <HeaderStyle HorizontalAlign="Center" Width="145px" />
                                        </telerik:GridHyperLinkColumn>
                                        <telerik:GridBoundColumn DataField="Zone" SortExpression="Congestion Zone" HeaderText="Congestion Zone"
                                            UniqueName="Congestion Zone">
                                            <ItemStyle HorizontalAlign="Left" Width="125px" />
                                            <HeaderStyle HorizontalAlign="Center" Width="125px" />
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="FlowDate" SortExpression="FlowDate" HeaderText="Flow Date"
                                            UniqueName="FlowDate">
                                            <ItemStyle HorizontalAlign="Center" Width="160px" />
                                            <HeaderStyle HorizontalAlign="Center" Width="160px" />
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="ProfileName" SortExpression="ProfileName" HeaderText="Profile Name"
                                            UniqueName="ProfileName">
                                            <ItemStyle HorizontalAlign="Left" />
                                            <HeaderStyle HorizontalAlign="Center" />
                                        </telerik:GridBoundColumn>
                                    </Columns>
                                </MasterTableView>
                            </telerik:RadGrid>

                        </ContentTemplate>
                    </asp:UpdatePanel>

Thanks & Regards
sudheer
Dimo
Telerik team
 answered on 14 Apr 2009
9 answers
160 views
  Hi,
    I was thinking of creating two aspx pages.  I want to create a third aspx page with two Radpanes, and include the first two aspx pages on this third aspx page within the radpanes and then I would like to drag detailtables from one aspx page to the other. 
    I am wondering what the best way to do this might be ?
  thanks,
  David
Sebastian
Telerik team
 answered on 14 Apr 2009
1 answer
87 views

Hi:

I have a simple javascript triggered by a submit button:

. . .

<asp:Content ID="Content2" ContentPlaceHolderID="CPH1" runat="server">

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

<script type="text/javascript">

<!-- Beginning of JavaScript -

function HasCompleteInfo()

{

theMDFName = document.getElementById('<%=Txt_MDFName.UniqueID%>').value;

if (theMDFName.length < 10)

{

alert ("Please enter a valid hospital name.");

return false;

} else if (ValidateEmail(document.getElementById('<%=Txt_EMail.UniqueID%>').value) == false) {

alert("Invalid email format.\nPlease enter a valid email in the format user@host.domain.");

return false;

} else {

return true;

}

}

 

function TestAJaxConditionAtStart(sender, args)

{

}

 

//-->

</script>

</telerik:RadCodeBlock>

<asp:ScriptManager ID="ScriptManager" runat="server" />

<telerik:radformdecorator id="RadFormDecorator1" Skin="WebBlue" runat="server" decoratedcontrols="all">

</telerik:radformdecorator>

<telerik:RadAjaxManager ID="RAJforForm"

ClientEvents-OnRequestStart="TestAJaxConditionAtStart"

runat="server">

<AjaxSettings>

<telerik:AjaxSetting AjaxControlID="DDLCountry">

<UpdatedControls>

<telerik:AjaxUpdatedControl ControlID="DDLCountry" LoadingPanelID="ALP01" />

<telerik:AjaxUpdatedControl ControlID="DDLProv" LoadingPanelID="ALP01" />

</UpdatedControls>

</telerik:AjaxSetting>

<telerik:AjaxSetting AjaxControlID="BtnSubmit">

<UpdatedControls>

<telerik:AjaxUpdatedControl ControlID="pnlBackGround01" LoadingPanelID="ALP01" />

</UpdatedControls>

</telerik:AjaxSetting>

</AjaxSettings>

</telerik:RadAjaxManager>

<telerik:RadAjaxLoadingPanel ID="ALP01"

Transparency="40" BackColor="White" Height="75px" Width="75px"

runat="server">

<img id="ALPImg01"

alt="Loading..."

src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' style="border:0;"

/>

</telerik:RadAjaxLoadingPanel >

<asp:Panel ID="pnlBackGround01" BackImageUrl="./Images/WebBlue_Pnl_Bckgrd.gif" runat="server">

. . .

<asp:TextBox ID="Txt_MDFName" TextMode="SingleLine" Width="200px" MaxLength="100" Font-Size="8pt" runat="server" />

. . .
<asp:Button ID="BtnSubmit" Font-Size="8pt" Text="Submit" OnClientClick="if (!HasCompleteInfo()) return false;" OnClick="BtnSubmit_Click" runat="server" />

. . .

</asp:Panel>

</asp:Content>



The above javascript (HasCompleteInfo()) runs perfectly with IE, but the alert fails to be triggered in FireFox. I'm mystified as to why.  Any clarification would be appreciated.

 

Justin

Dimo
Telerik team
 answered on 14 Apr 2009
2 answers
124 views
I follow the demo example on Load on Demand and does not work for it. 

The button is declared as

 

<asp:ImageButton ID="ibEDSInfo" runat="server" ImageUrl="~/Images/info.gif"

 

 

OnClientClick="return false" />

 


The Rad Tool Tip Manager as

 

<telerik:RadToolTipManager ID="RadToolTipManager1" runat="server" Position="BottomCenter" RelativeTo="Element" HideEvent="LeaveToolTip"

 

 

Animation="Fade" Width="350px" Skin="Office2007" OnAjaxUpdate="onAjaxUpdate">

 

 

</telerik:RadToolTipManager>

The Server code is

 

 

protected void onAjaxUpdate(object sender, ToolTipUpdateEventArgs args)

 

{

 

this.UpdateToolTip(args.Value, args.UpdatePanel);

 

}

 

private void UpdateToolTip(string elementID, UpdatePanel panel)

 

{

 

Control ctrl = Page.LoadControl("~/UserControls/EDSDetailUC.ascx");

 

panel.ContentTemplateContainer.Controls.Add(ctrl);

 

UserControls_EDSDetailUC details = (UserControls_EDSDetailUC)ctrl;

 

details.EDSId = elementID;

}


The code to add the image to the tool tip manager is

 

RadToolTipManager1.TargetControls.Add(ibEDSInfo.ClientID, oTool.EDSId.ToString(),

true);


However, it seems the ajaxupdate is not raised at any circumstances.

What is wrong with my code snippet?


 

Tsvetie
Telerik team
 answered on 14 Apr 2009
1 answer
228 views
Hi,

I am trying to dynamically populate a ragdrid based on the selection of a Radtree.
I see the results from the stored procedure being populated in the variable but for some reason i cannot see it in the grid.
I am creating the radgrid at design time but no data source is assigned to it.

Here is the code: I get a message in the grid saying "No Records to display" 
I see the results in the "data" variable but nothing in the grid.

Thanks

 protected void RadTreeView1_NodeClick(object sender, RadTreeNodeEventArgs e)

    {

        var data = GetData(new SqlCommand("exec results 'Sector','Code'));

        var a = data.Rows.Count;

        var c = data.Rows[1].ToString();

        RadGrid1.DataSource = data;

        RadGrid1.Rebind();

        

    }

Here is the grid at design time:

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

                            AllowPaging="True" AllowSorting="True" 

                            GridLines="None" Skin="Office2007" 

                            >

<MasterTableView CellSpacing="-1" AutoGenerateColumns="False">

<RowIndicatorColumn>

<HeaderStyle Width="20px"></HeaderStyle>

</RowIndicatorColumn>

<ExpandCollapseColumn>

<HeaderStyle Width="20px"></HeaderStyle>

</ExpandCollapseColumn>

</MasterTableView>

                            <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">

                                <Selecting AllowRowSelect="True" />

                            </ClientSettings>

                        </telerik:RadGrid>

Georgi Krustev
Telerik team
 answered on 14 Apr 2009
3 answers
110 views
Hello,
I need to modify the advanced edit and insert form to let users add additional informatie to an appointment. They must have the ability to select the information from a selectionlist (not a combobox). Can you provide me with a sample code to show me how to include a modal selectionlist in the advanced form?

With regards,
Pim
Dimitar Milushev
Telerik team
 answered on 14 Apr 2009
2 answers
78 views
I have searched and not found an answer to the following problem:

In Firefox 3 and IE6, the undo, redo, insert table, insert symbol, and foreground color icons all have invert triangles a few mm below the toolbar. Anyone have ideas?
Allen Smothers
Top achievements
Rank 2
 answered on 14 Apr 2009
1 answer
75 views
Hi All,

    Previously, I have used Telerik.2008 Version (dll). When i upgrade to Telerik.2009 version dll, then vista skin color is changed.

How can i get the previous telerik 2008 version vista color in 2009.

Thanks & Regards
Sudheer
Paul
Telerik team
 answered on 14 Apr 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?