Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
206 views
Hi

It is possible to add custom querystrings to Telerik.Web.UI.DialogHandler.aspx

Example

Page with the RadEditor :
MyPage.aspx?MODE=Update&PageGUID=%7b43C05F0F-F82A-4AE4-AF06-01CF306604F6%7d

when a dialog opens the querystring need to be appended to the ex LinkManager

../Telerik.Web.UI.DialogHandler.aspx?DialogName=LinkManager&Skin=Default&Title=Hyperlink%20Manager&doid=..&MODE=Update&PageGUID=%7b43C05F0F-F82A-4AE4-AF06-01CF306604F6%7d

In the LinkManager i have placed a custom button, which need these parameters

/Erik K
Rumen
Telerik team
 answered on 27 May 2010
1 answer
44 views
Hi,

I am updating some older projects that used the 2007 Radcontrols for .Net where we had developed a custom skin.
I am now attempting to move these settings into the new skin files. I have started with the Grid - which as it's one of the most complicated probably wasn't a good idea, but at least if I can sort this one the rest should be easy!

So I used your online tool to generate me a set of skin files for all the controls based on the Office2007 skin.

I am now trying to replicate the settings from our original custom skin into this, but many of the CSS classes don't seem to exist in the new skins, and I'm getting a bit lost.
Now I'm no novice with CSS, but if someone could point me in the right direction with how to translate these to the new format I would appreciate it.

My original custom skin for the Grid is below.

Thankyou.

Paul

/* r.a.d.grid XLogixBlue skin */ 
 
div.RadGrid_XLogixBlue 
    bordersolid 1px #01055f
    fontnormal 11px ArialVerdanaSans-serif
    text-alignleft
    cursordefault
    backgroundwhite
 
.RadGrid_XLogixBlue div 
  margin-right: 0 !important ; 
 
.RadGrid_XLogixBlue a 
{  
    color#000000
 
.MasterTable_XLogixBlue 
    border-collapseseparate !important; 
    width: 100%; 
    color#27413e
    fontnormal 11px arial
 
 
.MasterTable_XLogixBlue td, 
.MasterTable_XLogixBlue th 
    padding-left2px
    padding-right4px
 
 
th.GridHeader_XLogixBlue, 
th.ResizeHeader_XLogixBlue 
    fontbold 12px ArialVerdanaSans-serif
    background#9ebeec url('Img/GridHeaderBg.gif'repeat-x; 
    padding-left2px/*more than items to compensate for item borders!*/ 
    padding-right4px/*more than items to compensate for item borders!*/ 
    height19px
    color#01055f
    border-bottomsolid 1px #9eb6ce
    border-rightsolid 1px #9eb6ce
 
.GridHeader_XLogixBlue a 
    color#01055f
    fontbold 12px  ArialVerdanaSans-serif
    text-decorationnone
 
    padding-left2px/*more than items to compensate for item borders!*/ 
    padding-right4px/*more than items to compensate for item borders!*/ 
 
.GridRow_XLogixBlue td 
    backgroundtransparent
    line-height19px
    border-bottom1px solid #d0d7e5
    border-right1px solid #d0d7e5
 
.GridAltRow_XLogixBlue td 
    background-color#e1edff
    line-height19px
    border-bottom1px solid #d0d7e5
    border-right1px solid #d0d7e5
 
.SelectedRow_XLogixBlue td, 
.ActiveRow_XLogixBlue td 
    background#f1c15f url('Img/gridSelectedRowBg.gif'repeat-x !important; 
    line-height19px
    border-bottom1px solid #f29536
    border-right1px solid #f29536
    color#000000
 
.GridPager_XLogixBlue td 
    background#9ab5db url('Img/GriPagerBg.gif'repeat-x; 
    height15px
    colorwhite
 
.GridFooter_XLogixBlue td 
    background#fbfbfb
    bordersolid 1px #fbfbfb
    border-top1px solid #637783
    height19px
    color#666
 
.GridFooter_XLogixBlue td a 
    color#666
 
.GridPager_XLogixBlue td a 
    colorwhite
 
.GridPager_XLogixBlue td a:hover, 
.GridFooter_XLogixBlue td a:hover 
    colorblack
 
 
tr.GroupHeader_XLogixBlue td 
    background#e4ecf7
    height22px
 
.GroupPanel_XLogixBlue 
    background#9ebde5 url('Img/GridGroupPanelBg.gif'repeat-x; 
    width: 100%; 
    height23px
    border-bottomsolid 1px #688caf
    border-collapsecollapse
 
.GroupPanelItems_XLogixBlue 
    backgroundwhite
    colorblack
    bordersolid 1px #325373
    whitewhite-space:  nowrap
    padding-left4px
    font-size11px
    height19px
 
td.GridHeader_XLogixBlue input 
    widthauto
    floatleft
    bordersolid 1px #3b5a82
    background#fafafa
    fontbold 11px ArialVerdanaSans-serif
    color#989cb0
    height19px
    vertical-align:middle
 
 

Dimo
Telerik team
 answered on 27 May 2010
1 answer
85 views
I have a very basic RadGrid implemented with 1 master table and 1 detail table connected via a <ParentTableRelation>. I have the grid set to HierarchyLoadMode="Client" and the load time on the page is somewhere in the neighborhood of 1 minute plus.

Am I doing something wrong? 500+ rows doesn't seem like a ton to me for a grid to handle. Are there settings I can alter to make this work?

Paging won't work for my situation either.
Dimo
Telerik team
 answered on 27 May 2010
1 answer
85 views
Hello Team,

Is there any option like agenda view in radscheduler.( asp.net version )
i want to show the events and events with recurrence rule events based on the dates.

ex: 

event                 startdate                     enddate                   descriptin 
05/23/2010
--------------         --------------                      ------------------         ----------------

05/24/2010
--------------         --------------                      ------------------         ----------------

05/26/2010 
--------------          --------------                     ------------------         ----------------
Peter
Telerik team
 answered on 27 May 2010
6 answers
209 views
Hello, guys.
I have menu item with template. There are several controls. Among them button.
How do I make this button to close menu item it's in and then process what is aasigned to it's server OnClick part?
Now what I experience is menu item stays on util I move mouse out of the content of the template.

With respect, Sergey.
Sergey Sugak
Top achievements
Rank 1
 answered on 27 May 2010
2 answers
127 views
i am reciving an error while creating connection
protected override DbConnection MySqlConnection()
    {
        base.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionStringApp"].ToString();
        DbConnection conn =  base.DbFactory.CreateConnection();
        conn.ConnectionString = ConnectionString;
        return conn;
    }
Peter
Telerik team
 answered on 27 May 2010
1 answer
184 views
Hi;
When i put a listbox in to insertitemtemplate of listview the listbox doesn't render correctly. What i must check?
Here is the code :
ASPX Page:
            <telerik:RadListView ID="lViewOzur" runat="server" OnItemCommand="lViewOzur_ItemCommand"
                DataKeyNames="KAYITNO" OnItemDataBound="lViewOzur_ItemDataBound" OnItemCreated="lViewOzur_ItemCreated"
                ItemPlaceholderID="OzurContainer" OnNeedDataSource="lViewOzur_NeedDataSource">
                <InsertItemTemplate>
                    <table>
                        <tr>
                            <td><asp:Label ID="lblHastane" runat="server" AssociatedControlID="txtHastane" Text="Hastane Adı"></asp:Label></td>
                            <td colspan="4">
                                <telerik:RadTextBox ID="txtHastane" runat="server" EmptyMessage="Lütfen Özürlülük Belgesini Aldığınız Hastane Adını Giriniz"
                                    Width="400px" />
                            </td></tr>
                        <tr><td><asp:Label ID="lblRapor" runat="server" AssociatedControlID="dtRapor" Text="Rapor Tarihi"></asp:Label></td>
                            <td style="width: 200px">
                                <telerik:RadDatePicker ID="dtRapor" runat="server"></telerik:RadDatePicker></td>
                            <td><asp:Label ID="lblGrubu" runat="server" AssociatedControlID="cmbGrubu" Text="Özür Grubu"></asp:Label></td>
                            <td><telerik:RadComboBox ID="cmbGrubu" runat="server" EmptyMessage="Özür Grubunuzu Seçiniz">
                                </telerik:RadComboBox>
                            </td></tr>
                        <tr><td><asp:Label ID="lblRaporNo" runat="server" Text="Rapor No" AssociatedControlID="txtRaporNo"></asp:Label></td>
                            <td>
                                <telerik:RadTextBox ID="txtRaporNo" runat="server" EmptyMessage="Rapor Numaranızı Giriniz"
                                    Width="150px">
                                </telerik:RadTextBox>
                            </td>
                            <td><asp:Label ID="lblOran" runat="server" Text="Özür Oranı" AssociatedControlID="txtOran"></asp:Label></td>
                            <td>
                                <telerik:RadNumericTextBox ID="txtOran" runat="server" DataType="System.Decimal"
                                    MaxValue="100" MinValue="0" Type="Percent" Width="60px">
                                    <NumberFormat KeepNotRoundedValue="True" />
                                </telerik:RadNumericTextBox>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3"><asp:CheckBox ID="chkGecici" runat="server" Text="Geçici Özür" /></td>
                            <td><asp:Label ID="lblGecici" runat="server" AssociatedControlID="dtGecici" Text="Özürlülük BitiÅŸ Tarihi"></asp:Label></td>
                            <td><telerik:RadDatePicker ID="dtGecici" runat="server">
                                </telerik:RadDatePicker></td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="lblKisit" runat="server" Text="Çalışma Kısıtı"></asp:Label>
                            </td>
                            <td>
                                <telerik:RadListBox ID="lstKisitDB" runat="server" AllowTransfer="true" AllowTransferOnDoubleClick="true"
                                    EnableDragAndDrop="true" TransferMode="Move" TransferToID="lstKisit" Width="300px"
                                    Height="100px" ButtonSettings-ShowTransfer="true" ButtonSettings-TransferButtons="All"
                                    Skin="WebBlue">
                                </telerik:RadListBox>
                                <telerik:RadListBox ID="lstKisit" runat="server" Width="300px" Height="100px">
                                </telerik:RadListBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <telerik:RadToolBar ID="tbOzurInsert" runat="server" Orientation="horizontal" Height="15px"
                                    OnButtonClick="tbOzurInsert_ButtonClick">
                                    <Items>
                                        <telerik:RadToolBarButton Text="Kaydet" Value="PerformInsert" Height="15px">
                                        </telerik:RadToolBarButton>
                                        <telerik:RadToolBarButton Text="Vazgeç" Value="Delete" Height="15px">
                                        </telerik:RadToolBarButton>
                                    </Items>
                                </telerik:RadToolBar>
                            </td>
                        </tr>
                    </table>
                </InsertItemTemplate>
                <ItemTemplate>
                    <table>
                        <tr>
                            <td style="width: 150px">
                                <asp:Label ID="lblEgitim" runat="server"></asp:Label>
                            </td>
                            <td>
                                <telerik:RadToolBar ID="tbOzurEdit" runat="server" Orientation="horizontal" Height="15px">
                                    <Items>
                                        <telerik:RadToolBarButton Text="Sil" CommandName="Delete" Height="15px">
                                        </telerik:RadToolBarButton>
                                    </Items>
                                </telerik:RadToolBar>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </telerik:RadListView>



CS code :

    protected void Page_Load(object sender, EventArgs e)
    {
    }
    protected void lViewOzur_ItemCommand(object sender, RadListViewCommandEventArgs e)
    {
    }
    protected void lViewOzur_ItemDataBound(object sender, Telerik.Web.UI.RadListViewItemEventArgs e)
    {
    }
    protected void lViewOzur_ItemCreated(object sender, RadListViewItemEventArgs e)
    {
        RadListBox lst = (RadListBox)e.Item.FindControl("lstKisitDB");
        RadComboBox cmb = (RadComboBox)e.Item.FindControl("cmbGrubu");
        if (cmb != null)
        {
            fillOzurGrupList(cmb);
        }
        if (lst != null)
            fillOzurKisitList(lst);
    }
    protected void lViewOzur_NeedDataSource(object sender, RadListViewNeedDataSourceEventArgs e)
    {
        RadProfile rp = new RadProfile();
        if (vwProfilData == null)
            vwProfilData = rp.ReadProfil(vwProfilData);
        lViewOzur.DataSource = vwProfilData.OzurBilgiBE;
    }
Alper Ozgur
Top achievements
Rank 1
 answered on 27 May 2010
1 answer
89 views
There is one project which is still using RadMenu (Q3 2007 version)  to display the ContextMenu on a grid. One of the items in the context menu is disabled and I want to change its style because the default display is to show the text greyed out.

I want to show the disabled RadMenuItem in the context menu with text color "BLUE" in ITALICS with BOLD and LARGER font. Can I do this and how? I would appreciate any help on this ASAP.

Thanks,
Chip
Top achievements
Rank 1
 answered on 27 May 2010
1 answer
99 views
I have a number of nested detail tables. All of the levels of nesting show data except the deepest level. I verified the DataReader being used contains the correct data, it simply doesn't show up.

using System;  
using System.Collections.Generic;  
using System.Linq;  
using System.Web;  
using System.Web.UI;  
using System.Web.UI.WebControls;  
using System.Data;  
using System.Data.Odbc;  
using Telerik.Web.UI;  
 
namespace preTOPS  
{  
    public partial class Home : System.Web.UI.Page  
    {  
        OdbcConnection connection;  
        User u = null;  
 
        protected override void OnInit(EventArgs e)  
        {  
            base.OnInit(e);  
 
            connection = Master.connection;  
 
            try 
            {  
                if (Session["user"] == null)  
                {  
                    u = new User();  
                    u.emailAddress = "foo@bar.com";  
 
                    //throw new Exception("@You must be logged in to view this page. Please <a href='Default.aspx' style='color:White; text-decoration:underline;'>login</a>.");  
                }  
                else 
                {  
                    u = (User)Session["user"];  
                }  
 
                DefineGridStructure();  
            }  
            catch (Exception ex)  
            {  
                MyUtilities.DoError(Master.maindiv, Master.errordiv, Master.lblError, ex, connection, null, Master.GetUserName());  
            }  
        }  
 
        protected void Page_Load(object sender, EventArgs e)  
        {  
            if (!Master.maindiv.Visible)  
                return;  
 
            RadGrid grid = (RadGrid)PlaceHolder1.FindControl("grid1");  
            RadAjaxManager1.AjaxSettings.AddAjaxSetting(grid, grid);  
 
        }  
 
        private void DefineGridStructure()  
        {  
            RadGrid grid = new RadGrid();  
            grid.ID = "grid1";  
 
            grid.CssClass = "maindiv";  
            grid.Width = Unit.Percentage(100);  
            grid.PageSize = 10;  
            grid.AllowPaging = true;  
//          grid.AllowSorting = true;  
//          grid.AllowFilteringByColumn = true;  
            grid.AllowAutomaticDeletes = true;  
            grid.AllowAutomaticInserts = true;  
            grid.AllowAutomaticUpdates = true;  
            grid.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric;  
            grid.AutoGenerateColumns = false;  
//          grid.GroupingEnabled = true;  
//          grid.ShowGroupPanel = true;  
//          grid.ShowStatusBar = true;  
//          grid.ClientSettings.AllowDragToGroup = true;  
            grid.NeedDataSource += new GridNeedDataSourceEventHandler(grid_NeedIndications);  
            grid.ItemCommand += new GridCommandEventHandler(grid_ItemCommand);  
            grid.ItemUpdated += new GridUpdatedEventHandler(grid_ItemUpdated);  
//          grid.MasterTableView.AllowFilteringByColumn = true;  
            grid.MasterTableView.PageSize = 15;  
            grid.MasterTableView.DataKeyNames = new string[] { "indication" };  
            grid.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top;  
 
            GridEditCommandColumn e = new GridEditCommandColumn();  
            e.UniqueName = "IndicationEditButton";  
            e.ButtonType = GridButtonColumnType.ImageButton;  
            e.HeaderStyle.Width = Unit.Pixel(20);  
            grid.MasterTableView.Columns.Add(e);  
 
            GridBoundColumn c = new GridBoundColumn();  
            c.DataField = "indication";  
            c.HeaderText = "Indication";  
//          c.SortExpression = "indication";  
//          c.UniqueName = "indication";  
//          c.AllowSorting = true;  
//          c.AllowFiltering = true;  
//          c.DataType = System.Type.GetType("System.String");  
            grid.MasterTableView.Columns.Add(c);  
 
            GridButtonColumn b = new GridButtonColumn();  
            b.ConfirmText = "Confirm deletion of indication?";  
            b.ButtonType = GridButtonColumnType.ImageButton;  
            b.CommandName = "Delete";  
            b.CommandArgument = "indication";  
            b.UniqueName = "IndicationDeleteButton";  
            b.HeaderStyle.Width = Unit.Pixel(20);  
            b.Text = "Delete";  
            grid.MasterTableView.Columns.Add(b);  
 
//          grid.MasterTableView.GroupByExpressions.Add(new GridGroupByExpression("Indication Group By Indication"));  
 
 
            // PROTOCOLS  
 
            GridTableView tvProtocols = new GridTableView(grid);  
//          tvProtocols.AllowFilteringByColumn = true;  
            tvProtocols.Name = "Protocols";  
            tvProtocols.Width = Unit.Percentage(100);  
            tvProtocols.DataKeyNames = new string[] { "protocol" };  
            tvProtocols.CommandItemDisplay = GridCommandItemDisplay.Top;  
            //tvProtocols.AllowFilteringByColumn = true;  
//          tvProtocols.AllowSorting = true;  
//          tvProtocols.AllowMultiColumnSorting = true;  
//          tvProtocols.AllowPaging = true;  
            tvProtocols.AllowAutomaticDeletes = true;  
            tvProtocols.AllowAutomaticInserts = true;  
            tvProtocols.AllowAutomaticUpdates = true;  
 
            e = new GridEditCommandColumn();  
            e.UniqueName = "ProtocolEditButton";  
            e.ButtonType = GridButtonColumnType.ImageButton;  
            e.HeaderStyle.Width = Unit.Pixel(20);  
            tvProtocols.Columns.Add(e);  
 
            c = new GridBoundColumn();  
            c.DataField = "protocol";  
            c.HeaderText = "Protocol";  
//          c.SortExpression = "protocol";  
//          c.UniqueName = "protocol";  
//          c.AllowSorting = true;  
//          c.AllowFiltering = true;  
//          c.DataType = System.Type.GetType("System.String");  
            tvProtocols.Columns.Add(c);  
 
            c = new GridBoundColumn();  
            c.DataField = "sponsor";  
            c.HeaderText = "Sponsor";  
//          c.UniqueName = "sponsor";  
//          c.SortExpression = "sponsor";  
//          c.AllowSorting = true;  
//          c.AllowFiltering = true;  
//          c.DataType = System.Type.GetType("System.String");  
            tvProtocols.Columns.Add(c);  
 
            c = new GridBoundColumn();  
            c.DataField = "shorttitle";  
            c.HeaderText = "Short Title";  
//          c.AllowSorting = true;  
//          c.AllowFiltering = true;  
//          c.DataType = System.Type.GetType("System.String");  
            tvProtocols.Columns.Add(c);  
 
            c = new GridBoundColumn();  
            c.DataField = "cro";  
            c.HeaderText = "CRO";  
//          c.AllowSorting = true;  
//          c.AllowFiltering = true;  
//          c.DataType = System.Type.GetType("System.String");  
            tvProtocols.Columns.Add(c);  
 
            b = new GridButtonColumn();  
            b.ConfirmText = "Confirm deletion of protocol?";  
            b.ButtonType = GridButtonColumnType.ImageButton;  
            b.CommandName = "Delete";  
            b.CommandArgument = "protocol";  
            b.UniqueName = "ProtocolDeleteButton";  
            b.HeaderStyle.Width = Unit.Pixel(20);  
            b.Text = "Delete";  
            tvProtocols.Columns.Add(b);  
 
            GridRelationFields rf = new GridRelationFields();  
            rf.MasterKeyField = "indication";  
            rf.DetailKeyField = "indication";  
            tvProtocols.ParentTableRelation.Add(rf);  
 
 
            // STUDIES  
 
            GridTableView tvStudies = new GridTableView(grid);  
//          tvStudies.AllowFilteringByColumn = true;  
            tvStudies.Name = "Studies";  
            tvStudies.Width = Unit.Percentage(100);  
            tvStudies.DataKeyNames = new string[] { "protocol""site""facility" };  
//          tvStudies.AllowSorting = true;  
//          tvStudies.AllowMultiColumnSorting = true;  
//          tvStudies.AllowPaging = true;  
            tvStudies.CommandItemDisplay = GridCommandItemDisplay.Top;  
            tvStudies.AllowAutomaticDeletes = true;  
            tvStudies.AllowAutomaticInserts = true;  
            tvStudies.AllowAutomaticUpdates = true;  
 
            e = new GridEditCommandColumn();  
            e.UniqueName = "StudyEditButton";  
            e.ButtonType = GridButtonColumnType.ImageButton;  
            e.HeaderStyle.Width = Unit.Pixel(20);  
            tvStudies.Columns.Add(e);  
 
            c = new GridBoundColumn();  
            c.DataField = "site";  
            c.HeaderText = "Site";  
//          c.AllowFiltering = true;  
//          c.AllowSorting = true;  
//          c.DataType = System.Type.GetType("System.String");  
            tvStudies.Columns.Add(c);  
 
            c = new GridBoundColumn();  
            c.DataField = "facility";  
            c.HeaderText = "Facilities";  
//          c.AllowFiltering = true;  
//          c.AllowSorting = true;  
//          c.DataType = System.Type.GetType("System.String");  
            tvStudies.Columns.Add(c);  
 
            c = new GridBoundColumn();  
            c.DataField = "pi";  
            c.HeaderText = "PI";  
//          c.AllowFiltering = true;  
//          c.AllowSorting = true;  
//          c.DataType = System.Type.GetType("System.String");  
            tvStudies.Columns.Add(c);  
 
            c = new GridBoundColumn();  
            c.DataField = "status";  
            c.HeaderText = "Status";  
//          c.AllowFiltering = true;  
//          c.AllowSorting = true;  
//          c.DataType = System.Type.GetType("System.String");  
            tvStudies.Columns.Add(c);  
 
            c = new GridBoundColumn();  
            c.DataField = "firstcontact";  
            c.HeaderText = "First Contact";  
//          c.AllowFiltering = true;  
//          c.AllowSorting = true;  
//          c.DataType = System.Type.GetType("System.DateTime");  
            c.DataFormatString = "{0:MM/dd/yyyy}";  
            tvStudies.Columns.Add(c);  
 
            c = new GridBoundColumn();  
            c.DataField = "cdareceived";  
            c.HeaderText = "CDA Received";  
//          c.AllowFiltering = true;  
//          c.AllowSorting = true;  
//          c.DataType = System.Type.GetType("System.DateTime");  
            c.DataFormatString = "{0:MM/dd/yyyy}";  
            tvStudies.Columns.Add(c);  
 
            c = new GridBoundColumn();  
            c.DataField = "sqv";  
            c.HeaderText = "SQV";  
//          c.AllowFiltering = true;  
//          c.AllowSorting = true;  
//          c.DataType = System.Type.GetType("System.DateTime");  
            c.DataFormatString = "{0:MM/dd/yyyy}";  
            tvStudies.Columns.Add(c);  
 
            c = new GridBoundColumn();  
            c.DataField = "irbsubmission";  
            c.HeaderText = "IRB Submission";  
//          c.AllowFiltering = true;  
//          c.AllowSorting = true;  
//          c.DataType = System.Type.GetType("System.DateTime");  
            c.DataFormatString = "{0:MM/dd/yyyy}";  
            tvStudies.Columns.Add(c);  
 
            c = new GridBoundColumn();  
            c.DataField = "irbapproval";  
            c.HeaderText = "IRB Approval";  
//          c.AllowFiltering = true;  
//          c.AllowSorting = true;  
//          c.DataType = System.Type.GetType("System.DateTime");  
            c.DataFormatString = "{0:MM/dd/yyyy}";  
            tvStudies.Columns.Add(c);  
 
            c = new GridBoundColumn();  
            c.DataField = "siv";  
            c.HeaderText = "SIV";  
//          c.AllowFiltering = true;  
//          c.AllowSorting = true;  
//          c.DataType = System.Type.GetType("System.DateTime");  
            c.DataFormatString = "{0:MM/dd/yyyy}";  
            tvStudies.Columns.Add(c);  
 
            c = new GridBoundColumn();  
            c.DataField = "firstpatientenrolled";  
            c.HeaderText = "1st P Enrolled";  
//          c.AllowFiltering = true;  
//          c.AllowSorting = true;  
//          c.DataType = System.Type.GetType("System.DateTime");  
            c.DataFormatString = "{0:MM/dd/yyyy}";  
            tvStudies.Columns.Add(c);  
 
            c = new GridBoundColumn();  
            c.DataField = "lastpatientenrolled";  
            c.HeaderText = "Last P Enrolled";  
//          c.AllowFiltering = true;  
//          c.AllowSorting = true;  
//          c.DataType = System.Type.GetType("System.DateTime");  
            c.DataFormatString = "{0:MM/dd/yyyy}";  
            tvStudies.Columns.Add(c);  
 
            b = new GridButtonColumn();  
            b.ConfirmText = "Confirm deletion of study?";  
            b.ButtonType = GridButtonColumnType.ImageButton;  
            b.CommandName = "Delete";  
            b.CommandArgument = "study";  
            b.UniqueName = "StudyDeleteButton";  
            b.HeaderStyle.Width = Unit.Pixel(20);  
            b.Text = "Delete";  
            tvStudies.Columns.Add(b);  
 
            rf = new GridRelationFields();  
            rf.MasterKeyField = "protocol";  
            rf.DetailKeyField = "protocol";  
            tvStudies.ParentTableRelation.Add(rf);  
 
            // Comments  
 
            GridTableView tvComments = new GridTableView(grid);  
//          tvComments.AllowFilteringByColumn = true;  
            tvComments.Name = "Comments";  
            tvComments.Width = Unit.Percentage(100);  
            tvComments.DataKeyNames = new string[] { "studyid""commentmodified" };  
//          tvComments.AllowSorting = true;  
//          tvComments.AllowMultiColumnSorting = true;  
//          tvComments.AllowPaging = true;  
            tvComments.CommandItemDisplay = GridCommandItemDisplay.Top;  
            tvComments.AllowAutomaticDeletes = true;  
            tvComments.AllowAutomaticInserts = true;  
            tvComments.AllowAutomaticUpdates = true;  
 
            e = new GridEditCommandColumn();  
            e.UniqueName = "CommentEditButton";  
            e.ButtonType = GridButtonColumnType.ImageButton;  
            e.HeaderStyle.Width = Unit.Pixel(20);  
            tvComments.Columns.Add(e);  
 
            c = new GridBoundColumn();  
            c.DataField = "commentmodified";  
            c.HeaderText = "Last Modifed";  
//          c.AllowFiltering = true;  
//          c.AllowSorting = true;  
//          c.DataType = System.Type.GetType("System.DateTime");  
            c.DataFormatString = "{0:MM/dd/yyyy}";  
            tvComments.Columns.Add(c);  
 
            c = new GridBoundColumn();  
            c.DataField = "author";  
            c.HeaderText = "Modified By";  
//          c.AllowFiltering = true;  
//          c.AllowSorting = true;  
//          c.DataType = System.Type.GetType("System.String");  
            tvComments.Columns.Add(c);  
 
            c = new GridBoundColumn();  
            c.DataField = "comment";  
            c.HeaderText = "Comment";  
//          c.AllowFiltering = true;  
//          c.AllowSorting = true;  
//          c.DataType = System.Type.GetType("System.String");  
            tvComments.Columns.Add(c);  
 
            b = new GridButtonColumn();  
            b.ConfirmText = "Confirm deletion of comment?";  
            b.ButtonType = GridButtonColumnType.ImageButton;  
            b.CommandName = "Delete";  
            b.CommandArgument = "comment";  
            b.UniqueName = "CommentDeleteButton";  
            b.HeaderStyle.Width = Unit.Pixel(20);  
            b.Text = "Delete";  
            tvComments.Columns.Add(b);  
 
            rf = new GridRelationFields();  
            rf.MasterKeyField = "studyid";  
            rf.DetailKeyField = "studyid";  
            tvComments.ParentTableRelation.Add(rf);  
 
            tvStudies.DetailTables.Add(tvComments);  
            tvProtocols.DetailTables.Add(tvStudies);  
            grid.MasterTableView.DetailTables.Add(tvProtocols);  
 
            PlaceHolder1.Controls.Add(grid);  
        }  
 
        void grid_ItemUpdated(object source, GridUpdatedEventArgs e)  
        {  
        }  
 
        void grid_ItemCommand(object source, GridCommandEventArgs e)  
        {  
            if (e.CommandName == "Update")  
            {  
                if (e.Item is GridEditFormItem)  
                {  
                    GridEditFormItem gefi = (GridEditFormItem)e.Item;  
                }  
            }  
            else if (e.CommandName == "Insert")  
            {  
            }  
            else if (e.CommandName == "Delete")  
            {  
            }  
        }  
 
        void grid_NeedIndications(object source, GridNeedDataSourceEventArgs e)  
        {  
            OdbcCommand command1 = new OdbcCommand("select indication from indications order by indication asc;", connection);  
            OdbcDataReader reader1 = command1.ExecuteReader();  
            RadGrid grid = (RadGrid)PlaceHolder1.FindControl("grid1");  
            grid.DataSource = reader1;  
 
            OdbcCommand command2 = new OdbcCommand("select * from protocols;", connection);  
            OdbcDataReader reader2 = command2.ExecuteReader();  
            grid.MasterTableView.DetailTables[0].DataSource = reader2;  
 
            OdbcCommand command3 = new OdbcCommand("select * from studies;", connection);  
            OdbcDataReader reader3 = command3.ExecuteReader();  
            grid.MasterTableView.DetailTables[0].DetailTables[0].DataSource = reader3;  
 
            OdbcCommand command4 = new OdbcCommand("select * from comments;", connection);  
            OdbcDataReader reader4 = command4.ExecuteReader();  
            grid.MasterTableView.DetailTables[0].DetailTables[0].DetailTables[0].DataSource = reader4;  
        }  
 
    }  
}  
 

Thank you.
Pavlina
Telerik team
 answered on 27 May 2010
1 answer
39 views
Dear Support,
I'm using ASP.net RadControls Q1 2009 and i tried to use Retain group footer but this property is not available in groupsettings node.
Are there any HotFix for that ? or i should buy the latest version of RadControls???????
Iana Tsolova
Telerik team
 answered on 27 May 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?