Read only in grid

Can someone tell me what’s the point of having this check box in the customization tools if it can’t actually control read only in the grid or not? I want to control the field with the epicombo that I put at the top of the page (that works fine), or make the grid a drop down. So the easiest way to do this should be to make the column in the grid (only) read only. Hey there’s a box for that! But when you click it, it reverts back to the extended properties value. But if I make the extended properties read only, it’s read only everywhere.

Do I really need code to do something so simple?

Use extended properties to make something read only.

But that makes it read only everywhere. And I do need to change it some places. (like on the top on that screen)

You can also set the Editor of that Column to be your EpiCombo so that the dropdown shows up on the grid :slight_smile:

myGrid.DisplayLayout.Bands[0].Columns["Character01"].ValueList = myComboBox;
2 Likes

I realize none of these actaully answer your question… Try this
on Initialize_Row even in the grid.

this.ultraGrid1.DisplayLayout.Bands[0].Columns["Character01"].CellActivation = Activation.Disabled;
2 Likes

I was in the middle of trying that out when you gave me the code for drop down, Which is a better solution anyways, so I’m going to use that. Thanks,

But I still think that my point is valid that buttons and check boxes that don’t do anything the customization tool box is annoying at best.

I’m going to set the second answer as the solution, because, technically, it does answer the question. But I ended up using the first because it’s a better solution. It works great by the way. Thanks for the code that I probably should have just googled.

2 Likes

No problem :slight_smile:

This was covered in some detail in the Insights extended ed sessions. What I’m going to describe below probably doesn’t answer your question, but it hopefully explains the behaviour.

There is a need for the tickbox in Customisation Properties, and it does work in some circumstances. The thing to understand is that anything with an EpiBinding will behave according to the EpiDataView - as you’ve observed, set the EpiDataView to ReadOnly and all controls that reference the field will inherit that property. This is by design. To “break” the link, remove the EpiBinding. Then the field will behave as per properties sheet. Any custom controls that you’ve added which aren’t databound will be configured using the property sheet.

1 Like

But if you do this, doesn’t that mean that the field isn’t linked at all? (I’m confused) . I’ll have to give it a shot on Monday.

Sorry to bump this topic. Im trying to use the proposed solution to enable a field in Quote Entry screen (Line->Worksheet->Worksheet tab) that I think should be as default, since the same field is enabled on the Line->Detail tab. Im referring to the QuoteQty.SellingQuantity field. The code runs fine but seems that Epicor overides it still. Any thought? Using 10.2.200.26. Thanks

private void myWorksheetGrid_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs args)
{
		this.myWorksheetGrid.DisplayLayout.Bands[0].Columns["SellingQuantity"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
}

I’m customizing our Order Entry form with a UD table. I used the customization wizard to create the bulk of the initial code. Perhaps I shot myself in the foot doing this. I’m attempting @josecgomez solution but it’s not working as I don’t have a Initialize_Row event.

I’ve been trying to set the column read only in the wizard created events but getting no where it seems.

If you use the wizard for setting the extended properties, it should do all of that for you.

image

If it doesn’t show up in there, you should be able to do it on a form load event added by the wizard like this.

1 Like

Thanks @Banderson. It’s so easy an idiot like me should of known that! :rofl:

2 Likes