or
public class MyFADatePickerCol: GridViewDateTimeColumn{ public override Type GetDefaultEditorType() { // return the type of your editor here FADatePicker f=new FADatePciker;
returtn f.GetType(); }
public MyFADatePickerCol():base("Col1")
{
}
}
MyFADatePickerCol mycol=new MyFADatePickerCol();
radGridView1.Columns.Add(mycol);
But FADatePicker does not appear in the Grid.
I Also want to have a textboxcolumn which has an ellipsis button '...' inside it. Please send the code to me.
Please help me.
Hello,
well I hope you understand my bad english...
We have migrated our RadControl Suite for WinForms from Q1-2010 to Q2-2010.
Under Q1 we implement a application, using the Office2007Black Theme. After the upgrade of our source to the Q2-Controls, the "Style" of the Office2007Black Theme is diffrent to the Q1-Version. We suspect, you changed the global Style. For example the document buttons in the document- or toolWindow are diffrent (screenshot from old theme). Well our useres love the "old" Black Style :-)
Is there a way of, to use the the old Telerik.WinControls.Themes.Office2007Black.dll in Q2, or it is possible to extract the Style to xml, for using in the new StyleBuilder?
Thanks, and greeting form germany
Andreas
gridView_Resize() event so it would call FillWidth() when there is a resize event. Where ever in your code when you show the grid the first time, just call to FillWidth() so it would look right in the case that that gridView_Resize() event does not fire.public void FillWidth(){ if (gridView.ColumnCount == 0) return; var width = CalcColumnsWidth(); if (width < gridView.ClientSize.Width) { // get the remain empty space in grid width = gridView.ClientSize.Width - width; int extraWidthPerColumn = width / gridView.ColumnCount; int i, limit = gridView.ColumnCount - 1; // stop before the last column for (i = 0; i < limit; i++) { if (gridView.Columns[i].MaxWidth > 0 && gridView.Columns[i].Width + extraWidthPerColumn > gridView.Columns[i].MaxWidth) { // do calculation before we lost the original width width -= (gridView.Columns[i].MaxWidth - gridView.Columns[i].Width); gridView.Columns[i].Width = gridView.Columns[i].MaxWidth; } else { gridView.Columns[i].Width += extraWidthPerColumn; width -= extraWidthPerColumn; } } // the last column get any remaining width gridView.Columns[i].Width += width; // This only add to the last column //gridView.Columns[gridView.ColumnCount - 1].Width += gridView.ClientSize.Width - width; }}private int CalcColumnsWidth(){ int width = 0; foreach (var column in gridView.Columns) width += column.Width; return width + gridView.ColumnCount + 15; //take into the vertical lines between columns and vertical scrollbar}private void gridView_Resize(object sender, EventArgs e){ gridView.MasterTemplate.BestFitColumns(); FillWidth();}