I have a method as follows:
private List<ProjectFile> PopUpModifiedFiles(List<ProjectFile> ModifiedFiles)
{
this.lblModifiedFilesMessage.Text = "Below files are modified in the Source Server and will be archived with latest version. Please select any files if they are to be retained with older version in archive";
DataTable dtModifiedFiles = new DataTable();
dtModifiedFiles.Columns.Add("FileName");
foreach (ProjectFile modifiedFile in ModifiedFiles)
{
DataRow drFileName = dtModifiedFiles.NewRow();
drFileName["FileName"] = modifiedFile.FileName;
dtModifiedFiles.Rows.Add(drFileName);
}
gvPopUpModifiedFiles.DataSource = dtModifiedFiles;
gvPopUpModifiedFiles.DataBind();
this.JsContent = string.Format("setPopupPosition('{0}');setPopupBackgroundPosition('{1}');", this.divPopUpFiles.ClientID, this.divPopUpBackGround.ClientID);
this.PopUpPanel.Visible = true;
this.divPopUpBackGround.Visible=true;
this.divPopUpFiles.Visible = true;
this.lblModifiedFilesMessage.Visible = true;
this.gvPopUpModifiedFiles.Visible = true;
List<ProjectFile> archiveFiles = new List<ProjectFile>();
return archiveFiles;
}
This Method show a pop-up in which I have a grid view and a button.
On click of that button I have to return the files.
My button click event is like this:
protected void btnOk_Click(object sender,EventArgs e)
{
PopUpPanel.Visible = false;
ProjectFile filesToArchive;
List<ProjectFile> filesToArchiveAfterUserSelection = new List<ProjectFile>();
foreach (GridViewRow gvrow in gvPopUpModifiedFiles.Rows)
{
CheckBox chk = (CheckBox)gvrow.FindControl("chkFileSelect");
if (chk != null & chk.Checked)
{
filesToArchive = new ProjectFile();
filesToArchive.FileName = gvrow.Cells[1].Text;
filesToArchiveAfterUserSelection.Add(filesToArchive);
}
}
}
How can I return the values on click of the button to my method?
One more thing that I am facing in this is pop-up is not visible after calling the method Pop-Up method Files. It is coming after the execution of entire code. I called this Pop-Up some where. This Pop-Up is not visible.
PHenix_yu says right.
U can put "List filesToArchiveAfterUserSelection = new List();" out of this button event and in this class.
If you want to keep the return value after close your pop-up window,you can define a class like the below:
public class FileStore
{
public static List<ProjectFile> filesToArchiveAfterUserSelection = new List<ProjectFile>();
}
If you only want to get the return value when pop-up window open,you can change filesToArchiveAfterUserSelection as a class member in your pop-up window class
Related
I have an application which actually works showing different forms(sells, budgets, etc). Some of the forms manage datagridviews with content that the user selects from a database, and it is usually passed from a form to another, hiding the previous form and showing the following.
Now I would like to avoid forms popping up and hiding them, and build the app behavior in a panel, in which all forms are showed up. The thing is, I made this class to show forms in the panel:
public void openChildForm(Form childform)
{
if (activeForm != null)
activeForm.Close();
activeForm = childform;
childform.TopLevel = false;
childform.FormBorderStyle = FormBorderStyle.None;
childform.Dock = DockStyle.Fill;
panel2.Controls.Add(childform);
panel2.Tag = childform;
childform.BringToFront();
childform.Show();
}
My problem relies here: how can I manage to pass the datagrid values from one form to another with this class, since I was working with ShowDialog forms. All datagridview values are passed like this:
Sells cp = new Sells();
foreach (DataGridViewRow rowww in dgvBudget.Rows)
{
int rowID = cp.dgvSell.Rows.Add();
DataGridViewRow row = cp.dgvSell.Rows[rowID];
double qty = Convert.ToDouble(rowww.Cells[1].Value);
double price = Convert.ToDouble(rowww.Cells[2].Value);
double final = qty * price;
row.Cells[0].Value = rowww.Cells[0].Value;
row.Cells[1].Value = rowww.Cells[1].Value;
row.Cells[2].Value = price;
row.Cells[3].Value = final;
if(string.IsNullOrEmpty(discount.Text))
{
cp.subtotal.Text = this.subtotallbl.Text;
cp.totalLbl.Text = this.subtotallbl.Text;
}
else if(!string.IsNullOrEmpty(discount.Text))
{
cp.subtotal.Text = this.subtotallbl.Text;
cp.descuentoFinal.Text = this.discount.Text;
cp.totalLbl.Text = this.totalLbl.Text;
}
}
Important: the application now works inside a panel, and I would like to work all forms from this panel, which allows me to reduce opened forms.
I have a method called OpenURL() and recordHistory() with the following definitions:
public string OpenURL(string url)
{
//get index of current tab
int tabIndex = BrowserWindow.TabControlE.SelectedIndex;
//create instance of History class
History H = new History();
//call recordHistory() method to record the url and tabIndex
H.recordHistory(url, tabIndex);
}
public void recordHistory(string url, int tabIndex)
{
//print the tabIndex
Console.WriteLine("Tab is: "+tabIndex);
}
The scenario is: I would like to record history for each tab.
However, I am facing some unexpected behavior from TabControl.SelectedIndex.
When the first tab is created, the output in recordHistory() is:
Tab is: -1
When I refresh the page (call OpenURL() on the same tab), this time the output in recordHistory() is:
Tab is: 0
It seems that the first time a tab is created the TabControl.SelectedIndex value is wrong. This goes away after refreshing the page. How do I correct this so that it displays the correct value?
EDIT: Adding the recordHistory() call.
In class BrowserWindow:
private void BrowserWindow_Load(object sender, EventArgs e)
{
TabControl1 = new TabControl();
TabControl1.SelectedIndexChanged += TabControl1_SelectedIndexChanged;
Tab Tab1 = new Tab(tab_counter, getHomePageURL());
TabControl1.Controls.Add(Tab1.createNewTab());
this.Controls.Add(TabControl1);
}
In class Tab:
class Tab
{
int tab_ID;
String tab_URL;
TabPage page;
public Tab(int tab_ID, String tab_URL)
{
this.tab_ID = tab_ID;
this.tab_URL = tab_URL;
}
public TabPage createNewTab()
{
//Create a new tab
page = new TabPage("New Tab");
page.Text = this.tab_URLE;
page.Controls.Add(R1);
R1.Text = OpenURL(this.tab_URLE);
return page;
}
}
The flow goes: BrowserWindow_Load() --> createNewTab() --> OpenURL() --> recordHistory()
The problem is with your BrowserWindow_Load event. Change the order of the last 2 statements and it should work. Like this:
private void BrowserWindow_Load(object sender, EventArgs e)
{
TabControl1 = new TabControl();
TabControl1.SelectedIndexChanged += TabControl1_SelectedIndexChanged;
Tab Tab1 = new Tab(tab_counter, getHomePageURL());
this.Controls.Add(TabControl1);
TabControl1.Controls.Add(Tab1.createNewTab());
}
In my activity I am dynamically creating controls based off of sqlite data. Each item will have a button with a click event that needs to send that rows ID to the new activity.
I have looked at the following page and can get this to work on a button that already exists in my layout. But it doesn't seem to work when the button is dynamically created. Is there something additional I need to do with the button for this to work?
https://developer.xamarin.com/recipes/android/fundamentals/activity/pass_data_between_activity/
Here is the code that creates the button dynamically:
foreach (Tasks item in table)
{
TableRow row = new TableRow(this);
TextView txtTask = new TextView(this);
txtTask.Text = item.Name;
row.AddView(txtTask);
tableLayout.AddView(row);
row = new TableRow(this);
Button btnEdit = new Button(this);
btnEdit.Text = "Edit Record";
btnEdit.SetWidth(300);
btnEdit.Click += delegate
{
Intent viewTask = new Intent(this, typeof(UpdateTaskActivity));
viewTask.PutExtra("TaskId", item.Id);
StartActivity(viewTask);
};
row.AddView(btnEdit);
tableLayout.AddView(row);
}
In the OnCreate method of UpdateTaskActivity I have:
string test = Intent.GetStringExtra("TaskId") ?? "error";
if (test != "error")
{
//Do Stuff
}
But when I put a breakpoint down, my string is always null. I did put a breakpoint to make sure the correct ID is being pulled.
Why does this work with a built in button but does not work with my dynamic one?
Just to avoid confusion, in my startup screen I have a test button, and my main activity has the following code for that button. This code works fine, because the button isn't dymaically created:
//Test button
Button btnTest = FindViewById<Button>(Resource.Id.btnTest);
btnTest.Click += delegate
{
var activity2 = new Intent(this, typeof(UpdateTaskActivity));
activity2.PutExtra("TaskId", "1");
StartActivity(activity2);
};
The main issue is that you are adding an int to the extras:
// item.Id is an int type
viewTask.PutExtra("TaskId", item.Id);
And then you are trying to get it as a string:
var test = Intent.GetStringExtra("TaskId");
There are two ways to get the value, without having to add the value as a string. Either get an int value:
var test = Intent.GetIntExtra("TaskId", 0);
if (test != 0)
{
// Do Stuff
}
Or, you can first check for the extra, if you don't want to rely on the default value:
if (Intent.HasExtra("TaskId"))
{
var test = Intent.GetIntExtra("TaskId", 0);
// Do Stuff
}
I have a GridView control which shows a list of all employees. When user selects any employee from this list, the record is shown on a Web Form with all input controls pre-filled with the values.
I want to know any good approach to do this. Should I bind all input controls to any SqlDataSource or should I re-populate all input controls by picking values from the DataSet.
First you add the select button on your GridView as:
<asp:ButtonField Text="Select" CommandName="ViewMe" ButtonType="Button" />
then you add the OnRowCommand="RowCommand" property on GridView to call this function when the button is clicked and on code behind the function:
protected void RowCommand(object sender, GridViewCommandEventArgs e)
{
// if the ViewMe command is fired
if (e.CommandName == "ViewMe")
{
// go to find the index on the grid view
int iTheIndexNow;
if (int.TryParse(e.CommandArgument.ToString(), out iTheIndexNow))
{
// Set and highlight the selected
TheGridView.SelectedIndex = iTheIndexNow;
// do we have the table data id ?
if (TheGridView.SelectedValue != null)
{
// now load the controls data using this id
LoadValuesFromDatabaseToControls(TheGridView.SelectedValue);
}
}
}
}
I prefer this way of command button because you can add more commands than the select, or edit, even the delete or copy... the just index change can be done for any reason (eg by changing page) and is also need again the select.
I use the subsonic 2 DAL for loading the data from the database. A sample code from my programs is:
void LoadValuesFromDatabaseToControls(string editID)
{
// Load it from database
AthUserMaiListName OneRow = new AthUserMaiListName(editID);
if (OneRow.IsNotExist)
{
// a custom control that show messages on top.
uResult.addMsg("Fail to load id " + editID, MsgType.error);
// close the view of the controls
dbViewPanel.Visible = false;
}
else // else we have the data and go for show them
{
// show this panel that contains the controls.
dbViewPanel.Visible = true;
// I keep my current edit id
lblID.Text = editID;
// just be sure that the select exist on DrowDownList
MyUtils.SelectDropDownList(ddlEventType, OneRow.CAddedFrom);
txtEmail.Text = OneRow.CEmail;
txtFirstName.Text = OneRow.CFirstName;
txtLastName.Text = OneRow.CLastName;
txtInsideTitle.Text = OneRow.CInsideTitle;
txtCompanyName.Text = OneRow.CCompanyName;
txtCreated.Text = DateTimeRender(OneRow.CreatedOn);
txtModified.Text = DateTimeRender(OneRow.ModifiedOn);
}
}
I used this code in my application-
A better approach would call to this mothod on gridview_select_index_change() event
private void PickValues(int SerialNum)
{
DataSet ds = new DataSet();
try
{
string Query = "SELECT * FROM tw_main WHERE sno = " + SerialNum;
ds = reuse.ReturnDataSet(Query, "Scheme");
//Add Scheme Code to new Session Variable
Session.Add("SerialNumber", ds.Tables[0].Rows[0]["sno"].ToString());
//Set Update Flag
TaskFlag = "UPDATE";
//Fill values of selected record on the Entry Form
if (ds.Tables[0].Rows[0]["schm_code"].ToString().Length > 0)
lblSchemeCode.Text = ds.Tables[0].Rows[0]["schm_code"].ToString();
ddlType.SelectedValue = ds.Tables[0].Rows[0]["schemetype"].ToString(); ddlDistrict.Text = ds.Tables[0].Rows[0]["dist_nm"].ToString(); ddlBlock.Text = ds.Tables[0].Rows[0]["block_nm"].ToString();
txtSchemeName.Text = ds.Tables[0].Rows[0]["schm_nm"].ToString();
txtPopulation2001.Text = ds.Tables[0].Rows[0]["population_2001"].ToString();
txtSupplySource.Text = ds.Tables[0].Rows[0]["supply_source"].ToString();
txtApprovalYear.Text = ds.Tables[0].Rows[0]["yr_approval"].ToString();
txtApprovalLetterNum.Text = ds.Tables[0].Rows[0]["approval_letter_num"].ToString();
txtApprovalAmount.Text = ds.Tables[0].Rows[0]["sch_apr_amt"].ToString();
txtWaitedLetterNum.Text = ds.Tables[0].Rows[0]["sch_waited_details"].ToString();
txtSchTransferLetterNum.Text = ds.Tables[0].Rows[0]["schm_trans_details"].ToString();
txtSchTransferDate.Text = ds.Tables[0].Rows[0]["schm_trans_date"].ToString();
txtOtherRemarks.Text = ds.Tables[0].Rows[0]["remarks"].ToString();
}
catch (Exception ex)
{
ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(), "Warning", "alert('" + ex.Message.ToString() + "');",true);
}
finally
{
ds.Dispose();
gridSerialNo = 0;
}
}
EDIT
There might be better approach to do so but this works certainly fine.
The way I would perform this task since you want to create a data access layer is to create a class which has all the properties
Class:
public class tw_main
{
public string SchemeCode {get;set;}
}
DAL:
public class dal
{
public tw_main getSelectedValue(pass the parameters required by the method)
{
//your connection and query code
var twmain = new tw_main();
twmain.SchemaCode = ds.Tables[0].Rows[0]["schm_code"].ToString();
return twmain;
}
}
Web Page:
//depending upon where you add this a reference may need to be imported (using) to the namespace
var dalObj = new dal();
var tw = dalObj.getSelectedValue();
lblSchemeCode.Text = tw.SchemaCode;
This is kind of a oddball problem so I will try to describe the best that I can.
I have a DataGridView that shows a list of contracts and various pieces of information about them. There are three view modes: Contract Approval, Pre-Production, and Production. Each mode has it's own set of columns that need to be displayed.
What I have been doing is I have three radio buttons one for each contract style. all of them fire their check changed on this function
private void rbContracts_CheckedChanged(object sender, EventArgs e)
{
dgvContracts.Columns.Clear();
if (((RadioButton)sender).Checked == true)
{
if (sender == rbPreProduction)
{
dgvContracts.Columns.AddRange(searchSettings.GetPreProductionColumns());
this.contractsBindingSource.DataMember = "Preproduction";
this.preproductionTableAdapter.Fill(this.searchDialogDataSet.Preproduction);
}
else if (sender == rbProduction)
{
dgvContracts.Columns.AddRange(searchSettings.GetProductionColumns());
this.contractsBindingSource.DataMember = "Production";
this.productionTableAdapter.Fill(this.searchDialogDataSet.Production);
}
else if (sender == rbContracts)
{
dgvContracts.Columns.AddRange(searchSettings.GetContractsColumns());
this.contractsBindingSource.DataMember = "Contracts";
this.contractsTableAdapter.Fill(this.searchDialogDataSet.Contracts);
}
}
}
Here is the GetxxxColumns function
public DataGridViewColumn[] GetPreProductionColumns()
{
this.dgvTxtPreAccount.Visible = DgvTxtPreAccountVisable;
this.dgvTxtPreImpromedAccNum.Visible = DgvTxtPreImpromedAccNumVisable;
this.dgvTxtPreCreateDate.Visible = DgvTxtPreCreateDateVisable;
this.dgvTxtPreCurrentSoftware.Visible = DgvTxtPreCurrentSoftwareVisable;
this.dgvTxtPreConversionRequired.Visible = DgvTxtPreConversionRequiredVisable;
this.dgvTxtPreConversionLevel.Visible = DgvTxtPreConversionLevelVisable;
this.dgvTxtPreProgrammer.Visible = DgvTxtPreProgrammerVisable;
this.dgvCbxPreEdge.Visible = DgvCbxPreEdgeVisable;
this.dgvCbxPreEducationRequired.Visible = DgvCbxPreEducationRequiredVisable;
this.dgvTxtPreTargetMonth.Visible = DgvTxtPreTargetMonthVisable;
this.dgvCbxPreEdgeDatesDate.Visible = DgvCbxPreEdgeDatesDateVisable;
this.dgvTxtPreStartDate.Visible = DgvTxtPreStartDateVisable;
this.dgvTxtPreUserName.Visible = DgvTxtPreUserNameVisable;
this.dgvCbxPreProductionId.Visible = DgvCbxPreProductionIdVisable;
return new System.Windows.Forms.DataGridViewColumn[] {
this.dgvTxtPreAccount,
this.dgvTxtPreImpromedAccNum,
this.dgvTxtPreCreateDate,
this.dgvTxtPreCurrentSoftware,
this.dgvTxtPreConversionRequired,
this.dgvTxtPreConversionLevel,
this.dgvTxtPreProgrammer,
this.dgvCbxPreEdge,
this.dgvCbxPreEducationRequired,
this.dgvTxtPreTargetMonth,
this.dgvCbxPreEdgeDatesDate,
this.dgvTxtPreStartDate,
this.dgvTxtPreUserName,
this.dgvCbxPreProductionId,
this.dgvTxtCmnHold,
this.dgvTxtCmnConcern,
this.dgvTxtCmnAccuracyStatus,
this.dgvTxtCmnEconomicStatus,
this.dgvTxtCmnSoftwareStatus,
this.dgvTxtCmnServiceStatus,
this.dgvTxtCmnHardwareStatus,
this.dgvTxtCmnAncillaryStatus,
this.dgvTxtCmnFlowStatus,
this.dgvTxtCmnImpromedAccountNum,
this.dgvTxtCmnOpportunityId};
}
public DataGridViewColumn[] GetProductionColumns()
{
this.dgvcTxtProAccount.Visible = DgvTxtProAccountVisable;
this.dgvTxtProImpromedAccNum.Visible = DgvTxtProImpromedAccNumVisable;
this.dgvTxtProCreateDate.Visible = DgvTxtProCreateDateVisable;
this.dgvTxtProConvRequired.Visible = DgvTxtProConvRequiredVisable;
this.dgvTxtProEdgeRequired.Visible = DgvTxtProEdgeRequiredVisable;
this.dgvTxtProStartDate.Visible = DgvTxtProStartDateVisable;
this.dgvTxtProHardwareRequired.Visible = DgvTxtProHardwareReqiredVisable;
this.dgvTxtProStandardDate.Visible = DgvTxtProStandardDateVisable;
this.dgvTxtProSystemScheduleDate.Visible = DgvTxtProSystemScheduleDateVisable;
this.dgvTxtProHwSystemCompleteDate.Visible = DgvTxtProHwSystemCompleteDateVisable;
this.dgvTxtProHardwareTechnician.Visible = DgvTxtProHardwareTechnicianVisable;
return new System.Windows.Forms.DataGridViewColumn[] {
this.dgvcTxtProAccount,
this.dgvTxtProImpromedAccNum,
this.dgvTxtProCreateDate,
this.dgvTxtProConvRequired,
this.dgvTxtProEdgeRequired,
this.dgvTxtProStartDate,
this.dgvTxtProHardwareRequired,
this.dgvTxtProStandardDate,
this.dgvTxtProSystemScheduleDate,
this.dgvTxtProHwSystemCompleteDate,
this.dgvTxtProHardwareTechnician,
this.dgvTxtCmnHold,
this.dgvTxtCmnConcern,
this.dgvTxtCmnAccuracyStatus,
this.dgvTxtCmnEconomicStatus,
this.dgvTxtCmnSoftwareStatus,
this.dgvTxtCmnServiceStatus,
this.dgvTxtCmnHardwareStatus,
this.dgvTxtCmnAncillaryStatus,
this.dgvTxtCmnFlowStatus,
this.dgvTxtCmnImpromedAccountNum,
this.dgvTxtCmnOpportunityId};
}
public DataGridViewColumn[] GetContractsColumns()
{
this.dgvTxtConAccount.Visible = this.DgvTxtConAccountVisable;
this.dgvTxtConAccuracyStatus.Visible = this.DgvTxtConAccuracyStatusVisable;
this.dgvTxtConCreateDate.Visible = this.DgvTxtConCreateDateVisable;
this.dgvTxtConEconomicStatus.Visible = this.DgvTxtConEconomicStatusVisable;
this.dgvTxtConHardwareStatus.Visible = this.DgvTxtConHardwareStatusVisable;
this.dgvTxtConImpromedAccNum.Visible = this.DgvTxtConImpromedAccNumVisable;
this.dgvTxtConServiceStatus.Visible = this.DgvTxtConServiceStatusVisable;
this.dgvTxtConSoftwareStatus.Visible = this.DgvTxtConSoftwareStatusVisable;
this.dgvCbxConPreProductionId.Visible = this.DgvCbxConPreProductionIdVisable;
this.dgvCbxConProductionId.Visible = this.DgvCbxConProductionVisable;
return new System.Windows.Forms.DataGridViewColumn[] {
this.dgvTxtConAccount,
this.dgvTxtConImpromedAccNum,
this.dgvTxtConCreateDate,
this.dgvTxtConAccuracyStatus,
this.dgvTxtConEconomicStatus,
this.dgvTxtConSoftwareStatus,
this.dgvTxtConServiceStatus,
this.dgvTxtConHardwareStatus,
this.dgvCbxConPreProductionId,
this.dgvCbxConProductionId,
this.dgvTxtCmnHold,
this.dgvTxtCmnConcern,
this.dgvTxtCmnAccuracyStatus,
this.dgvTxtCmnEconomicStatus,
this.dgvTxtCmnSoftwareStatus,
this.dgvTxtCmnServiceStatus,
this.dgvTxtCmnHardwareStatus,
this.dgvTxtCmnAncillaryStatus,
this.dgvTxtCmnFlowStatus,
this.dgvTxtCmnImpromedAccountNum,
this.dgvTxtCmnOpportunityId};
}
The issue is when I check a button the first time, everything shows up ok. I choose another view, everything is ok. But when I click on the first view the columns are out of order (it is like they are in reverse order but it is not exactly the same). this happens only to the first page you click on, the other two are fine. You can click off and click back on as many times as you want after those initial steps, The first list you selected at the start will be out of order the other two will be correct.
Any ideas on what could be causing this?
EDIT--
Things I have found so far:
ColumnDisplayIndexChanged fires many many times (over 200 times) when I view the first selection a second time. if the function does nothing it still loads the page, if i put a dialog box to show it fired (it was a lot of clicks) eventually i either get a big red X in the data grid view area or it loads fine (depending on the page, I get a X for pre-production but the other two loads fine (the message box still shows up hundreds of times) when you select them first)
My best guess is that this.XXX.Fill is changing the DisplayIndex value if the change is occuring after the column range creation function has returned. There are a few things you could consider however.
Create the range of columns once rather than each time a different view is selected.
Is memory an issue? If the datasets are not large and should not be large in the future you could fill 3 seperate containers and change the binding to a different container rather than refilling a single container everytime.
I think I would at the very least create the column ranges only once rather than each time.
Edit
private DataGridViewColumns[] PreProducitonColumns {get;set;}
private DataGridViewColumns[] ProductionColumns {get;set;}
private DataGridViewColumns[] ContractsColumns {get;set;}
private void Form_Load()
{
this.PreProducitonColumns = searchSettings.GetPreProductionColumns();
this.ProductionColumns = searchSettings.GetProductionColumns();
this.ContractsColumns = searchSettings.GetContractsColumns();
}
private void rbContracts_CheckedChanged(object sender, EventArgs e)
{
dgvContracts.Columns.Clear();
if (((RadioButton)sender).Checked == true)
{
if (sender == rbPreProduction)
{
dgvContracts.Columns.AddRange(PreProducitonColumns);
this.contractsBindingSource.DataMember = "Preproduction";
this.preproductionTableAdapter.Fill(this.searchDialogDataSet.Preproduction);
}
else if (sender == rbProduction)
{
dgvContracts.Columns.AddRange(ProductionColumns);
this.contractsBindingSource.DataMember = "Production";
this.productionTableAdapter.Fill(this.searchDialogDataSet.Production);
}
else if (sender == rbContracts)
{
dgvContracts.Columns.AddRange(ContractsColumns);
this.contractsBindingSource.DataMember = "Contracts";
this.contractsTableAdapter.Fill(this.searchDialogDataSet.Contracts);
}
}
}
I took the easy way out. I just created 3 DataGridView and set them visible based off of the radio button.