Hi Everyone,
I would like to know whether we can display e,g, Full Name , thats is " [first_name] + " "+ [surname]" as the display text?
I have set the combo's DataSource and DataMember as the [first_name]. But I need to display first name and surname as the Full name for the combo values.
e.g.
Ann Smith
David Brown
Mary Cornell
ultraGridColumn.Formula = "[surname] & \", \" & [first_name]";
Any suggestions?? Urgent!
Thanks in Advance.
NW
I really don't know why this is not working. The only reason that I can think of why this would not work is if you are setting the Value and / or text before the control has populated. If that's not the case, then I am not sure.
You should try duplicating this in a small sample project and Submit an incident to Infragistics Developer Support.
This is a Standalone UltraCombo and im NOT using the UltraGrid. The ultraGridBand1 is automatically added when added a Unbound Column as "Full Name" (which is shown above) and Hide all the other columns and show only Full Name. The full names are loadded nicely to the comobo. BUT only problem is it does not set the VALUE ("John Smith") i wanted when first loading up!!!!!
The following code shows hows it addded.
Infragistics.Win.UltraWinGrid.UltraGridBand ultraGridBand1 = new Infragistics.Win.UltraWinGrid.UltraGridBand("operator", -1);
ultraGridBand1.ColHeadersVisible = false;
ultraGridColumn1,
ultraGridColumn2,
ultraGridColumn3,
ultraGridColumn4,
ultraGridColumn5,
ultraGridColumn6,
---------,
----------,
ultraGridColumn25}); // <---- this is the Full name column, and all the other columns hidden
ultraGridBand1.UseRowLayout = true;
this.ucMsgSentTo.DisplayLayout.BandsSerializer.Add(ultraGridBand1);
********* Please refer the above reply for the other coding *****************
It makes me crazy even if i set the exact values
ucMsgSentTo.Value = "johns",
ucMsgSentTo.Text = "John Smith",
It sets to BLANK!!!! Please help me . URRRRGENT HELP NEEEDED!!!
Okay, is this a standalone UltraCombo or are you using it in a grid? I thought it was a standalone combo control because you are setting the Value property of the UltraCombo. But if you are using this in a grid, then the Value of the Combo is not used. That would not make sense, since the Combo only has one Value and the grid has multiple cells in the column. If this is in a grid, you need to set the Value of the grid cell, not the UltraCombo.
HI Mike,
Thanks alot for your reply.
Well what I meant by recipient is, it returns the same values as the oper_name. e.g. recipient = oper_name = "johns".
So even if I hardcode the value as ucMsgSentTo.Value = "johns" (Since ucMsgSentTo.ValueMamber = "oper_name") it wont show the "John Smith" value when it is loaded. Combo value will be set to null. And it will show the blank text when loaded. I tried to set ucMsgSentTo.Value = "John Smith", that doesnt work either :'((
==========================================================================================================
Here are the Column properties for your reference:
Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn25 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("full_name", 0);
ultraGridColumn25.Formula = "[first_name] & \" \" & [surname]";
ultraGridColumn25.Header.VisiblePosition = 24;
ultraGridColumn1,--------------,----------------, ultraGridColumn25});
Combo Properties
this.ucMsgSentTo.DisplayStyle = Infragistics.Win.EmbeddableElementDisplayStyle.Default;
this.ucMsgSentTo.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.ucMsgSentTo.Name = "ucMsgSentTo";
this.ucMsgSentTo.Size = new System.Drawing.Size(190, 22);
this.ucMsgSentTo.InitializeLayout += new Infragistics.Win.UltraWinGrid.InitializeLayoutEventHandler(this.ucMsgSentTo_InitializeLayout);
I did what you told about having the code in InitializeLayout as well. Please let me know what would be the problem with this coding.
Regards,