Skip to content

Replies

0
Tony Licitra
Tony Licitra answered on Dec 28, 2018 6:09 PM

I know this is a very old thread.  But the link to the blog provided no longer works and I'm experiencing the same issue.  I prefer not to create a blank license file.

I've tried using a vNext Pre-Build Event to copy a blank licences.licx file, but that does not seem to be working.  Is there a more graceful solution?

0
Tony Licitra
Tony Licitra answered on Apr 20, 2017 7:35 PM

Hi

(This is working now, but I wanted to clarify)  I have two other questions about group by and populating ultra dropdown which I'll post separately.

On Insert of a new row I want to string together a value in a field based on two other fields  field 3 = field1 + field2.When populating the grid it should read from the database saved value.

When updating the value in field3 needs to change if the value in field1 or field2 is updated, (this is working on insert and change of field1 or field2), so I did something like:

private void UltraGridList_AfterCellUpdate(object sender, CellEventArgs e)
        {

    if ((e.Cell.Column.Key.ToUpper().Equals("FIELD1") || e.Cell.Column.Key.ToUpper().Equals("FIELD2"))

     UltraGridList.ActiveRow.Cells["FIELD3"].Value = "STUFF FOR " + UltraGridList.ActiveRow.Cells["FIELD1"].Value + " – " + UltraGridList.ActiveRow.Cells["FIELD2"].Value;

0
Tony Licitra
Tony Licitra answered on Apr 13, 2017 3:41 PM

Hi,

Thanks for your reply.  This is new to me, so there may be a better/another way.

I was able to use the AfterCellUpdate event, but had set set a "search mode" flag so when searching it would read the value from the database and not from the cell values, otherwise I was getting a null value reference since FIELD1 and FIELD2 were not set yet.

So basically if FIELD1 or FIELD2 changes re-concatenate it in FIELD3:

private void UltraGridList_AfterCellUpdate(object sender, CellEventArgs e)
{
              if ((e.Cell.Column.Key.ToUpper().Equals("FIELD1") || e.Cell.Column.Key.ToUpper().Equals("FIELD2"))
                    & !searchmode)
                    UltraGridList.ActiveRow.Cells["FIELD3"].Value = "CUSTOM CHG FOR " + UltraGridList.ActiveRow.Cells["FIELD1"].Value + " – " + UltraGridList.ActiveRow.Cells["FIELD2"].Value;
}