Im experiencing a problem where when I try to open a page of an item in a table, the first record in the datasource always opens first.
My setup. I have a page "SystemDetails" with the datasource "System", and a table within that page with a datasource "System:ActionItems"(relation). Within the table, I have a button for each row that when clicked, shows a different page "ActionItemDetails".
An example of my problem. Say I click in the table an item with Id #3, the page "ActionItemDetails" shows, but the page's content loads with item Id #1. However, when I go back to the "System" page and retry clicking Id #3, it loads Id #3 as desired, and I am able to successfully open every item successfully.
This problem seems to only happen on the first time I open the "ActionItemDetails".
I thought this should be able to work natively in appmaker without any code, but I have also tried using selectKey and selectIndex in the edit button with no luck.
A side note. I also noticed that when the page "ActionItemDetails" first loads, there is only one item loaded when I console.dir(), so think the problem seems to be coming from not loading all the items.
Related
Using the Details Master pattern. When the form initially loads it shows a grid. When clicking on the grid the details are displayed, and is working perfectly fine. The issue with this design pattern is the first record is always loaded so when I look at the cursor the first record is showing.
I'm populating a two list view controls through code (one is available items and the second is selected with buttons to move the items back and forth between the controls) and my issue is when I press "New" the detail page is displayed but the list view is populated for the first record selected. I need a way to know when "New" is pressed I can clear out the list view selected control and just populate the available values.
I ended going a different direction and creating my own "New" button that calls a menu item to call a new form as a popup similar to how the form when entering a new customer works. Then I turned off the "New" button and now my code works fine without have to deal with the one screen containing both forms logic.
I have a program which requires the user to key-in data. My database is working fine though; I can view all records made.
However, the past record is being displayed at the bottom of my add button:
my question is, is there any way to change so that when I clicked "Add", it goes to another page and load the data instead?
Help please!
I am pulling out what little hair I have left over this and can't find an answer.
I am attempting to move the selected row in a grid view to another page and use the SelectedDataKey or the primary key value of the selected row to indicate what data should be displayed in a grid view on another page. This is the last little bit of a school project that I can't figure out.
What I am doing on the first page is to use a button click event to set a session variable that looks something like this. Session["Select"] = GridView1.SelectedDataKey; The button will then send the user to the next page. Response.Redirect("CustomerAccounts.aspx");
Once on the next page I want to use the primary key selected on the first page to show only the data with a coresponding value on the second page by using a where statement in the next gridview. So I am setting the [CustomerID]=? Session("Session["Select"])
Am I setting up the where correctly in the second gridview?
I like setting up such things with querystrings.
I made a video tutorial on youtube doing just that a while back
http://www.youtube.com/watch?v=HRjZ_0JpO2M&list=UUgtKyNvllU9E6c2Mi8OtzCQ&index=5&feature=plcp
I also made a tutorial showing how to load the detail gridview nested in the master gridview with jquery
http://www.youtube.com/watch?v=nJp14o_1wZQ&list=UUgtKyNvllU9E6c2Mi8OtzCQ&index=4&feature=plcp
http://binaryjack.com/userControl.aspx
Each record is displayed using a user control. I have the delete button embedded in the user control.
Recreate Problem: click the first DELETE button, the last row gets deleted; after this I have to click the delete button (any of them) twice to make it work.
Is it bad practice to use a User Control (combined with a placeholder) to display a bunch of records? I query to get all records and then use a Foreach loop to populate each User Control and insert each UC into the placeholder.
Why does the Delete button not respond correctly?
Without seeing your code it is tough to say. However, it appears to be a refresh issue. If you hit delete then hit refresh, the record is gone. Check how you are refreshing the data and you'll find the issue.
I have several combo boxes and labels. when a user select any item from the combo box, the corresponding value will be retrieved from database and will be shown on the label. I have done these part successfully.
But my query is, when I select any item from the combo box, the whole page posts back to the server (AutoPostBack set to True.)
is it possible to post back only a part of page not the whole page (i.e. only combo box controls may be posted back to server instead of whole page)?
You could use AJAX to achieve that. In ASP.NET there is the UpdatePanel control which might help you.