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

FastNavigationStep not setting in GridDateTimeColumn

4 Answers 64 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Barry
Top achievements
Rank 1
Barry asked on 26 Oct 2010, 04:57 PM
I have a RadGrid with a GridDateTimeColumn.  In the RadGrid1_ItemDataBound event handler, I am configuring the DatePicker.ShareCalendar.  The markup for the grid and the event handler are shown at the end of the post.

Note that I am setting the datepicker.SharedCalendar.FastNavigationStep = 12, so that the FastNavigation should jump by 12 months.

However, it still jumps by the default 3 months.  The FastNavigationStep property update is not taking.  Incidentally, the FastNavigationPreviousToolTip and FastNavigationNextToolTip are not taking either.

Any help would be appreciated.

Code:

         <telerik:RadGrid ID="grdFamily" runat="server" DataSourceID="ldsUserFamilyMembers" Skin="Vista"    Width="500px"
                 AutoGenerateColumns="false" AllowAutomaticDeletes="true" AllowAutomaticInserts="true" AllowAutomaticUpdates="true"
                    GridLines="None" PageSize="5" OnItemDataBound="RadGrid1_ItemDataBound"
                    AllowPaging="True"  >
                   
                    <MasterTableView DataKeyNames="pk_user_family_member"  TableLayout="Fixed" CommandItemDisplay="Top"  DataSourceID="ldsUserFamilyMembers" Width="500px">
                        <Columns>
                        ...
                        <telerik:GridDateTimeColumn  DataField="birth_date" PickerType="DatePicker" DataFormatString="{0:MMM dd, yyyy}" HeaderText="Birth Day" >
                            </telerik:GridDateTimeColumn>
                       ...

                        </Columns>
                        <EditFormSettings>
                            <EditColumn ButtonType="ImageButton" />
                        </EditFormSettings>
                    </MasterTableView>
                </telerik:RadGrid>

 protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridDataItem && e.Item.IsInEditMode)
            {
                GridEditableItem item = (GridEditableItem)e.Item;
                RadDatePicker datepicker = (RadDatePicker)item["DateTimeColumn"].Controls[0];
                datepicker.SharedCalendar.FastNavigationStep = 12; 
                datepicker.SharedCalendar.FastNavigationNextToolTip = "Next Month";
                datepicker.SharedCalendar.FastNavigationPrevToolTip = "Previous Month";
            }
        }

4 Answers, 1 is accepted

Sort by
0
Pavel
Telerik team
answered on 27 Oct 2010, 08:05 AM
Hi Barry,

Try modifying your code like this:
void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridEditableItem && e.Item.IsInEditMode)
    {
        GridEditableItem item = (GridEditableItem)e.Item;
        RadDatePicker datepicker = (RadDatePicker)item["DateTimeColumn"].Controls[0];
        datepicker.SharedCalendar.FastNavigationStep = 12;
        datepicker.SharedCalendar.FastNavigationNextToolTip = "Next Month";
        datepicker.SharedCalendar.FastNavigationPrevToolTip = "Previous Month";
    }
}


Regards,
Pavel
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Barry
Top achievements
Rank 1
answered on 27 Oct 2010, 02:10 PM
That had no effect.  I am not sure why you thought it would, but I tried it to no avail.  Any other ideas?  I could publish a test page showing the problem if that would help.
0
Pavel
Telerik team
answered on 27 Oct 2010, 03:31 PM
Hello Barry,

I am attaching a test page in which the suggested approach works. Try ti out and let me know what differs in your actual grid.

All the best,
Pavel
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Barry
Top achievements
Rank 1
answered on 27 Oct 2010, 11:23 PM
Thanks for your help.  Your snippet worked fine.  I don't have time right now to figure out why.
Tags
Calendar
Asked by
Barry
Top achievements
Rank 1
Answers by
Pavel
Telerik team
Barry
Top achievements
Rank 1
Share this question
or