Telerik Forums
UI for WinForms Forum
54 answers
2.0K+ views

Hi Admins

Previously i was using Default DataGridView for populating a Table.

It was working fine. But due to advace Functionality of RadGridView, I have develop the same with Telerik Controls (R2 SP1 2019).

But i have some Performance Issues.

Check the Sample Code and please suggest me for Performance Enhancement.

I'm Creating Column at Run Time Using This Code and Setting Grid Properties.

this.radGridView1.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
this.radGridView1.ShowGroupPanel = false;
this.radGridView1.MasterTemplate.EnableGrouping = false;
this.radGridView1.EnableHotTracking = true;
this.radGridView1.MasterTemplate.SelectionMode = GridViewSelectionMode.FullRowSelect;
this.radGridView1.AllowAddNewRow = false;
this.radGridView1.AllowEditRow = false;
 
GridViewTextBoxColumn ColumnId = new GridViewTextBoxColumn
{
         Name = "suppid",
         HeaderText = "Code",
         FieldName = "suppid",
         Width = 80,
         HeaderTextAlignment = ContentAlignment.MiddleCenter,
         TextAlignment = ContentAlignment.MiddleCenter
     };
radGridView1.MasterTemplate.Columns.Add(ColumnId);

 

I'm creating 10 different Columns using the Above Code.

Using the Below Code loading the Data to GridView

DataTable dt = new DataTable();
string query = "Select suppid from p_supplier" ;
SqlCommand cmd = new SqlCommand(query, Conn);
SqlDataAdapter DA = new SqlDataAdapter(query, Conn);
DA.Fill(dt);
 
BindingSource source = new BindingSource();
source.DataSource = dt;
radGridView1.MasterTemplate.DataSource = source;

 

I have shown you only 1 Column only to shorten my Code.

Please Suggest.

Marc
Top achievements
Rank 1
Veteran
 answered on 17 Mar 2021
13 answers
1.0K+ views
hello,

I am using RadDropDownList and binding it in Code behind using a datatable. The issue is when the form loads the RadDropdownlist displays the first record in the list and this fires the selectedindexchanged.
I want the RadDropDownlist to be in the state where the user selects the item he wants from the list and then the selectedindexchanged event fires.

Any ideas?

Thanks
anshul
Top achievements
Rank 1
 answered on 17 Mar 2021
2 answers
100 views

Hello,

I just recently discovered that this tool was added to the Telerik win UI toolbox and love the functionality. Within the editor it is possible to assign a launch argument value. However, after reviewing the documentation I'm not entirely sure how to go about referencing that argument within the toast template, as well as passing in the value for that argument at run time.

I've attached a screenshot of what I'm trying to accomplish within the toast notification editor. Two questions:

1) What's the correct syntax to reference the launch argument variable value within the toast notification editor?

2) Is there a method to assign the variable value prior to calling the .ShowToastNotification(index) method?

 

Thanks!

Eric
Top achievements
Rank 1
 answered on 16 Mar 2021
10 answers
680 views
Hi

I am using RadGridView. In cell edit mode of a decimal column, I do not want the incerement and decrement in cell value. So I set the Step property to 0. It is working. Now by pressing the up and down key in cell edit mode do not change the cell value. But there is a problem if cell is empty and I press up key then first time it puts some value in the cell ( I think that value is some last inserted/updated value of the grid). Can you provide some solution for that.

Also I want that in cell edit mode when user presses up and down key, it commits the cell value and cursor moves to up and down cell accordingly. How can I acheive it. Any Help would be appreciated!

Thnaks

Regards
Nadya | Tech Support Engineer
Telerik team
 answered on 15 Mar 2021
5 answers
245 views

Hello,

my task was to enable zoom of GridView using mouse wheel + Ctrl key. I implemented it with partial success. I am not able to correctly resize some parts of the grid - see attached pic with red rectangles. I can provide a sample project. And a subquestion - is it possible to disable scrolling while the Ctrl Key is pressed?

Thanks in advance for help.

Tomáš

Tomáš
Top achievements
Rank 1
Iron
 answered on 15 Mar 2021
1 answer
97 views

Hi,

I want to call DesktopAlert as ShowDialog instead of show. if any solution available ?

 

Thanks

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 15 Mar 2021
2 answers
323 views

Hello Telerik,

How could I play with margin and padding to add some spacing between image, texte and certainly my checkboxe ?

Thank you in advance for your support !

Marco
Top achievements
Rank 2
Veteran
 answered on 12 Mar 2021
2 answers
109 views

I want to execute some code when a user types and then uses the Mouse to click on an item in the list.  

I will need to access the item selected.

 

I am having a hard time to find the correct event to capture this.

 

Thanks.

Nadya | Tech Support Engineer
Telerik team
 answered on 12 Mar 2021
2 answers
80 views

Hi.

As is known, Ctrl + A selects all cells in the spreadsheet. Can we change this to only select cells that are full?

özer
Top achievements
Rank 2
Veteran
Iron
 answered on 12 Mar 2021
3 answers
187 views

Hi,

I don't know if this is the correct forum for this question but I couldn't find an Excel export/import forum which might be more suitable.

I'm using GridViewSpreadStreamExport to export RadGridViews to Excel which works fine and I can open the generated spreadsheet in Excel without any issues.

The issue comes when I try to open/read the generated spreadsheet in code using OleDbCommand with the following connection string:

@"Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" + path + "; Extended Properties = " + @"""Excel 12.0 Xml;HDR=YES;IMEX=1"";";

I get an "External table is not in the expected format" error message on opening the connection.

If I first open the generated spreadsheet in Excel and just save it, without making any changes to it,the issue does not occur and I can open the spreadsheet in code without any issues.

The spreadsheet does have multiple worksheets, each one from a new instance of a RadGridView, but I don't think that is the issue because generating a spreadsheet with a single worksheet has the same issue.

The RadGridView is in memory, not on the UI, and I just set some of the column headers, width and text alignments.

Export format is SpreadStreamExportFormat.Xlsx and the export of individual RadGridViews are done via:

spreadStreamExport.RunExport(path, new SpreadStreamExportRenderer());

Although I have tried not creating a new instance of SpreadStreamExportRenderer as well.

I've reduced the export to its bare minimum (removed column header and text alignment settings) but nothing has helped.

Any ideas what the issue could be?

Thanks,

Arash

Dimitar
Telerik team
 answered on 12 Mar 2021
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
ComboBox and ListBox (obsolete as of Q2 2010)
ListView
Chart (obsolete as of Q1 2013)
Form
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
Menu
PropertyGrid
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
Diagram, DiagramRibbonBar, DiagramToolBox
GanttView
Panorama
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
CheckedDropDownList
Rotator
TrackBar
MessageBox
SpinEditor
StatusStrip
CheckedListBox
Wizard
ShapedForm
SyntaxEditor
TextBoxControl
LayoutControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
DataEntry
GroupBox
ScrollablePanel
WaitingBar
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
ColorBox
Callout
FilterView
PictureBox
VirtualKeyboard
NavigationView
Accessibility
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
Flyout
ToolbarForm
NotifyIcon
Rating
TimeSpanPicker
BarcodeView
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
+? more
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?