We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Readonly cell while paste

Thread ID:

Created:

Updated:

Platform:

Replies:

24671 Feb 9,2005 03:11 AM Feb 10,2005 06:46 PM Windows Forms 3
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On February 9, 2005 03:11 AM

Hi, my first 2 columns of the DataBoundGrid are readonly. when i insert new rows and try to copy using the below command it says can not set the column value this.m_ListingGrid.Model.CutPaste.Paste(); i have set the IgnoreReadOnly property but this works just once next time again it throws the same error. m_ListingGrid.Model.IgnoreReadOnly = true; Is there any other way that i can make those cells writable during insert paste and other time just readonly

Administrator [Syncfusion]
Replied On February 9, 2005 07:34 AM

Hi, try this: bool inPaste = false; private void gridControl1_ClipboardPaste(object sender, GridCutPasteEventArgs e) { if (inPaste) return; inPaste = true; gridControl1.Model.IgnoreReadOnly = true; gridControl1.Model.CutPaste.Paste(); e.Handled = true; gridControl1.Model.IgnoreReadOnly = false; inPaste = false; } Stefan >Hi, >my first 2 columns of the DataBoundGrid are readonly. >when i insert new rows and try to copy using the >below command it says can not set the column value >this.m_ListingGrid.Model.CutPaste.Paste(); > >i have set the IgnoreReadOnly property but this works just once next time again it throws the same error. >m_ListingGrid.Model.IgnoreReadOnly = true; > >Is there any other way that i can make those cells writable during insert paste and other time just readonly > > >

Administrator [Syncfusion]
Replied On February 9, 2005 11:08 PM

Now also i m getting the same error cannot set the column. regards Pratiksha >Hi, > >try this: > > > > >bool inPaste = false; > >private void gridControl1_ClipboardPaste(object sender, GridCutPasteEventArgs e) >{ > if (inPaste) > return; > > inPaste = true; > gridControl1.Model.IgnoreReadOnly = true; > gridControl1.Model.CutPaste.Paste(); >e.Handled = true; > gridControl1.Model.IgnoreReadOnly = false; > inPaste = false; >} > > >Stefan > > >>Hi, >>my first 2 columns of the DataBoundGrid are readonly. >>when i insert new rows and try to copy using the >>below command it says can not set the column value >>this.m_ListingGrid.Model.CutPaste.Paste(); >> >>i have set the IgnoreReadOnly property but this works just once next time again it throws the same error. >>m_ListingGrid.Model.IgnoreReadOnly = true; >> >>Is there any other way that i can make those cells writable during insert paste and other time just readonly >> >> >>

Administrator [Syncfusion]
Replied On February 10, 2005 06:46 PM

I think I probably misunderstood you. From your description it sounds like you try to paste into row 0. Did you change the clipboard flags? If so, make sure that GridDragDropFlags.RowHeader and GridDragDropFlags.ColHeader is not set. You could make sure these flags are not set with following code: >>private void gridControl1_ClipboardPaste(object sender, GridCutPasteEventArgs e) >>{ e.ClipboardFlags &= ~(GridDragDropFlags.RowHeader |GridDragDropFlags.ColHeader ) >>} If you keep having trouble please post a small sample project that shows what you try to do. Then I can fill in the missing parts. Thanks, Stefan

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;