pass-data

passing the position from listview to new activity

怎甘沉沦 提交于 2019-12-24 10:57:13
问题 how can i pass the value or the position of the selected item in listview to a new activity tha will use that value to retrieve data from database in listview (in the new activity) i have code that it works but always pass a null value for the position that has been passed. my code for the first activity : listView.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent,View view, int position, long id) { // ListView Clicked item index int

C# MVC No submit pass object between views

旧时模样 提交于 2019-12-20 03:15:37
问题 I am sorry for my typos.I am working on proof of concept C# ASP.NET MVC application where I need to pass data between two views when there is no post and get. One view launches a modal dialog and I need communication between them. We are using JQuery. I have a view called Charges.cshtml with a data grid. The first column of the datagrid may have span element or a link element depending on a property which will tell whether the charge have single or multiple descriptions. The view looks like

Pass data through navigation back button

只愿长相守 提交于 2019-12-18 10:49:17
问题 I am in this situation: I am passing 4 array from Progress Table to Detail Exercise using prepare for segue and it works fine! The problem begin when I try to pass the data back from the Detail Exercise Controller to the Progress Table Controller. I would like to use the default navigation back button to go back to the parent view. Actually I'm using this code but it doesn't work, well the data pass from the child to the parent view but i can't see the result in the Progress Table, seems like

ios-passing data between two view controllers without segue?

早过忘川 提交于 2019-12-13 02:18:59
问题 i want to pass data from one view controller to another view controller thats not connect to each other with segue.in firstviewcontroller when a button touch(favorite) want data pass to secondviewcontroller (favoriteviewcontroller) that is part of tabbarviewcontroller. i know that best solution maybe to use Delegate? but how can i do that? 回答1: - (IBAction)showFavouriteViewController:(UIButton *)sender { //Create an instance of FavouriteViewController FavouriteViewController *fVC = [self

send data to DetailView from FavoriteTableView?

自作多情 提交于 2019-12-12 04:39:26
问题 i have tableview,detailview ,and favoriteview in my app.when user touch cell in tableview will go to detailview thats contain photo,label,textfield and button for add to favorite.user can touch favorite button to add specific cell to favoritetableview. i can succefullly add cell to favoritetableview but when i touch cell in favoritetableview and go to detail view , nothing load in detailtableview ( photo and textfield and etc) just only can send name to detailview how can i send photo and

Pass NSString value to another ViewController in Objective C

℡╲_俬逩灬. 提交于 2019-12-12 03:29:31
问题 I am trying to pass NSString value to another ViewController. But I get null instead of the value. Here is my code. FirstViewController.m: NSString cellID = @"66"; SecondViewController *apiViewController = [[SecondViewController alloc] init]; apiViewController.strMessage=cellID; [self.navigationController pushViewController:apiViewController animated:YES]; SecondViewController.h: @interface SecondViewController : UIViewController{ NSString *strMessage; } @property(nonatomic,retain) NSString

moving the UIImageView from the main view to another

北城余情 提交于 2019-12-12 01:26:22
问题 my code works fine in choosing the picture from the gallery and display it in the same view, what am stuck into now, is transferring that UIImageView chosen to the next activity when "next" button is clicked here is the code that opens the gallery @IBAction func gallery(sender: AnyObject) { if UIImagePickerController.availableMediaTypesForSourceType(.PhotoLibrary) != nil { picker.allowsEditing = false picker.sourceType = UIImagePickerControllerSourceType.PhotoLibrary presentViewController

How can we pass the closures to any ViewController in the app flow?

心不动则不痛 提交于 2019-12-11 18:42:20
问题 In View Controller A, var completionBlock: (((String) -> ()))? = nil & I am calling the completion block like(ViewController A): if let block = completionBlock { block("block data to pass") } I don't want to pass the completion data to ViewController B, instead i want to pass to ViewController C which is presenting from ViewController B. In simple words, i want to pass the closure data to from ViewController A to ViewController C.I know how to pass data with delegates, just curious with

Error: Found nil while unwrapping an Optional value; While Pass Data to the New Controller [duplicate]

拈花ヽ惹草 提交于 2019-12-11 04:11:12
问题 This question already has answers here : Unexpectedly found nil IBOutlet in prepareForSegue (2 answers) Closed 3 years ago . I'm learning swift 2. I'm trying to pass the data of the cell (UITableView) that is tapped to the new View Controller. But I constantly get the error of: " unexpectedly found nil while unwrapping an Optional value " for the code line " destination!.label.text = valueToPass ". Below is my code. May I know what should I do to solve it? I have spent hours but still stuck

pass the value from activity to next activity in android

五迷三道 提交于 2019-12-11 01:46:59
问题 I have developed one android application. This is my first activity: public class ViewCartActivity extends Activity { String mGrandTotal; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.viewcartactivity); ListView mLstView1 = (ListView) findViewById(R.id.listView1); TextView mTxtViewGrandTotal = (TextView) findViewById(R.id.mTxtViewGrandTotalValue); Button mBtnSubmit = (Button)