Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
331 views

Hi,
  Can u suggest how to design the attached design using radgridview control.

  Is it possible to bind radgridview header from database.

Regards
Ravi
Brian
Top achievements
Rank 1
 answered on 26 May 2011
2 answers
69 views
How i would get week no in current year.
For instance:
Week 1 = Jan 1 - Jan 2
Week 2 = Jan 3 - Jan 9
Mark de Torres
Top achievements
Rank 1
 answered on 26 May 2011
0 answers
87 views
Currently i have develop Scheduler correctly. However, i have difficulty if the start date and end date changed.

Originally
start = '24-01-2011'
end =' 16-12-2011'

i need to modified the above start and end date to the following

start1 = '24-01-2011'
end1 = '01-04-2011'

start2='11-04-2011'
end2 ='24-06-2011'

start3='25-07-2011'
end3='30-09-2011'

start4='10-10-2011'
end4='16-12-2011'

Please advise
Mark de Torres
Top achievements
Rank 1
 asked on 26 May 2011
2 answers
156 views
Hi,
I am creating a rad grid programatically with GridTemplateColumn. I have followed this link as guidance http://www.telerik.com/help/aspnet/grid/grdprogrammaticcreation.html ..I am using a image button in the MyTemplate : ITemplate. And the I am programatically creating new buttons based on a string array ..

Reassign =

 

new ImageButton();

Reassign.ID = Assignee;

Reassign.Click +=

 

new ImageClickEventHandler(Reassign_Click);

When i click on these buttons. the page just refreshes and the Event hander method Reassign_Click  is never called.
Please suggest me ways to fire this click event

 

Bharanidharan
Top achievements
Rank 1
 answered on 25 May 2011
3 answers
199 views
<!--User control .ascx file-->
  
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="uclFleet.ascx.cs" Inherits="UserControls_uclFleet" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
  
  
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
<script type="text/javascript">
    function fnGridCreated(sender, args) {
         
        var scrollArea = sender.GridDataDiv;
        var dataHeight = sender.get_masterTableView().get_element().clientHeight;
        if (dataHeight < 350) {
            scrollArea.style.height = dataHeight + 10 + "px";
        }
    }
</script>
     
                <telerik:RadGrid ID="tlrkDgrFleet" runat="server" EnableViewState="true" CellPadding="0"
                    CellSpacing="0" GridLines="Both" Width="750px"
                    Skin="Office2007" HeaderStyle-Font-Size="8pt" 
                    HeaderStyle-Font-Bold="true" AllowPaging="true" ShowHeader="true" OnNeedDataSource="tlrkDgrFleet_NeedDataSource" OnItemDataBound="tlrkDgrFleet_OnItemDataBound">
                      
                    <MasterTableView CellPadding="0" CellSpacing="0" Width="99%" TableLayout="Fixed" ShowHeader="true" AutoGenerateColumns="false"
                        AllowPaging="true" ShowFooter="false">
                          
                        <Columns>
                            <telerik:GridTemplateColumn HeaderStyle-HorizontalAlign="Center" HeaderStyle-Width="50px"
                                UniqueName="SerialNo" ItemStyle-HorizontalAlign="Right">
                                <HeaderTemplate>
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                        <tr>
                                            <td style="border: 0" rowspan="2">
                                                Serial
                                                <br />
                                                No.
                                            </td>
                                        </tr>
                                    </table>
                                </HeaderTemplate>
                                 
                                <ItemTemplate>
                                    <asp:Label ID="lblSerialNo" runat="server"><%# Eval("A") %></asp:Label>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn HeaderStyle-HorizontalAlign="Center" HeaderStyle-Width="100px"
                                UniqueName="ColHeader" ItemStyle-HorizontalAlign="left">
                               <HeaderTemplate>
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                        <tr>
                                            <td style="width:100%" colspan="2">
                                                Column header
                                                <br /><hr />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                Sub Col A
                                            </td>
                                            <td>
                                                Sub Col B
                                            </td>
                                        </tr>                                        
                                    </table>
                                </HeaderTemplate>
                                <ItemTemplate>
                                 <table border="0" cellpadding="0" cellspacing="0" >
                                          
                                        <tr>
                                            <td>
                                                <asp:Label ID="lblA" runat="server" ><%# Eval("B") %></asp:Label>
                                            </td>
                                            <td>
                                                <asp:Label ID="lblE" runat="server"><%# Eval("C") %></asp:Label>
                                            </td>
                                        </tr>                                        
                                    </table>
                                      
                                  
                                  
                                     
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                           <telerik:GridTemplateColumn HeaderStyle-HorizontalAlign="Center" HeaderStyle-Width="100px"
                                UniqueName="Delivery" ItemStyle-HorizontalAlign="left">
                               <HeaderTemplate>
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                        <tr>
                                            <td style="border: 1" colspan="2">
                                                Delivery<br /><hr />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                Owner
                                            </td>
                                            <td>
                                                Operator
                                            </td>
                                        </tr>                                        
                                    </table>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="lblOwn" runat="server"><%# Eval("D") %></asp:Label>
                                </ItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="lblOper" runat="server"><%# Eval("E") %></asp:Label>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                              
                            <telerik:GridTemplateColumn HeaderStyle-HorizontalAlign="Center" HeaderStyle-Width="150px"
                                UniqueName="Current" ItemStyle-HorizontalAlign="left">
                               <HeaderTemplate>
                                    <table border="0" cellpadding="0" cellspacing="0" >
                                        <tr>
                                            <td style="border:0" colspan="3">
                                                Current<br /><hr />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                Own
                                            </td>
                                            <td>
                                                LEAST
                                            </td>
                                            <td>
                                                SLE123
                                            </td>
                                        </tr>                                        
                                    </table>
                                </HeaderTemplate>
                                <ItemTemplate>
                                   <table border="0" cellpadding="0" cellspacing="0" >
                                         
                                        <tr>
                                            <td>
                                                <asp:Label ID="lblCurrOwn" runat="server"><%# Eval("F") %></asp:Label>
                                            </td>
                                            <td>
                                                <asp:Label ID="lblCurrLE" runat="server"><%# Eval("G")%></asp:Label>
                                            </td>
                                            <td>
                                                <asp:Label ID="lblCurrSLE" runat="server"><%# Eval("H") %></asp:Label>
                                            </td>
                                        </tr>                                        
                                    </table>
                                      
                                </ItemTemplate>                                
                                  
                            </telerik:GridTemplateColumn>
                             <telerik:GridTemplateColumn HeaderStyle-HorizontalAlign="Center" HeaderStyle-Width="50px"
                                UniqueName="Future" ItemStyle-HorizontalAlign="left">
                                <HeaderTemplate>
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                        <tr>
                                            <td style="border: 0" rowspan="2">
                                                Future
                                                <br />
                                                Owner
                                            </td>
                                        </tr>
                                    </table>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="lblr" runat="server"><%# Eval("I") %></asp:Label>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn  HeaderStyle-HorizontalAlign="Center" HeaderStyle-Width="50px"
                                UniqueName="Bus" ItemStyle-HorizontalAlign="left">
                                <HeaderTemplate>
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                        <tr>
                                            <td style="border: 0" rowspan="2">
                                                Bus
                                                <br />
                                                Contract
                                            </td>
                                        </tr>
                                    </table>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="lblBusCon" runat="server"><%# Eval("J") %></asp:Label>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn  HeaderStyle-HorizontalAlign="Center" HeaderStyle-Width="50px"
                                UniqueName="Number" ItemStyle-HorizontalAlign="left">
                                <HeaderTemplate>
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                        <tr>
                                            <td style="border: 0" rowspan="2">
                                                House
                                                <br />
                                                Number
                                            </td>
                                        </tr>
                                    </table>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="lblNo" runat="server"><%# Eval("K") %></asp:Label>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn  HeaderStyle-HorizontalAlign="Center" HeaderStyle-Width="50px"
                                UniqueName="CurrentSet" ItemStyle-HorizontalAlign="left">
                                <HeaderTemplate>
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                        <tr>
                                            <td style="border: 0" rowspan="2">
                                                Current
                                                <br />
                                                Set.
                                            </td>
                                        </tr>
                                    </table>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="lblCurrentSet" runat="server"><%# Eval("L") %></asp:Label>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn  HeaderStyle-HorizontalAlign="Center" HeaderStyle-Width="50px"
                                UniqueName="LaneNo" ItemStyle-HorizontalAlign="left">
                                <HeaderTemplate>
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                        <tr>
                                            <td style="border: 0" rowspan="2">
                                                Lane
                                                <br />
                                                No.
                                            </td>
                                        </tr>
                                    </table>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="lblLaneNo" runat="server"><%# Eval("M") %></asp:Label>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn  HeaderStyle-HorizontalAlign="Center" HeaderStyle-Width="50px"
                                UniqueName="PurDate" ItemStyle-HorizontalAlign="center">
                                <HeaderTemplate>
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                        <tr>
                                            <td style="border: 0" rowspan="2">
                                                Purchase
                                                <br />
                                                Date
                                            </td>
                                        </tr>
                                    </table>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="lblDeliveryDate" runat="server"><%# Eval("N") %></asp:Label>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                              
                        </Columns>
                    </MasterTableView>
                   <ClientSettings>  
        <Scrolling AllowScroll="true" FrozenColumnsCount= "3" UseStaticHeaders="true" SaveScrollPosition="true" />  
  <ClientEvents OnGridCreated="fnGridCreated" />
    </ClientSettings>
  
                </telerik:RadGrid>
//User Control uclFleet.ascx.cs file
  
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using Telerik.Web.UI;
using System.Text;
  
public partial class UserControls_uclFleet : System.Web.UI.UserControl
{
      
    protected void tlrkDgrFleet_NeedDataSource(object source,
         Telerik.Web.UI.GridNeedDataSourceEventArgs e)
    {
        DataTable dt = new DataTable();
        dt.Columns.Add("A");
        dt.Columns.Add("B");     
        dt.Columns.Add("C");
        dt.Columns.Add("D");
        dt.Columns.Add("E");
        dt.Columns.Add("F");
        dt.Columns.Add("G");
        dt.Columns.Add("H");
        dt.Columns.Add("I");
        dt.Columns.Add("J");
        dt.Columns.Add("K");
        dt.Columns.Add("L");
        dt.Columns.Add("M");
        dt.Columns.Add("N");
        for (int i = 0; i < 10; i++)
        {
            DataRow dr;
            dr = dt.NewRow();
            dr["A"] = "1234";
            dr["B"] = "ABCD - hjkl";
            dr["C"] = "123-90";
            dr["D"] = "13434";
            dr["E"] = "1545";
            dr["F"] = "1656";
            dr["G"] = "1453";
            dr["H"] = "15435";
            dr["I"] = "5341";
            dr["J"] = "1345";
            dr["K"] = "135";
            dr["L"] = "135";
            dr["M"] = "1345";
            dr["N"] = "11/07/2010";
  
            dt.Rows.Add(dr);
            DataRow dr1;
            dr1 = dt.NewRow();
            dr1["A"] = "1234";
            dr1["B"] = "AWER - POUT";
            dr1["C"] = "123-90";
            dr1["D"] = "13434";
            dr1["E"] = "1545";
            dr1["F"] = "1656";
            dr1["G"] = "ASD";
            dr1["H"] = "15435";
            dr1["I"] = "DSFSF";
            dr1["J"] = "1345";
            dr1["K"] = "135";
            dr1["L"] = "EWEWR";
            dr1["M"] = "1345";
            dr1["N"] = "11/07/2010";
  
            dt.Rows.Add(dr1);
        }
        tlrkDgrFleet.DataSource = dt;
    }
  
    protected void tlrkDgrFleet_OnItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
    {
         
    }
}
<!-- Test_Fleet.aspx-->
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Test_Fleet.aspx.cs" Inherits="Test_Fleet" %>
<%@ Register Src="~/UserControls/uclFleet.ascx" TagName="uclFleet" TagPrefix="uc2" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head runat="server">
  
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    
<table style="table-layout:fixed" width="100%"><tr><td>
    <uc2:uclFleet ID="uclFleet" runat="server" />  </td></tr>
   </table>
   
     
    </form>
</body>
</html>
Hi,

1) I want a header in which there will be one main heading and under it there can be sub headings, the main header will span across its multiple sub headings, user can sort the grid by clicking on the sub headings. Please refer to the "UI.jpg"

2) The requirement is like i will be needing the Radgrid as usercontrol, which we will bind on Page. when we run the page, the screen looks fine except for the Merged Columns where in we need the headings and the Subheadeing, refer "Screenshot1.JPG"

The second issue which we I am facing is, The rad grd will have horizontal scroll and first 3 columns would be frozed.
But when we try to freeze the columns we face the following issues:

a) When we scroll, the complete alignment of the grid gets messed up, and one Grid line remains there and shows up in the middle of all scrolling columns. Refer "Screenshot2.JPG" .

b) After we scroll, the horizontal scroll itself disappears. Refer "Screenshot3.JPG" .

c) If we change the page size in pagination, the pagination also disappears. Refer "Screenshot4.JPG" .


Please refer to the code as well, We have created a user control "uclFleet.ascx" which we register in our page "Test_Fleet.aspx".

Thanks.





Pavlina
Telerik team
 answered on 25 May 2011
1 answer
42 views
Hi, i'm trying to use the ItemCommand to insert records in a Radgrid but when I press Add Record the grid disapears.

Is there a property that i I'm missing to set it correctly?
Pavlina
Telerik team
 answered on 25 May 2011
2 answers
232 views
I am using a combo to perform a "contains" search on titles of publications.

There are cases where I do not want to have the user select a single publication.

I would like to just accept what they type in for a partial match, and then have a button that sets a SQL select to match all titles in the current combo entry.

I tested by entering three characters, but on the code-behind I don't know how to retrieve what was entered, as there is nothing "selected".

How do I grab that entry, preferably without any complicated client-side coding.
..............
The combo is bound to a SQL datasource and has automatic load on demand enabled.

Per the online help pages, I think "the control cannot be validated by value out of the box..." is relevant, but I cannot quite understand the client logic, as it pertains to getting beyond "out of the box..." on the server.

RadComboBox can be easily validated against the Text of its items. This is by design. 
  
The control cannot be validated by value out of the box. The combobox is a composite control, its input area being essentially a <input type"text" ...> DOM element. The .value property of this DOM element corresponds to the actual text being written inside the textbox. This is 
Tomica
Top achievements
Rank 2
 answered on 25 May 2011
1 answer
185 views
Hi,
  i have build the menu using panel item. i have to hide the Expand/Collpse button of panel item,
 please find the attachment for image.

Thanks,
Nagarajan

Helen
Telerik team
 answered on 25 May 2011
6 answers
123 views
Hi all,

We have just started using the Telerik controls and I have a quick question on how to set the minHeight on the RadMultiPage control. I have it linked to my tab strip and as the user navigates from tab to tab, it load a new page (using the ContentUrl) into the corresponding RadPageView. I would like to set the minHeight of the RadMultiPage control to a given value, but I can't seem to figure out how to do this. Does anyone have any ideas how this could be accomplished?

Thanks,
J. E.
Helen
Telerik team
 answered on 25 May 2011
1 answer
126 views
Hi,

I have the async upload working in grids, with saving to disk, sql or Azure. Everything works great.

 When I upload to Azure though, it seems the progress bar is for the progress of the temp file going to server, then it takes the same amount of time with the blinking yellow light, to complete the upload to Azure.

Is this normal? Or can I bypass the temp file going to the web server and go straight to Azure ?

Thanks
Eric

<telerik:RadAsyncUpload  runat="server" ID="RadAsyncUpload1"  
                       OnClientFilesUploaded="filesUploaded" HttpHandlerUrl="~/AzureHandler.ashx"
         MultipleFileSelection="Automatic" Width="300px">
             
   </telerik:RadAsyncUpload>
public class AzureHandler : AsyncUploadHandler, System.Web.SessionState.IRequiresSessionState
   {
       protected override IAsyncUploadResult Process(UploadedFile file, HttpContext context, IAsyncUploadConfiguration configuration, string tempFileName)
       {
          SampleAsyncUploadResult result = CreateDefaultUploadResult<SampleAsyncUploadResult>(file);
          SampleAsyncUploadConfiguration sampleConfiguration = configuration as SampleAsyncUploadConfiguration;
           string container = null;
           if (sampleConfiguration != null)
           {
               container = sampleConfiguration.ContainerName;
               result.ImageID = InsertImage(file, container, sampleConfiguration.MetaTags);
           }
           // Populate any additional fields into the upload result.
           // The upload result is available both on the client and on the server
             
           return result;
       }
       public int InsertImage(UploadedFile file, string containerName, string metaTags)
       {
           AzureAcess.UploadToCloud(containerName, file, metaTags);
           return 0;
       }
   }
Peter Filipov
Telerik team
 answered on 25 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?