Demo entry 5502444

test

   

Submitted by anonymous on Jun 28, 2016 at 15:14
Language: C. Code size: 1.1 kB.

 public static DataTemplate Get(DataGridColumnDefinition dataGridColumnDefinition, CellTemplateMode cellTemplateMode)
        {
            DataTemplate dataTemplate = null;
            if (cellTemplateMode == CellTemplateMode.View)
            {
                dataTemplate = new ViewTemplate(dataGridColumnDefinition).DataColumnTemplate();
            }
            else if (dataGridColumnDefinition.Type == DataGridColumnType.Double)
            {
                dataTemplate = new EditTemplateNumeric(dataGridColumnDefinition, typeof(NumericDoubleTextBox)).DataColumnTemplate();
            }
            else if (dataGridColumnDefinition.Type == DataGridColumnType.String)
            {
                dataTemplate = new EditTemplateString(dataGridColumnDefinition).DataColumnTemplate();
            }
            else if (dataGridColumnDefinition.Type == DataGridColumnType.Integer)
            {
                dataTemplate = new EditTemplateNumeric(dataGridColumnDefinition, typeof(NumericIntegerTextBox)).DataColumnTemplate();
            }

            return dataTemplate;
        }

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).