Hi, i need to search all cells inside a dataviewgrid in VB.net starting with "www" , once i found one cell apply a background color to the complete row and get the next cell with the same String.
Part of my code:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim Ds1 As DataSet
Dim SearchSt1 as String = "www"
Ds1 = Session("SetDs") 'assigned one page before load
GridViewReport.DataSource = Ds1.Tables(0)
***Here i need to search in GridViewReport "Like" Searchst1 because i need all cells starting with "www" and set row.BackColor = Color.Lightblue***
Any help will be appreciated.
I have found a solution, i'll paste code just in case that someone else need a solution like this.
Dim b, bb As Integer
For b = 0 To GridViewReport.Rows.Count - 1
For b = 0 To GridViewReport.Rows(0).Cells.Count - 1
If CStr(GridViewReport.Rows(b).Cells(bb).Text) = SearchSt1 Then
GridViewReport.Rows(bb).BackColor = Color.LightGray
Edited 6 Years Ago by __avd: Added [code] tags. For easy readability, always wrap programming code within posts in [code] (code blocks).
write a C++ program which take inputs from the user/keyboard and calculate his ZAKAT.
get the input from user may include
-Amount invested in business
-Amount given to other business partners as loan
-Amount payable to others
I made a prime number finder, it finds the nearest prime that is above and below any integer (Does not work that well with giant numbers.)
Made this in cpp.sh
Why would I need the x=y+1-1;?
x=y; just doesnt seem to work
Why is this?
And I know my coding ...
there are five tables (personTb, addressTb,churchTb) each holds data pertinent to an individual; (personAddress,personChurch) each hold the primary key for the person table and corresponding table IE personAddress holds primary key for addressTb.
both snippets work, my question is; Is my join correctly formatted?