C#中Datapicker在数据网格上的日期 [英] Datapicker's Date On Data Grid in C#

查看:48
本文介绍了C#中Datapicker在数据网格上的日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

mtxtBdate.Value = dataGridView1.SelectedRows[0].Cells["Birthdate"].Value.ToString();


我希望在数据网格视图上使用此语法.在所有其他文本框中使用此类型的语法.但是现在如何使用此日期选择器控件语法.此语法是错误的,请告诉我write

测量用户在datetimepicker上选择的任何日期都将显示在数据网格上.


I want this on data Grid view.. this type of syntax use in all other textboxs.. but now how to use this datepicker control syntax.. this syntax is wrong please tell me write

meas any date that user select on the datetimepicker is show on the datagrid..

mtxtfname.text = datagridView1.SelectRows[0].Cells["fIrstname"].value.ToString();


此sytanx将用于文本框,但用于数据选择器.


this sytanx will for text box but for data picker ???

推荐答案

<asp:gridview ID="Gridview1" runat="server" ShowFooter="true" Width="100%"

            AutoGenerateColumns="false" GridLines="Both" CssClass="mGrid">
            <Columns>

            <asp:TemplateField ItemStyle-CssClass="cell" HeaderStyle-CssClass="cell" HeaderText="Date Of Travel">
                <ItemTemplate>
                    <asp:TextBox ID="TextBox1" CssClass="txtbox" runat="server"></asp:TextBox>
                    <asp:CalendarExtender ID="CalendarExtender1" OnClientDateSelectionChanged="checkDate" runat="server" TargetControlID="TextBox1" Format="dd/MM/yyyy">

                        </asp:CalendarExtender>

                </ItemTemplate>
            </asp:TemplateField>


这篇关于C#中Datapicker在数据网格上的日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆