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
AD
Administrator
Syncfusion Team
February 9, 2005 12:34 PM UTC
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
>
>
>
AD
Administrator
Syncfusion Team
February 10, 2005 04:08 AM UTC
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
>>
>>
>>
AD
Administrator
Syncfusion Team
February 10, 2005 11:46 PM UTC
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