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.
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!
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áš
Hi,
I want to call DesktopAlert as ShowDialog instead of show. if any solution available ?
Thanks
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 !
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.
Hi.
As is known, Ctrl + A selects all cells in the spreadsheet. Can we change this to only select cells that are full?
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