This is a migrated thread and some comments may be shown as answers.

GridDateTimeColumn

1 Answer 28 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Webster Velasco
Top achievements
Rank 2
Webster Velasco asked on 07 Jun 2010, 03:55 PM
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

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 08 Jun 2010, 07:05 AM
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.
Tags
Grid
Asked by
Webster Velasco
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 1
Share this question
or