[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.0

Formatting date fields in DetailsView

Asked by IntercareSupport in Programming for ASP.NET, .NET, Microsoft Development

Tags: asp.net, sql statements

In my DetailsView, I have several dates that I need to update.  Right now they are displaying in this format: 7/21/2008 12:00:00 AM

I just want them to be displayed as this: 7/21/2008

Now when I go into the SQL and try to convert it there (like this: CONVERT (VARCHAR(8), Patient_Personal_1.Patient_DOB, 1) AS DOB), the field in DetailsView becomes uneditable.

Is there a cleaner way to just have a popup date box inside the DetailsView?  I haven't seen a way to do this.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
<asp:DetailsView ID="DetailsView1"
                                    runat="server" AutoGenerateRows="False" DataSourceID="qry_Enrollment" Height="50px"
                                    Width="519px" Font-Size="12pt">
                                    <RowStyle Font-Size="Smaller" />
                                    <Fields>
                                        <asp:BoundField DataField="Enroll Date" HeaderText="Enroll Date" SortExpression="Enroll Date" />
                                        <asp:CheckBoxField DataField="HIPAA" HeaderText="HIPAA" SortExpression="HIPAA" />
                                        <asp:BoundField DataField="Advised Visits" HeaderText="Advised Visits" SortExpression="Advised Visits" >
                                            <ControlStyle Width="15px" />
                                        </asp:BoundField>
                                        <asp:CheckBoxField DataField="Infant Reauthorize" HeaderText="Reauthorize" SortExpression="Infant Reauthorize" />
                                        <asp:BoundField DataField="Infant RD Assigned" HeaderText="RD Assigned" SortExpression="Infant RD Assigned" >
                                            <ControlStyle Width="15px" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="Infant RN Assigned" HeaderText="RN Assigned" SortExpression="Infant RN Assigned" >
                                            <ControlStyle Width="15px" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="Infant SW Assigned" HeaderText="SW Assigned" SortExpression="Infant SW Assigned" >
                                            <ControlStyle Width="15px" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="Infant RD Visits" HeaderText="RD Visits" SortExpression="Infant RD Visits" >
                                            <ControlStyle Width="15px" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="Infant RN Visits" HeaderText="RN Visits" SortExpression="Infant RN Visits" >
                                            <ControlStyle Width="15px" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="Infant SW Visits" HeaderText="SW Visits" SortExpression="Infant SW Visits" >
                                            <ControlStyle Width="15px" />
                                        </asp:BoundField>
                                        <asp:TemplateField HeaderText="Smoking Status" SortExpression="InfantSmokingStatus">
                                            <EditItemTemplate>
                                            <asp:DropDownList ID="DropDownList2" runat="server" Text='<%# Bind("[InfantSmokingStatus]") %>'>
                                                <asp:ListItem Value=""></asp:ListItem>
                                                       <asp:ListItem Value="No Exposure">No Exposure</asp:ListItem>
                                                       <asp:ListItem Value="Client">Client</asp:ListItem>
                                                       <asp:ListItem Value="Environment">Environment</asp:ListItem>
                                                   </asp:DropDownList>
                                               </EditItemTemplate>
                                            <InsertItemTemplate>
                                                <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("InfantSmokingStatus") %>'></asp:TextBox>
                                            </InsertItemTemplate>
                                            <ItemTemplate>
                                                <asp:Label ID="Label1" runat="server" Text='<%# Bind("InfantSmokingStatus") %>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Infant Last Visited By" SortExpression="Infant Last Visited">
                                            <EditItemTemplate>
                                            <asp:DropDownList ID="DropDownList_Last_Visited" runat="server" Text='<%# Bind("[Infant Last Visited]") %>'>
                                                <asp:ListItem Value=""></asp:ListItem>
                                                       <asp:ListItem Value="RD">RD</asp:ListItem>
                                                       <asp:ListItem Value="RN">RN</asp:ListItem>
                                                       <asp:ListItem Value="SW">SW</asp:ListItem>
                                                   </asp:DropDownList>
                                                   </EditItemTemplate>
                                            <InsertItemTemplate>
                                                <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("[Infant Last Visited]") %>'></asp:TextBox>
                                            </InsertItemTemplate>
                                            <ItemTemplate>
                                                <asp:Label ID="Label2" runat="server" Text='<%# Bind("[Infant Last Visited]") %>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:BoundField DataField="Infant Last Visit Date" HeaderText="Last Visit"
                                            SortExpression="Infant Last Visit Date" />
                                        <asp:TemplateField HeaderText="Family Planning" SortExpression="Family Planning">
                                            <EditItemTemplate>
 
 
                                            <asp:DropDownList ID="DropDownList_Family_Planning" runat="server" Text='<%# Bind("[Family Planning]") %>'>
                                                <asp:ListItem Value=""></asp:ListItem>
                                                       <asp:ListItem Value="Condoms">Condoms</asp:ListItem>
                                                       <asp:ListItem Value="DepoPrevera">DepoPrevera</asp:ListItem>
                                                       <asp:ListItem Value="NFP">NFP</asp:ListItem>
                                                       <asp:ListItem Value="Norplant">Norplant</asp:ListItem>
                                                       <asp:ListItem Value="OCP">OCP</asp:ListItem>
                                                       <asp:ListItem Value="Sterilization">Sterilization</asp:ListItem>                                                       <asp:ListItem Value="Condoms">Condoms</asp:ListItem>
                                                       <asp:ListItem Value="IUD">IUD</asp:ListItem>
                                                       <asp:ListItem Value="Patch">Patch</asp:ListItem>    
                                                       <asp:ListItem Value="Undecided">Undecided</asp:ListItem>                                                                                                            
                                                   </asp:DropDownList>
 
 
 
                                            </EditItemTemplate>
                                            <InsertItemTemplate>
                                                <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("[Family Planning]") %>'></asp:TextBox>
                                            </InsertItemTemplate>
                                            <ItemTemplate>
                                                <asp:Label ID="Label3" runat="server" Text='<%# Bind("[Family Planning]") %>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:BoundField DataField="First Newborn Exam" HeaderText="First Newborn Exam" SortExpression="First Newborn Exam" >
                                            <ControlStyle Width="15px" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="Feeding Choice" HeaderText="Feeding Choice" SortExpression="Feeding Choice" />
                                        <asp:BoundField DataField="Discharge Date" HeaderText="Discharge Date" SortExpression="Discharge Date" />
                                        <asp:BoundField DataField="Comments" HeaderText="Comments" SortExpression="Comments" />
                                        <asp:CheckBoxField DataField="Infant Closed" HeaderText="Infant Closed" SortExpression="Infant Closed" />
                                        <asp:CommandField ShowEditButton="True" />
                                    </Fields>
                                </asp:DetailsView>
                                &nbsp;</span><asp:SqlDataSource id="qry_Enrollment" runat="server" ConnectionString="<%$ ConnectionStrings:MIHP_MaternalConnectionString %>" SelectCommand="SELECT Patient_ID, [Infant Enroll Date] as [Enroll Date], [Infant HIPPA] as HIPAA, [Infant Advised Visits] as [Advised Visits], [Infant Reauthorize], [Infant RD Visits], [Infant SW Visits], [Infant RD Assigned], [Infant SW Assigned], [Infant RN Assigned], InfantSmokingStatus, [Infant Last Visited], [Infant Last Visit Date], InfantFamilyPlanning as [Family Planning], [First Newborn Exam], [Infant Feeding Choice] as [Feeding Choice], [Infant Discharge Date] as [Discharge Date], [Infant Comments] as Comments, [Infant Closed], [Infant RN Visits] FROM Detail WHERE (Patient_ID = @Patient_Id)" UpdateCommand="UPDATE Detail SET [Current Status] = @Current_Status">
                                <SelectParameters>
                                    <asp:QueryStringParameter Name="Patient_Id" QueryStringField="Patient_Id" />
                                </SelectParameters>
                                <UpdateParameters>
                                    <asp:Parameter Name="Current_Status" />
                                </UpdateParameters>
                            </asp:SqlDataSource>
[+][-]02/04/09 02:19 PM, ID: 23554363Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Programming for ASP.NET, .NET, Microsoft Development
Tags: asp.net, sql statements
Sign Up Now!
Solution Provided By: nmarun
Participating Experts: 4
Solution Grade: A
 
[+][-]02/04/09 02:17 PM, ID: 23554333Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/04/09 03:19 PM, ID: 23554884Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/05/09 08:03 AM, ID: 23560651Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/05/09 08:27 AM, ID: 23560950Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/05/09 08:50 PM, ID: 23566929Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
 
Loading Advertisement...
20091118-EE-VQP-93 - Hierarchy / EE_QW_3_20080625