Overflowing one grid column

4 posts, 0 answers
  1. Alexandru
    Alexandru avatar
    5 posts
    Member since:
    Jun 2015

    Posted 29 Jun 2015 Link to this post

    I have a RadGrid in my .aspx file. The second to last column is GridDateTimeColumn:<telerik:GridDateTimeColumn DataField="IssueDate" HeaderText="ValidFrom"
    HeaderStyle-Wrap="true" DataFormatString="{0:dd.MM.yyyy}"
    meta:resourcekey="ValidFromResource" PickerType="DatePicker" Resizable="true">
    <HeaderStyle Width="80px" />
    </telerik:GridDateTimeColumn>
    and the last column is a GridButtonColumn. In Edit mode (InPlace), the GridDateTimeColumn becomes a RadDatePicker. However, it can't fit in the 80px of the column (only a part of the textbox is visible, and the calendar not at all). I want the RadTimePicker to overflow over the GridButtonColumn Column (which doesn't appear in edit mode). I want to do that either in the .aspx file (if possible) or in the radGrid_ItemDataBound event.Any idea is appreciated. Thank you :)
  2. Pavlina
    Admin
    Pavlina avatar
    6187 posts

    Posted 02 Jul 2015 Link to this post

    Hello,

    Could you elaborate what exactly you mean by - I want the RadTimePicker to overflow over the GridButtonColumn Column (which doesn't appear in edit mode). If you  send us screenshot of the desired result we will be able to suggest a solution. Regarding the fact that GridDateTimeColumn cannot fit in the available space in edit mode you can find the datepicker control on ItemDataBound server side event of the grid and change its width to the desired value. More information for accessing controls is available here:
    http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/rows/accessing-cells-and-rows

    Regards,
    Pavlina
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  3. Alexandru
    Alexandru avatar
    5 posts
    Member since:
    Jun 2015

    Posted 02 Jul 2015 in reply to Pavlina Link to this post

    I attached a picture. You can see that the RadDatePicker control is not visible entirely (the Calendar can not be seen). I could set a greater width for the GridDateColumn to fit the DateInput and the Calendar, but I want the Calendar to be exactly above the Delete Button.
  4. Pavlina
    Admin
    Pavlina avatar
    6187 posts

    Posted 03 Jul 2015 Link to this post

    Hi,

    Did you try setting smaller width to the picker control similar to the way shown below and let me know if this helps?

    Protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)   
        {  
            if (e.Item is GridEditableItem && e.Item.IsInEditMode)   
            {   
                GridEditableItem edititem = (GridEditableItem)e.Item;             
                RadDatePicker datePicker = (RadDatePicker)edititem["IssueDate"].Controls[0];   
                datePicker.Width = Unit.Pixel(50);   
            }   
        }

    Regards,
    Pavlina
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
Back to Top