The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hello,
I have one question - how can I implement freezing of column(columns) in DataGrid - .NET . I want to imitate behaviour of freezing columns in for example Access, could you can help me.
Greetings.
FreeStyle557
If you mean not allowing the user to resize columns, see the message in the forum from a few days ago. Here's a link:
http://www.syncfusion.com/forums/message.asp?MessageID=6380
THthomasJune 3, 2004 10:45 AM UTC
i felt your pain. as an alternate solution:
Use 2 datagrids. one on the left which shows only the freeze columns. you will need to (for both) inherit from datagrid so you can override the protected GridVScroll event handler. In the event, call the base event, and then post the ScrollEventArgs via an event. Have the freezing grid register for those events. in that event handler, call it''s base.GridVScroll event, passing the original ScrollEventArgs as the second argument. Be sure to set the datasource of the frozen grid to the one on the right''s datasource (that way, tabbing around will also maintain row context.
it''s really easy to implement once you get it down, and although not beautiful, it''s functional.
===example from the scroll thrower=====
base.GridVScrolled(sender, se);
if(null != SrollingGridVScroll)
{
SrollingGridVScroll(sender, se);
}
======example from the scroll catcher(frozen)==
public virtual void VerticalScroll(object sender, ScrollEventArgs se)
{
base.GridVScrolled(sender, se);
}
//register VerticalScroll to handle the thrower''s VScroll event.
gooood luck.