 |
|
 |
Any Help.. How can i perform a calculation in crystal report based on a value in another field
|
|
|
|
 |
|
 |
Very gr8 article on multi column combobox. Can anyone help me with adding a new header for columns visible on suggestion.
|
|
|
|
 |
|
|
 |
|
 |
Hello,
I found and fixed an issue in the selection of an item.
When you programmatically select an index like:
this.ccbox.SelectedIndex = 3;
in the Text of the box nothing is shown.
Here the code to fix it:
public override int SelectedIndex
{
get
{
return m_iSelectedIndex;
}
set
{
if (value >=0 && value < m_dvView.Count)
this.Text = m_dvView[value].Row[this.ViewColumn].ToString();
m_iSelectedIndex = value;
base.SelectedIndex = value;
base.OnSelectedIndexChanged(new EventArgs());
}
}
|
|
|
|
 |
|
|
 |
|
 |
Hi, I am testing this controt but I can't display the Columns Name on the top.
Thanks
Nelio
|
|
|
|
 |
|
 |
can anyone help me use this class in datagridview.
thanks in advance.
|
|
|
|
 |
|
 |
How could I adjust the columncombobox to display column headers?
arevans
|
|
|
|
 |
|
 |
I have changed the code to display column headers.
However this only works well if you set it so that the first row displays the header.
Achieving a fixed header that does not disappear when you scroll is my objective.
The main issue is knowing which item is at the top of the list at any given instant of time.
(So that you can double the row height and draw the header over the top.)
I have not found a way of achievng this yet.
The other approach would be to get each column to display its header with the items underneith, there seems to be no property available for this
Any ideas would be appreciated.
Ewan
|
|
|
|
 |
|
 |
hello, I have 2 values in combobox.
example: myDataRow[dc.ColumnName] = "Row: " + index + " Column: " + iCol;
How I get only the value of the second column in the row ?
for example I want to receve only the value of " Column: " + iCol
thanks
|
|
|
|
 |
|
 |
Hi,
My form is set to RTL and when I select the item from dropdown it is displayed correctly in the combobox.
How can I setup so the items displayed in the dropdown will be also RTL?
Thank you!
|
|
|
|
 |
|
 |
You are wanting it to display right to left correct?
Try playing with the e.Graphics.DrawString line (line 245 in the verion of the code I have)in OnDrawItem(). The DrawString function has options for right to left string drawing.
|
|
|
|
 |
|
 |
Hi,
First of all thank you very much for your reply, but I am still having some troubles.
I have found this overload for the function DrawString.
DrawString(drawString, drawFont, drawBrush, drawRect, drawFormat);
I have declared the following variable with those properties:
StringFormat drawFormat = new StringFormat();
drawFormat.Alignment = StringAlignment.Center;
drawFormat.FormatFlags = StringFormatFlags.DirectionRightToLeft;
But I am still getting the same result. ( Left to Right )
|
|
|
|
 |
|
 |
Sorry, I'm not much help with getting RTL working. Try this:
drawFormat.Alignment = StringAlignment.Right;
You may also have to use one of the DrawString overloads that has a rectangle as a parameter so it knows where to draw at.
|
|
|
|
 |
|
 |
I have found this a useful control, for a similar application where I am porting over MS Access forms.
I have a problem though, where one of my tables isn't sorted correctly in the underlying DataTable.
Using the SortBy method on your control displays the data correctly, however when retrieving the selected item, it gets the index from the original table index rather than the sorted value!
eg if I select the 5th item in the ColumnComboBox (sorted), it gets the 5th row from the DataTable.
|
|
|
|
 |
|
 |
Death to Access!
What property or function are you using to get the selected item?
Internally this control sorts using a DataView. So if you were to just use the SelectedIndex against your DataTable after the sorting changed, there is a good chance it would be wrong. If I understand your problem correctly you may want to try using the Items property which return the internal DataView and using the SelectedIndex against that.
Here is some abbreviated code...
ColumnComboBox ccb = new ColumnComboBox;
//set the Data
//set some view columns
ccb.SortBy("blah" "DESC");
//select something
//Try this to get the correct DataRow
DataRow dr = ccb.Items[SelectedIndex].Row;
If that isn't it show me what you are doing and I'll make another stab at it.
|
|
|
|
 |
|
 |
This method of access fixes my problem.
The way I was retrieving the record was by:
string s = ccb["ColName"].ToString();
|
|
|
|
 |
|
 |
Also, see the question below about not being able to use the SelectedItem or the SelectedValue properties.
|
|
|
|
 |
|
 |
i write
DataSet ds=Query ("Select * FROM JobCode ");
comboJobCode.Data =ds.Tables [0];
comboJobCode.ViewColumn = 1;
//Set a few columns to not be shown
comboJobCode.Columns[0].Display = true;
comboJobCode.Columns[5].Display = false;
comboJobCode.SelectedValue =7;// doesnt work
Regards,
Salah Hussein
|
|
|
|
 |
|
 |
Sorry I didn't see this until today. Hotmail has been throwing away CodeProject stuff and I missed your message.
The ComboBox doesn't allow you to override the SelectedValue or SelectedItem property which is the cause of the problem. If you have to be able to use one of these try making versions of the needed properties with the "new" designation.
|
|
|
|
 |
|
 |
Nice combo, only two questions:
I have noticed that when the combo drops when autocompleting the mouse pointer dissapears, any idea on how to solve this?
The second, it would be possible highlighting the autoselected item in the list?
I have searched the web and I can't find the way to highlight programmatically an item of a combobox.
Thanks.
|
|
|
|
 |
|
 |
I'm not quite sure what to do with the mouse pointer dissappearing. I have noticed it before though in this control and other windows controls.
As for highlighting the selected item adjust the code in OnDrawItem() so it draws the selected item you want. It might be worth mentioning that the ComboBox in .net 2.0 does some auto completion and if you are going to be doing the drawing yourself it might be worth using the new ComboBox.
|
|
|
|
 |
|
 |
This problem can be resolved by changing timing in which the function is called from OnTextChanged to OnKeyDown event.
Thanks,
|
|
|
|
 |
|
 |
yeah, this resolve the mouse pointer problem, but make a other one with the auto complete.
where is a other solution?
|
|
|
|
 |
|
 |
Hi there.
This control is just what i am looking for. But i can't test it, because i can find it in my toolbox. (using vs2005).
I have added the project to my solution and adden the project as a referance.
In my toolbox i can se the "MultiColumnComboSuggestionBox", but no controls in the group.
Any ideas on how i can get this thing to work ?
Thanks.
Lars E.
|
|
|
|
 |