本文介绍了我想修改网格视图,我该怎么做?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我有一个网格,其中在其中显示时隙,并且在第一列中显示有关患者约会的时间,在第二列和第三列中显示患者的姓名和出生日期,在这些列的上方,我需要工具名称和provider_name id作为标题约会的所有行的名称.

这是我的屏幕截图
这是我的aspx代码

Hello

I have grid in which I am displaying timeslots and with respect to patient appointments in the first column i have time slots and in the second and third column i have patient name and date of birth and above those columns i need facility_name and provider_name id as header names for all the rows of the appointment.

here is my screen shots
here is my aspx code

<asp:GridView ID="gvreceptionist" runat="server"

                AutoGenerateColumns="False"

                onselectedindexchanged="gvdisplayappointments_SelectedIndexChanged">
                <Columns>

                   <asp:TemplateField HeaderText="Appointment Time">
                         <ItemTemplate>
                            <asp:LinkButton ID="lbtodaytimeslotrep" runat="server"

                                onclick="lbtodaytimeslotrep_Click"

                                Text='<%# Eval("first_appointment_time", "{0:hh:mm tt}") %>'>
                            </asp:LinkButton>
                            <asp:HiddenField ID="hftimeslotidrep" runat="server"

                                Value='<%# Eval("tmslot_id") %>' />
                                </ItemTemplate>
                   </asp:TemplateField>
                   <asp:TemplateField HeaderText="Name">

                        <ItemTemplate>
                            <asp:Label ID="lblaptfacilityname" runat="server"

                                Text='<%# Eval("facility_name") %>'>
                            </asp:Label>
                            <asp:Label ID="lblaptprovidername" runat="server"

                                Text='<%# Eval("provider_name") %>'>
                            </asp:Label>
                            <asp:LinkButton ID="lbpatient" runat="server" Text='<%# Eval("fname") %>'

                                onclick="lbpatient_Click">
                            </asp:LinkButton>
                        </Itemtemplate>
                   </asp:TemplateField>
                   <asp:TemplateField HeaderText="DOB">
                        <ItemTemplate>
                            <asp:LinkButton ID="lbdob" runat="server" onclick="lbdob_Click"

                                Text='<%# Eval("DOB") %>'></asp:LinkButton>


                            <asp:HiddenField ID="hfpid" runat="server" Value='<%# Eval("pc_pid") %>' />

                        </ItemTemplate>
                   </asp:TemplateField>
                        </Columns>

            </asp:GridView>



而且我正在绑定来自该设施名称和提供者名称的表中的数据.

有人对此有解决办法吗?

谢谢



and I am binding the data from table for that facility_name and provider_name.

Does any body has solution for this?

Thank you

推荐答案

<asp:gridview id="gvreceptionist" runat="server" xmlns:asp="#unknown">
                AutoGenerateColumns="False"
                onselectedindexchanged="gvdisplayappointments_SelectedIndexChanged">
                <columns>

                   <asp:templatefield headertext="Your Header name here">
                         <itemtemplate>
          </itemtemplate></asp:templatefield></columns></asp:gridview>


这篇关于我想修改网格视图,我该怎么做?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-28 06:26