Telerik Forums
UI for WinForms Forum
4 answers
460 views
Hello!
I am using a gridview like this:

   
private void LoadGrid()
{
    DataTable dataTable = new DataTable();
    DataColumn itemIdColumn = new DataColumn("ItemId", typeof(int));
    DataColumn itemCodeColumn = new DataColumn("ItemCode", typeof(string));
    DataColumn itemNameColumn = new DataColumn("ItemName", typeof(string));
    DataColumn sellPriceColumn = new DataColumn("SellPrice", typeof(decimal));
    DataColumn vatValueColumn = new DataColumn("VatValue", typeof(decimal));
    DataColumn itemTypeColumn = new DataColumn("ItemType", typeof(int));
 
    dataTable.Columns.Add(itemCodeColumn);
    dataTable.Columns.Add(itemNameColumn);
    dataTable.Columns.Add(sellPriceColumn);
    dataTable.Columns.Add(vatValueColumn);           
    dataTable.Columns.Add(itemTypeColumn);
    dataTable.Columns.Add(itemIdColumn);
 
 
    dataTable.BeginLoadData();
    var lst = _relatedItemBc.GetItemsForMainGrid(FilteredItem);
    for (int i = 0; i < lst.Count; i++)
    {
        DataRow row = dataTable.NewRow();
        row["ItemCode"] = lst[i].ItemCode;
        row["ItemName"] = lst[i].ItemName;
        row["SellPrice"] = lst[i].SellPrice;
        row["VatValue"] = lst[i].VATValue;
        row["ItemType"] = lst[i].ItemType;
        row["ItemId"] = lst[i].ItemID;
        dataTable.Rows.Add(row);
    }
    dataTable.EndLoadData();
 
    rbcDataGridViewMain.MasterTemplate.BeginUpdate();
    rbcDataGridViewMain.DataSource = dataTable;
    rbcDataGridViewMain.MasterTemplate.EndUpdate();
}

How can i get the informations for the current row, the row i have selected?

Thank you!
Anton
Telerik team
 answered on 19 Dec 2012
3 answers
167 views
Hi There,

I have a combobox column in a gridview, the combobox has a datasource set to a list of objects returned from my database. One of these items in this datasource is an "Other" item. I am looking for a way so that when a user clicks "Other" as the selected item the combobox can be edited and a new value inserted into the datasource.

Can anyone offer any advice on the best way to do this?

Many Thanks For The Suggestions/Help?
Ivan Petrov
Telerik team
 answered on 19 Dec 2012
1 answer
464 views
We are having two different issues with exporting using the Export To ExcelML.

First I'll show the code that we're using:

Me.RadGridView1.Columns("Date").ExcelExportType = DisplayFormatType.Custom           
Me.RadGridView1.Columns("Date").ExcelExportFormatString = " mm/dd/yyyy "           
Dim exporter As Export.ExportToExcelML = New Export.ExportToExcelML(Me.RadGridView1)           
exporter.FileExtension =
"xls"        
exporter.HiddenColumnOption = HiddenOption.DoNotExport            
exporter.ExportVisualSettings =
True         
exporter.RunExport(fileName)


The first issue. In the database we have the Date column as a DateTime datatype.  I have the Custom ExcelExportType set to only show "mm/dd/yyyy"  When it exports it will show up with that format - but the data still has the time included with it.  We need it to only export the date, not the time.


The second issue comes from trying to open the exported file.  Every time we try to open the .xls file, a warning comes up
"The file that you are trying to open, 'Filename.xls' is in a different format than specified by the file extension"
Everything still worked after that - but it is a little annoying have to go through that each time.

Please let me know of any suggestions.

Thanks.
Ivan Petrov
Telerik team
 answered on 19 Dec 2012
2 answers
133 views
Hi;

How I Can change backgroudcolor and fore color when enable = false in a RadDropDownList? text contrast with the background is very bad.

regards.
Andrés
Top achievements
Rank 1
 answered on 19 Dec 2012
2 answers
150 views
Hi,

Creating columns in manual way (using designer) make them only visible in Designer.cs file, because declaration is in InitializeComponent() function.
How to avoid that, so for example ill able to call cell value like that:
GridView.Rows[4].Cells[myColumn.name].Value
konrad
Top achievements
Rank 1
 answered on 19 Dec 2012
2 answers
138 views
Hello I need help to format the special rows of the grid. I send a picture to you to be an example of what we need.
I also need to know how we can delete groups that meet a certain condition to not display (neither the group nor its component rows). For example I want not see groups with Total Group Sum less than 1000.
Jack
Telerik team
 answered on 18 Dec 2012
6 answers
269 views
When my users are changing the hour in the time picker by typing in the numbers, they would like to be able to navigate to minutes when they press the tab key.

The desired functionality happens when they press the arrow right key, but they would like it to happen for the tab key as well.
I could not figure out how to make this happen. I tried looking in properties and I tried to intercept the tab key on all of the key events, but the tab key would not fire any key events before it went to the next control.
Peter
Telerik team
 answered on 18 Dec 2012
1 answer
154 views
when I want to load a form for first time, it gets so much time to loaded. How can I accelerate form loading?
Plamen
Telerik team
 answered on 18 Dec 2012
3 answers
206 views
Hi,

I'm trying to learn more about the metro style and and panorama using the demohub apps example. My question is: how are the margins set when the different controls load after clicking on the tiles such as "Gridview" example. I have created my own control and loading it from the main tile screen, however I would like for the control to fill all the white space below the header.

Any pointers would be greatly appriciated!

Thanks,
Ronny
Ivan Todorov
Telerik team
 answered on 18 Dec 2012
1 answer
129 views
With RadGridView, Is there a way to set the ToolTipText value for a certain cell immediately after adding a row? For example:

int rowIndex = RadGridView1.Rows.Add("column1Text", "column2Text", "Column3Text");
 
RadGridView1.Rows[rowIndex].Cells["FirstColumn"].?? (ToolTipText property) = "ToolTipValue";

Is there any way to set the ToolTipText property for a certain cell of that row?

Thanks,
--Jason
Anton
Telerik team
 answered on 18 Dec 2012
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)
Form
Chart (obsolete as of Q1 2013)
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
PdfViewer and PdfViewerNavigator
CommandBar
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
Label
AutoCompleteBox
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
Wizard
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
WaitingBar
GroupBox
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
NavigationView
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
TreeMap
StepProgressBar
SplashScreen
Flyout
Separator
SparkLine
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
SmartPasteButton
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?