Display Hyperlink field on rows based on value from the database - vb.net

How do I dynamically display the 'Edit' on the hyperlink field based on the values on the rows, generated from the database.
N/B.: the gridview automatically generates rows.

Do you mean you want a DataGridViewLinkColumn in the grid with Edit displayed if appropriate? Like this:
In which case, make the whole column a LinkColumn and whether or not it's clickable will be taken care of internally by the grid. Columns which don't display Edit will not be clickable.
If you don't mean this then please provide more detail.

Related

RDLC - How to display each row from dataset in each page?

I am having set of text boxes in the report and binding each columns in the text box from the Data set.
As of now only first record from the dataset is binding in the text box.
I need all the rows in the dataset to bind in the text boxes page wise.
Each row in the dataset bind to text boxes page wise.
First record in first page,Second record in second page ... etc.
How to achieve this? Help me to solve this...
Thanks in Advance,
Stephen.L
I recently faced the same issue, I used some help from stackoverflow to solve the issue, u might have already figured it out but this is to help others with similar issue.
Make sure you have a Dataset defined for your report.
Add a "Table" control to the report. This seems to be needed in order to iterate the rows in your Dataset.
Delete the header row and two of the default columns from the table so that you are left with a single row with a single column.
Expand the table to the width of your layout and make it as tall as you will need for your "free form" layout.
By default, there is a TextBox inside the table cell. Right-click the empty table cell and choose "delete" to remove that TextBox.
Drag a "Rectangle" control into the empty table cell. It seems to automatically "dock" to the width/height of the table cell.
Now you should be able to drag the fields from your DataSet (TextBoxes, etc) into the Rectangle to produce the desired layout.
You can use a List with page breaks at the end of details group.

Continuous form with dependent combo boxes

I have a continuous form that has a dependent combo box on it. I have the dependent working individually for each row/record BUT the dependent combo box is blank unless it has focus then it shows the saved data so what I did was placed a text box over the data portion of the combo box and set its control source to the same field as the dependent combo box and required and it worked great BUT unlike a combo box which would show the name it shows the saved data which is a ID number so I guess my question is how can I show the name and not the data?
Thanks!
You'll need to clarify, but if the combobox is bound to a field of the form, and its RowSource displays two columns - say an ID and Name - then giving the first column a width of 0 will persuade it to display the Name, rather than the ID.
You will also need the Column Count to be 2 (or more) and the Bound Column to be 1 (the ID). Then set the Column Widths to 0cm;2cm (add more values if more than 2 columns).
Added
Remove this criteria from your cobmobox's Row Source:
[Forms]![frm_DelayMachineOutputSubform]![cboCategory]
It is not needed. The ActivityID (and the CategoryID) are obtained for each row in the form.
Remove these lines from the Current event as well:
Me.cboActivity.Requery
Me.txtActivity.Requery
again, they are not needed (and cause the flicker). Better yet, just delete this event-code.

Grid expand on data Clicked

I have a Grid with say 10 rows and 5 columns. suppose the first column is "Name"
So the data would be some thing like
Name
abc
xyz
pqr
Now My query is, I want to Expand the Row on "abc" click, i.e. on "Name" columns data click.
And wanted to show the data of the other columns from the same row.
I have attached the image , Hope this will clear my requirement.
In the image it is shown that, the RowExpander, we can make the row expandable. I wan the same functionality but not on click the Plus image, but on the name of the first column. i.e. from the above image when user clicks on "3m Co" from the company column. the Row should get expanded. i.e. what currently displayed in the image.
My advice is to stick with the rowexpander plugin - it's UI is much more user friendly than what you want to do.
The other way is to use rowbody and add custom functionality to collapse the rowbody with an itemclick listener - yeah good luck with that :)

Individual Record Subform

I am fairly new to access and I am wondering about a form.
In my form, I want to have certain field values displayed based upon which row the user selects.
So, pretend a user selects Row B, I want a subform that displays data from only Row B.
Is this possible, and if so how? :)
Thanks!
You don't even need a subform for this.
Your main form is a continuous form and your data rows are displayed in the form's detail area, right?
If yes, you can just put bound textboxes in the form header or footer, and they will display the value of the selected row.
Here are some example screenshots I just made.
It's Access 2000 and it's in German (that's the only Access version that I have here), but you'll get the idea.
Design mode:
("Formularkopf" means "form header", and "Detailbereich" is "Detail" in English Access versions.)
At runtime:
Note that the textbox in the form header, which is bound to Field2, automatically displays the value of Field2 in the currently selected row.

access: displaying data on a report

i have a report that is attached to a query
i want to display the contents of a query. there are three columns. i made a list box but it looks weird:
alt text http://img130.imageshack.us/img130/2245/52036335.png
i dont want the scroll bars, i just need the three fields from a query to be displayed regularly just as they would be in a spread sheet or grid
In your report's Detail section, create a text box (not a list box) for each of those 3 fields in your query.
It might be easier to get oriented by creating an autoform based on the query.