Select item in a gridview - visual-studio-2010

I'm trying to create a webpage where a user can click on an item inside a gridview and have that rows data display in another page. I cannot figure out how to set it up so only the selected row's information is displayed in (I am thinking I will use a form view to display the data on the second page) the form view on the second page. Any suggestions?
Thanks!
Jake

If you have just a couple of columns i did suggest you to use QueryString to pass values between pages. Lets say there are two such values you want to pass to another page:
Response.Redirect("default2.aspx?firstvalue=" + yourfirstvalue + "&secondvalue=" + yoursecondvalue");
// this will set the values you want to pass on your gridview page
Request.QueryString("firstvalue")
// this will retrieve the first value from URL from your second page
If you want a neat lookin URL then i would suggest you to use Session variables.

Related

Apex - set items values after submit

I have to regions with items on my page. One of them is to edit data, another one is display only. Editable region is hidden on page load and shows when users click on a button. I'd like to pass data between these regions after submit a page. Are computations after submit the only way to do that? I tried with processes after submit, before header etc. but it didn't work.
I'd like to have one pl/sql code to pass data between two regions after submit, how to do such a thing?
Other options include
dynamic action (you'd use Set value)
button's Redirect to page in this application (where you'd redirect to the same page; Link Builder then lets you choose which items will be set to which values)
If you still can't make it work, consider creating sample page on apex.oracle.com; then provide login credentials so that someone might have a look.

<form:input> inside of <form:select> How to realize?

I'm building a jsp which will let user select data from database, it will uploads when page will render for user. But the problem is <form:select> don't let user insert new value his own one if the value not represented in the list(doesn't inputed in database).
I need let user put his own value if it's doesn't not exist in the <form:select>.
It's kinda has to be <form:input> with <form:select><form:options items="myList"></form:select>.
Could you help me with this. Thank you
You can provide textbox and dropdown.Make textbox enable only if user didnt select any value from dropdown allow him to enter value. If he selected any value from dropdown make the textbox disable.for this you should use bit of jquery or javascript.

get and display data in MVC 3 using Ajax

I have one view page in MVC named as ‘Index’. There are 3 main controls in that view page. For better understanding, take below example as reference.
1. One Dropdown ‘Customer’
2. One Dropdown ‘Project’ (that depends on ‘Customer’)
3. List of Task (that depends on ‘Project’).
Currently first user needs to select ‘Customer’. So based on customer ‘Project’ dropdown data will be fetched from post method of Index and bind that ‘Project’ dropdown. After selecting ‘Project’, List of task will be fetch from post method of Index and bind those tasks. So every time page is loaded again.I want to do it by Ajax form submit.
My problem – those 3 controls are in one view page so I want to return page view using Ajax without using Partial View. Is this possible? If yes then how? Or any other solution so that I am able to display data without reload whole page again.
If u can give me example of such scenario then it will be good.

Pop up a custom form with custom data on click of a cell in jqgrid

I have a grid control displaying data about a Company. I want one column to be "Employee". On click on the any cell of "Employee" column I want to pop up the one Form called "Employee Details" and would like to feel the data.
How can I do this?
As I understand the modal form on click of a jqgrid cell deals with data only related to that row. I want to show different data on the pop up form, i.e. other than the grid data.
Pl help.
Shivali
Probably you can use unobtrusive links in the column (see this and this answers). The advantage of this technique is that instead of typical links you can define any custom action on click on the link. The look of the link can be defined by CSS, but it seems to the that the link can show the user better as other HTML elements, that the user can click on it.
Alternative you can use a button in the column with respect of the custom formatter, but with the same technique as described before you can free define which action will be done on the click.
Inside of the click event with the parameter 'e' you have e.currentTarget as the DOM element of <a> for the link or <input> or <button> if you use buttons in the grid column. To find the row id you can use var row = $(e.currentTarget).closest("tr.jqgrow") or var row = $(e.target).closest("tr.jqgrow") to find the <tr> element. The row id will be row[0].id.

Drupal6: how to link a view to another

I have 2 views that show the content of 2 CCK content types.
When the user clicks an item of the first view I would like to filter the content of the second view by filtering for the selected item in the first view, all on the same page (using ajax, I believe).
How can I do a similar thing? Should I also use panels?
This may help you: http://drupal.org/node/1099194#comment-4290352

Resources