TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
s_manishkumar
NA
9
0
Datagrid autoresize -- from reflection
Jul 6 2004 4:50 PM
I've created a user control inherited from DataGrid which resizes each cell for its content to be readable upon resizing. The solution is (I get advised from another Windows Forms- Forum Q & A ) to rely on Reflection to get a reference to hidden method providing the number of data rows in the grid. In the next lines, cdgDataGrid refers to a System.Windows.Forms.DataGrid inherited control: Imports System.Refelction objMethodInfo = cdgDataGrid.GetType().GetMethod( "get_DataGridRows", BindingFlags.FlattenHierarchy | BindingFlags.IgnoreCase | BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static); The problem is, that it works fine when this code works over the control ( Windows form datagrid iteself ), but fails on the same call to the inherited control ( my inherited datagrid ): as soon as I try to build a control based on this code, the variable objMethodInfo remains empty after this call. Any advice or Solution ??
Reply
Answers (
0
)
ProgressBar
How to change the Form's Class Name????