This is a migrated thread and some comments may be shown as answers.

gridview dropdownlist

3 Answers 56 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Somnath
Top achievements
Rank 1
Somnath asked on 10 Feb 2011, 04:16 PM
HI

 In my Application , a dropdown list having Binding source (master table data),on the dropdown list  selected index
a gridviews data (Detail table data) is populated..
 But same time dropdown list does not work properly (selected item does not changed)......

Please provide me any solution on that situation
....
Thank you

3 Answers, 1 is accepted

Sort by
0
Richard Slade
Top achievements
Rank 2
answered on 11 Feb 2011, 11:31 AM
Hello Somnath,

I'm unsure as to your issue. Please can you provide more details and a sample to demonstrate your issue and I'll do my best to help
Thanks
Richard
0
Somnath
Top achievements
Rank 1
answered on 11 Feb 2011, 03:14 PM
Hello

In my Application ,I have following situations (code)

Here is a textbox which helps  to add item in transactionbindingsource and a Save Button (which works nice)

But When I click 'Add' Button and click 'Reset' immediate without 'Save' Button
 
The dropdown list shows selectedindex= -1 and Does not work properly
(Does not select any other item)

Please suggest any solution to help me out....

// ddlTransactions        .....Drop DownList
this.ddlTransactions.DataSource = this.transactionBindingSource;
 this.ddlTransactions.DisplayMember = "TEntryNo";
 this.ddlTransactions.ValueMember = "Trans_ID";
  
//gvJournalEntry........RadgridView       
 this.JournalEntryDataGridView.MasterTemplate.DataMember = "Transaction_JournalEntry";  //relation
  this.JournalEntryDataGridView.MasterTemplate.DataSource = this.transactionBindingSource;
  
// journalEntryBindingSource......   (gvJournalEntry)    
            this.journalEntryBindingSource.DataMember = "Transaction_JournalEntry";
            this.journalEntryBindingSource.DataSource = this.transactionBindingSource;
  
//btnNewTransaction......Add  Button
 this.transactionBindingSource.AddNew();
  
//btnReset  .....Reset Button
this.qB_DataSet.JournalEntry.RejectChanges();
 this.transactionBindingSource.CancelEdit();
 this.journalEntryTableAdapter.Fill(this.qB_DataSet.JournalEntry);
0
Richard Slade
Top achievements
Rank 2
answered on 11 Feb 2011, 05:11 PM
Hello Somnath,

Unless I have mis-understood, I haven't been able to replicate your issue. Please could you post a full, simple sample that I can run to replicate this and I'll be happy to try and help
All the best
Richard
Tags
GridView
Asked by
Somnath
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Somnath
Top achievements
Rank 1
Share this question
or