mr_evans2u
New member
- Joined
- Oct 2, 2012
- Messages
- 2
- Programming Experience
- 5-10
I need to change the colors of the rows depending on what I get in the OU field from sql.
I am getting the information here, which works fine as is
The OU table can show one of the following data strings. If the OU is equal to Contacts those rows get a certain color, if OU is equal to Distrubution Lists those rows get a different color, etc...
OU=External,OU=Contacts,OU=Accounts,DC=us,DC=xxx,DC=comapnay,DC=com
OU=AD,OU=Distribution Lists,DC=us,DC=xxx,DC=company,DC=com
OU=$Generic Accounts,OU=Mailboxes,OU=Accounts,DC=us,DC=xxx,DC=company,DC=com
Any help is appriciated,
Thank you in advance
I am getting the information here, which works fine as is
VB.NET:
Dim strSQL As String = "SELECT TOP 250 Name, ProxyAddress, mail, OU FROM ProxyLookup WHERE ProxyAddress LIKE '%" & txtProxyAddr.Text & "%'"
ViewState("dtSearchResults") = sqlConn.getDataTable(strSQL.ToString)
GV.DataSource = ViewState("dtSearchResults")
GV.DataBind()
lblGVMsg.Text = CType(ViewState("dtSearchResults"), DataTable).Rows.Count & " record(s) found"
lblGVMsg.ForeColor = Drawing.Color.Black
The OU table can show one of the following data strings. If the OU is equal to Contacts those rows get a certain color, if OU is equal to Distrubution Lists those rows get a different color, etc...
OU=External,OU=Contacts,OU=Accounts,DC=us,DC=xxx,DC=comapnay,DC=com
OU=AD,OU=Distribution Lists,DC=us,DC=xxx,DC=company,DC=com
OU=$Generic Accounts,OU=Mailboxes,OU=Accounts,DC=us,DC=xxx,DC=company,DC=com
Any help is appriciated,
Thank you in advance