Hi guys
I'm a total noob here! I have a question about this scenario.
I have UltraTabs (6 tabs in total). Each contains the text editors except they're bound to different columns in the sql table. Each text editor has a different name based on the tab its on. I looked at the sample project where you had this kind of setup whereby the ArrayList of the ComboEditor is set based on the OptionSet value selected. The problem I'm having is I have to refer to specific fields ON each tab for the description.
Here's some coding I used from your example. Please excuse any errors and feel free to correct me.
private void CreateDataSourcesForCombo() { #region ArrayList of Completion this.arrayListforCompletion = new ArrayList(3); this.arrayListforCompletion.Add(new Completion(2, supportingNameUltraTextEditor.Text + " and " + originalNameUltraTextEditor.Text + " at entry")); this.arrayListforCompletion.Add(new Completion(3, originalNameUltraTextEditor.Text + " only at entry")); this.arrayListforCompletion.Add(new Completion(6, "No Printing Required")); #endregion // ArrayList of Completion #region ArrayList of Batch this.arrayListforBatch = new ArrayList(6); this.arrayListforBatch.Add(new Batch(1, supportingNameUltraTextEditor.Text + " at entry, " + originalNameUltraTextEditor.Text + " at batching")); this.arrayListforBatch.Add(new Batch(2, supportingNameUltraTextEditor.Text + " and " + originalNameUltraTextEditor.Text + " at entry")); this.arrayListforBatch.Add(new Batch(3, originalNameUltraTextEditor.Text + " only at entry")); this.arrayListforBatch.Add(new Batch(4, supportingNameUltraTextEditor.Text + " and " + originalNameUltraTextEditor.Text + " at batching")); this.arrayListforBatch.Add(new Batch(5, originalNameUltraTextEditor.Text + " only at batching")); this.arrayListforBatch.Add(new Batch(6, "No Printing Required")); #endregion // ArrayList of Batch }
Obviously it's not inserting the TextEditor.Text part in the Combo.
Also, this is just for ONE of the tabs because of the TextEditor.Text names changing per tab.
I'm referring to the TextEditor.Text fields because I also use Validated on those fields if they are updated to change the description accordingly in the Combo.
Any suggestions?
Hello,
I am having difficulty understanding the issues you are having. Please provide a sample demonstrating the behavior and clarify the issue and steps to reproduce. Thanks.
Michael DiFilippoSoftware DeveloperInfragistics, Inc.
Since I can't give you a sample of the project I'm working on, I created a new project to recreate the issue. Weird enough it's working perfectly fine just the way it's supposed to. Don't know WHERE I went wrong but yeah. Will let you know if I run into any issues.
Sorry about that.
Thanks for following up. Hope it works out.
Thanks Michael. I found where I went wrong btw. Looks like it's working like expected except for one thing.
With the following code, how do I set the DataValue for each member as the OptionSet is linked to the database to get the selected value.
private void DataSource_online01UltraOptionSet() { // Create a lookup table to be used when the selected item in the UltraOptionSet // is changed. The name of the data source (the key) is used to get the data source // object to be bound to the UltraComboEditor. // this.dataSourcesHashTable = new Hashtable(); this.dataSourcesHashTable[Strings.ArrayListOfCompletion] = this.arrayListOfCompletion; this.dataSourcesHashTable[Strings.ArrayListOfBatch] = this.arrayListOfBatch; // Get a sorted list of the keys to be bound to the UltraOptionSet. // string[] dataSourceMode = new string[2]; this.dataSourcesHashTable.Keys.CopyTo(dataSourceMode, 0); Array.Sort(dataSourceMode); this.online01UltraOptionSet.DataSource = dataSourceMode; }
Or do I need to set it somewhere else?
Also, another question. In regard to the following code:
#region ArrayList of Completion this.arrayListOfCompletion = new ArrayList(3); this.arrayListOfCompletion.Add(new Completion(2, supportingNameUltraTextEditor.Text + " and " + originalNameUltraTextEditor.Text + " at entry")); this.arrayListOfCompletion.Add(new Completion(3, originalNameUltraTextEditor.Text + " only at entry")); this.arrayListOfCompletion.Add(new Completion(6, "No Printing Required")); #endregion // ArrayList of Completion #region ArrayList of Batch this.arrayListOfBatch = new ArrayList(6); this.arrayListOfBatch.Add(new Batch(1, supportingNameUltraTextEditor.Text + " at entry, " + originalNameUltraTextEditor.Text + " at batching")); this.arrayListOfBatch.Add(new Batch(2, supportingNameUltraTextEditor.Text + " and " + originalNameUltraTextEditor.Text + " at entry")); this.arrayListOfBatch.Add(new Batch(3, originalNameUltraTextEditor.Text + " only at entry")); this.arrayListOfBatch.Add(new Batch(4, supportingNameUltraTextEditor.Text + " and " + originalNameUltraTextEditor.Text + " at batching")); this.arrayListOfBatch.Add(new Batch(5, originalNameUltraTextEditor.Text + " only at batching")); this.arrayListOfBatch.Add(new Batch(6, "No Printing Required")); #endregion // ArrayList of Batch
Whenever the text on either of the two text boxes is update/changed, how would I now have the change reflect on validated since it's part of the array? I used to use the textbox validated event but obviously I cannot use that now.
The two textboxes in question is: supportingNameUltraTextEditor.Text and originalNameUltraTextEditor.Text