I need to have a seperate column that displays a warning if the condition is met. I'm trying to find examples of if then statements but I can't find anything out there or I'm looking for the wrong thing. I'm looking to add a fourth column that will have a flag, text, picture, anything, that will throw up a warning that if the column 2 equals or exceeds column 3 then the fourth column or flag column, lets the user know.
Here's the code.
ASP Side:
<aspataGrid ID="GridView1" runat="server" autogeneratecolumns="false">
<HeaderStyle Font-Bold="true" />
<Columns>
<asp:BoundColumn HeaderText="Part Number" DataField="partnumber" />
<asp:BoundColumn HeaderText="Actual" datafield="actual"/>
<asp:BoundColumn HeaderText="OrderPoint" DataField="orderpoint" />
</Columns>
</aspataGrid>
VB Side:
Dim MYSQL3 As String
MYSQL3 = " select partnumber, (sum(scanqty)-sum(orderqty)) as actual, "
MYSQL3 += " (select orderpoint "
MYSQL3 += " from KanBan.dbo.KBTEST "
MYSQL3 += " where tblVSKB_activitylog.partnumber = kbtest.partnumber) as orderpoint "
MYSQL3 += " FROM [Kanban].[dbo].[tblVSKB_ActivityLog] "
MYSQL3 += " group by partnumber "
MYSQL3 += " order by actual desc "
Dim MyDataAdapter = New SqlDataAdapter(MYSQL3, KBCS)
Dim MyDataSet As New Data.DataSet
MyDataAdapter.Fill(MyDataSet, "MYSQL3")
GridView1.DataSource = MyDataSet.Tables("MYSQL3").DefaultView
GridView1.DataBind()
MyDataAdapter.Dispose()
Any insight to fixing this or even where to look for a different approach would be fine. I have looked into using a stored proc for this to make it cleaner but I still need the extra column issue worked out.
Thanks,
Rog...
Here's the code.
ASP Side:
<aspataGrid ID="GridView1" runat="server" autogeneratecolumns="false">
<HeaderStyle Font-Bold="true" />
<Columns>
<asp:BoundColumn HeaderText="Part Number" DataField="partnumber" />
<asp:BoundColumn HeaderText="Actual" datafield="actual"/>
<asp:BoundColumn HeaderText="OrderPoint" DataField="orderpoint" />
</Columns>
</aspataGrid>
VB Side:
Dim MYSQL3 As String
MYSQL3 = " select partnumber, (sum(scanqty)-sum(orderqty)) as actual, "
MYSQL3 += " (select orderpoint "
MYSQL3 += " from KanBan.dbo.KBTEST "
MYSQL3 += " where tblVSKB_activitylog.partnumber = kbtest.partnumber) as orderpoint "
MYSQL3 += " FROM [Kanban].[dbo].[tblVSKB_ActivityLog] "
MYSQL3 += " group by partnumber "
MYSQL3 += " order by actual desc "
Dim MyDataAdapter = New SqlDataAdapter(MYSQL3, KBCS)
Dim MyDataSet As New Data.DataSet
MyDataAdapter.Fill(MyDataSet, "MYSQL3")
GridView1.DataSource = MyDataSet.Tables("MYSQL3").DefaultView
GridView1.DataBind()
MyDataAdapter.Dispose()
Any insight to fixing this or even where to look for a different approach would be fine. I have looked into using a stored proc for this to make it cleaner but I still need the extra column issue worked out.
Thanks,
Rog...