Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
210
How to Bind WebdateChooser to webgrid column in client side?
posted

Hi guys,

I want to bind a web date chooser to a column in a web grid in the client side using javascript, i.e when i click on the cell, a web date chooser should pop up.

If u guys have any idea,plz help?

Parents
No Data
Reply
  • 2907
    Suggested Answer
    posted

    Hi,

     

    This is the way where you can bind the web date chooser to the grid. It will pop up the date chooser when user double clicks on that column.

     

    (1)   Add Web date chooser control in the aspx page. You can set its other properties also.

     

    <igsch:WebDateChooser ID="WebDateChooser1" runat="server" >

            </igsch:WebDateChooser>

     

    (2)   Bind with the specific columns in the server side code.

     

            DataTable table1 = GetData();  

            grid1.DataSource = table1;

            grid1.DataBind();

            grid1.Columns[2].Type = ColumnType.Custom;

            grid1.Columns[2].EditorControlID = WebDateChooser1.ID;

            grid1.Columns[2].AllowUpdate = AllowUpdate.Yes;

     

     

    Make sure that your column should be of type DateTime.

     

    Do you want this to be done in client side? Could you explain your technical requirement in detail?

     

    Let me know if this helps you.

     

    Greetings

Children