fadi Posted February 26, 2004 Posted February 26, 2004 hello all, i have a class that inherits from DataGrid, to use my class i place on the form a usual datagrid, then go to the declaration and replace the datagrid declaration with my class's declaration. the question is that how can i use my class as a control in the toolbox so that i supress the step of going into the code and changing the declaration. i know i can create a windows control project but this way i should create properties to expose the datagrid's properties to the outside thanks alot Quote
Administrators PlausiblyDamp Posted February 26, 2004 Administrators Posted February 26, 2004 Do as you suggested - create a Windows control library that contains your class. This could then be added to the toolbar. Is there a particular reason you can't do it that way? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
fadi Posted February 26, 2004 Author Posted February 26, 2004 because then i should create properties to expose the datagrid's properties and objects to the client. as an example i need to create a property Datagridstyle to set the datagridstyle Quote
Administrators PlausiblyDamp Posted February 26, 2004 Administrators Posted February 26, 2004 If you are inheriting the DataGrid you should automatically get all it's properties. You will only need to do that for your own properties - how are you doing them currently? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
fadi Posted February 26, 2004 Author Posted February 26, 2004 i'm inheriting the datagrid in a class, i dont have any own properties, what i want to reach is a datagrid control customized for me (ex the usual datagrid contains only textboxcolumn, boolean column but doesnt contain combobox column,datetimepicker column etc.. my datagrid should contain such functionality) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.