Help with GridDateTimeColumn

7 posts, 2 answers
  1. MARIANO
    MARIANO  avatar
    10 posts
    Member since:
    Feb 2013

    Posted 23 Oct 2013 Link to this post

    Hello everyone,

    I will try to explain what i need to do.

    I'm using one GridDateTimeColumn inside of him i've the property PickerType="DatePicker".

    It's all working fine, but i need to use a custom text. The DatePicker pop-up text is Open the calendar popup, but i need to change this.

    There is anyway to change this text?

    Thank you.
  2. Ederson
    Ederson avatar
    2 posts
    Member since:
    Oct 2013

    Posted 23 Oct 2013 Link to this post

    Did you try ToolTip="Your text"?
  3. MARIANO
    MARIANO  avatar
    10 posts
    Member since:
    Feb 2013

    Posted 23 Oct 2013 Link to this post

    Yes,
     i got one error: Type 'Telerik.Web.UI.GridDateTimeColumn' does not have a public property named 'ToolTip'.


  4. Answer
    Ederson
    Ederson avatar
    2 posts
    Member since:
    Oct 2013

    Posted 23 Oct 2013 Link to this post

    Try this code in your .cs file...


    protected void Page_Load(object sender, EventArgs e)
     
    {
     
     RadDatePicker1.DatePopupButton.ToolTip = "YourText";
     
    }



    I hope that's help!

  5. MARIANO
    MARIANO  avatar
    10 posts
    Member since:
    Feb 2013

    Posted 24 Oct 2013 Link to this post

    I can't use this because i'm using one GridDateTimeColumn, so i don't have this property.


  6. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 24 Oct 2013 Link to this post

    Hi,

    I guess you are using a radgrid and you have a DataColumn in it which you want to set the tooltip on filtering.You can access the datepicker in the ItemDatabound event of the radgrid and set toottip as Ederson has shown.PLease try the following:

    ASPX:
    <telerik:GridDateTimeColumn DataField="OrderDate" HeaderText="OrderDate" UniqueName="OrderDate"
      PickerType="DatePicker" >
    </telerik:GridDateTimeColumn>

    C#:
    protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridFilteringItem)
        {
            GridFilteringItem filter = (GridFilteringItem)e.Item;
            RadDatePicker picker = (RadDatePicker)filter["OrderDate"].Controls[0];
            picker.DatePopupButton.ToolTip = "YourText";
        }
    }

    Thanks,
    Princy
  7. MARIANO
    MARIANO  avatar
    10 posts
    Member since:
    Feb 2013

    Posted 24 Oct 2013 Link to this post

    Hi Princy,

    This worked!

    Thank you very much who helped!
Back to Top