GridDateTimeColumn

2 posts, 0 answers
  1. Webster Velasco
    Webster Velasco avatar
    114 posts
    Member since:
    Jun 2012

    Posted 07 Jun 2010 Link to this post

    hi

    how can i generate an automatic date picker on my addnewrecord command in datagrid?

    because when i tried this message appears at GridDateTimeColumn : "Telerik.Web.UI.GridInsertionObject"

    thanks

    regards
    webster
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 08 Jun 2010 Link to this post

    Hello,

    I guess you want to show GridDateTimeColumn in insert mode only. If so, a better option would be hiding the column initially (by setting the Visible property to "false") and showing it when grid in inert mode.

    cs:
     
        protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)  
        {  
            if (e.CommandName == RadGrid.InitInsertCommandName) 
            { 
                GridDateTimeColumn col = (GridDateTimeColumn)RadGrid1.MasterTableView.GetColumn("ColumnUniqueName"); 
                col.Visible = true
            } 
            else 
            { 
                GridDateTimeColumn col = (GridDateTimeColumn)RadGrid1.MasterTableView.GetColumn("ColumnUniqueName"); 
                col.Visible = false
            }     
        }  


    -Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top