I've added an Unbound column to grid for adding combo control in it. I tried to add UltraDropDown/UltraCombo both through code and at design time but it doesn't show in grid. I tried both with EditorComponent and ValueList properties. Although it's not giving any error but it doesn't show up in grid.If I replace this UltraCombo with check box it works perfect both at design and run time.
The DataType of the back end doesn't matter. It only matters what data type DotNet is using.
Check the column.DataType of the grid column and compare that to the DataType of the column.DataType of the column in the dropdown.
Hi Sir,
You're right. It's UltraWinGrid only. It's .net based windows application. I just checked, in the database, the datatype of this column is "VARCHAR2", although in the grid, I am using String. What corresponding data type for grid should be there for VARCHAR2?
Thanks,
Harshit
I'm tempted to think you might be using UltraWebGrid, instead of UltraWinGrid - but you are posting in the WinForms forum and the code you posted sure looks like UltraWinGrid code.
Hi Harshit,
Just to be clear... you are using the Windorms Forms UltraGrid and UltraDropDown in an ASP.Net application? That doesn't make sense. As far as I know, it's not possible to use a Winforms control in an ASP.Net application. So I have to assume that you are just using the wrong terminology here. Or else you are using some kind of bridge or other technology I've never heard of it. If the latter, then that's not really something we can support.
There's nothing necessarily wrong with using the same field as both ValueMember and DisplayMember. Although, in such a case, you would not even need to set the DisplayMember. In fact, since you only have one column, both the ValueMember and DisplayMember will both default to the column. The only weird part about that would be that the grid column's DataType has to match the ValueMember field. I doubt that's relevant to the issue of the DropDown showing blanks, though.
If your dropdown has rows, then presumably it is getting something from the data source. It must be getting the rows but for something reason, it is either unable to get the cell values or unable to draw them. At this point, I have to think it's something to do with the environment you are using - whatever that is. But frankly, I'm at a loss because I'm really confused about what you are doing and what environment you are using.
Sorry for the confusion.
I am working on a windows application targeting ASP .NET 2.0 framework. I am using C# language. The data that I am fetching from the database contains the values of a single column of a certain table and I am storing this data in a dataTable. I have assigned the dataSource of my UltraDropDown as this dataTable. I have tried debugging as well and can confirm you that the data is being fetched correctly into the dataSource of my dropdown. In the screen, in the grid, I can see the column with dropdown button. On clicking the dropdown arrow, I get a box with no values but a scroller. When I go down with scroller, It shows me the values corresponding to the position of scroller in sort of mousehover style. Maybe that is the property of ultradropdown but it shows me the values in the same way as when we scroll down to our contact list in our cell phone, we see alphabets corresponding to the scroller's position. I do not know the exact technical term for this functionality but I hope you get the point. I have tried using BindingContext as well but id didn't work. It's like the values are there but they are just not visible. Below is the code :-
BindingContext bc = new System.Windows.Forms.BindingContext();
uddClini_bud_id.BindingContext = bc;
uddClini_bud_id.DataSource = Lookup.ClinicalBudIdMapping.ClinicalBudIdMappingDt;
uddClini_bud_id.ValueMember = "BUD_ID";
uddClini_bud_id.DisplayMember = "BUD_ID";
uddClini_bud_id.DropDownWidth = 250;
uddClini_bud_id.DisplayMember.StartsWith("BUD_ID", true, null);
uddClini_bud_id.DisplayLayout.Bands[0].Columns["BUD_ID"].Hidden = true;
uddClini_bud_id.DisplayLayout.Bands[0].Columns["BUD_ID"].Width = e.Layout.Bands[1].Columns["CLIN_BUDGET_ID"].Width + 270;
e.Layout.Bands[1].Columns["CLIN_BUDGET_ID"].ValueList = uddClini_bud_id;
e.Layout.Bands[1].Columns["CLIN_BUDGET_ID"].ValueList.ShouldDisplayText.Equals(true);
//e.Layout.Bands[1].Columns["CLIN_BUDGET_ID"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList;
e.Layout.Bands[1].Columns["CLIN_BUDGET_ID"].FilterEvaluationTrigger = FilterEvaluationTrigger.OnEnterKeyOrLeaveCell;
e.Layout.Bands[1].Columns["CLIN_BUDGET_ID"].FilterOperandStyle = FilterOperandStyle.DropDownList;
e.Layout.Bands[1].Columns["CLIN_BUDGET_ID"].FilterOperandStyle = FilterOperandStyle.Edit;
Is it because I am using the same column name (BUD_ID) as Display member and value member?
In Addition to this, I want the default selected value from the dropdown to be auto-populated corresponding to a value present in an ultratext editor in the same form. For this, I tried the below code, but it did not work :-
//e.Layout.Bands[1].Columns["CLIN_BUDGET_ID"].DefaultCellValue.Equals(uteBindBudId.Text);
I hope this time the issues is little bit more clarified.
Thank you for all your help.