Telerik Forums
UI for WinForms Forum
5 answers
258 views
hi,
I'm trying to bind data table to gridview without any success.

My gridview contains a few columns like Date (DateTimeColumn),  Name (TextBoxColumn),  User: (ComboColumn)...

when i read my data from server to dataTable its contains (iDate, iName, iUser, and a few more columns,  more than the gridview contains)  
and as you can see the names of columns are differents.

In that case,   how can i bind the dataTable to gridview??   

Best regards,
Roy
Roy
Top achievements
Rank 1
 answered on 19 Feb 2014
8 answers
189 views
It's a control on ASP.NET, will it be available for Winforms at some point?
kultman
Top achievements
Rank 2
 answered on 19 Feb 2014
1 answer
102 views
Using the VisualStudio2012Light theme when a property is edited in the property grid the row stays highlighted after the edit.  Then if you scroll that item out of view and scroll back to it then the highlight will go away.
George
Telerik team
 answered on 18 Feb 2014
1 answer
218 views
I have a column that is created programmatically and is set to a complex data type.  I need the data type to be complex because I need to override the CompareTo method.  I also want to be able to use textual filtering on this column, via the ToString() method of my type.  When I try to filter on this column, a ParserException is thrown and my program crashes.

consider the following example:

class MyCellType
{
      public string myName;
      public string myParentName;

      public override string ToString()
      {
            return myName;
      }

      public int CompareTo(Object obj)
      {
            //my compare function which sorts children underneath their parents...
            if ( myParentName == ((MyCellType)obj)myParentName )
            {
                 return String.Compare(myName, ((MyCellType)obj)myName);
            }
            else
            {
                return String.Compare(myParentName , ((AdminUnitCell)obj).myParentName );
            }
      }
}


//... code that initializes the grid and a data table

GridViewTextBoxColumn column = new GridViewTextBoxColumn();
column.Name = "MyColumn";
column.HeaderText = "MyColumn";
column.FieldName = "MyColumn";
column.DataType = typeof(MyCellType);
myGrid.MasterTemplate.Columns.Add(column);

myDataTable.Columns.Add("Title", typeof(MyCellType));

//...

myGrid.DataSource = myDataTable;

I looked for a solution to this problem but I could not find a definite answer.  Is textual filtering possible on a complex data type via its ToString() method? If not, then can we get this feature (bug fix) in a future release?   I find it difficult to believe that no has ever had a column with a complex data type on a filter-enabled grid and thus experienced the same crash that I am getting.

Any help would be appreciated.
George
Telerik team
 answered on 18 Feb 2014
1 answer
71 views
Recently the Telerik Academy held a free Front-end development course, It included an in depth tutorial on HTML, CSS, Javascript and working with CMS. It will include lectures on sth
Stefan
Telerik team
 answered on 18 Feb 2014
1 answer
154 views
  RadTreeNode node = new RadTreeNode();
                rdTvSearch.Nodes.Clear();
                string url = string.Empty;
                foreach (DataRow row in MyDataTable.Rows)
                {// and this check if send a PID , or a parent id to make fileration.
                    // if (row["ParentID"] == DBNull.Value || parentid != null) //That the regular case when loading the tree with the Level one parent , that dunt has any parent.
                    //{
                    if (row["IsChild"].ToString() == "True")
                    { node.Image = TechTouch_Point.Properties.Resources.file2; }
                    else
                    { node.Image = TechTouch_Point.Properties.Resources.folder1 ; }
                    node = new RadTreeNode(row["NameArabic"].ToString() + ' ' + "_" + ' ' + row["Number"].ToString(), row["ID"].ToString());
                    node.Attributes.Add("number", row["Number"].ToString());

                 //   node.ExpandMode = TreeNodeExpandMode.ServerSideCallBack;
                    node.Expanded = true;
                    node.Attributes.Add("name", row["NameArabic"].ToString());
                    node.Attributes.Add("child", row["IsChild"].ToString());
                    node.Attributes.Add("treenameid", treenameId.ToString());
                    
                    rdTvSearch.Nodes.Add(node);
Stefan
Telerik team
 answered on 18 Feb 2014
18 answers
880 views
Hi,

I have MutliComboBoxColumn in grids and I need to adjust widths of this combo columns (displayed when I drop down combo). I failed to find any way how to do this from designer or code. Is there any way how to alter columns of this in-grid combo? Thx

Daniel
Peter
Top achievements
Rank 1
 answered on 18 Feb 2014
2 answers
261 views
Hi,

I am upgrading all controls of my C# winform app to Telerik. I couldn't find drawitem event in RadDropDownList.

Here is the code of combobox drawitem event:

private void cbMyCompanyList_DrawItem(object sender, DrawItemEventArgs e)
{
 
e.DrawBackground();

DataRowView drv = (DataRowView)(cbMyCompanyList.Items[e.Index]);

int CoID = (int)(drv["CompanyID"]);
string CoNum = (string)(drv["CompanyName"].ToString());

...........

using (SolidBrush sb = new SolidBrush(e.ForeColor))
 {
      e.Graphics.DrawString(..., e.Font, ..., ...);
 }
}

How could I translate this to Telerik?

Thanks in advance!!

George
Telerik team
 answered on 17 Feb 2014
1 answer
261 views
Is it possible to get the name of the printer that the user selected when printing a PDF document using the RadPdfViewer?

Thanks in advance
Dimitar
Telerik team
 answered on 17 Feb 2014
1 answer
235 views
I have some questions about the RadRichTextBox.

How do I data bind the content of the RadRichTextBox to a datatable, and how could this be accomplished?

What is the most appropriate field type in an sql database for the content to be stored in?

If I cannot data bind to a datatable then how can this functionality be created?

Thanks in advance
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 14 Feb 2014
Narrow your results
Selected tags
Tags
GridView
General Discussions
Scheduler and Reminder
Treeview
Dock
RibbonBar
Themes and Visual Style Builder
ChartView
Calendar, DateTimePicker, TimePicker and Clock
DropDownList
Buttons, RadioButton, CheckBox, etc
ListView
ComboBox and ListBox (obsolete as of Q2 2010)
Chart (obsolete as of Q1 2013)
Form
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
PropertyGrid
Menu
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
Tabstrip (obsolete as of Q2 2010)
MaskedEditBox
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
TrackBar
MessageBox
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
Barcode
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Licensing
Localization
TimePicker
ButtonTextBox
FontDropDownList
BarcodeView
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
DateOnlyPicker
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?