How to set a column MaxLength?

2 posts, 0 answers
  1. SchaF
    SchaF avatar
    28 posts
    Member since:
    Jan 2012

    Posted 30 Jan 2012 Link to this post

    Ive got this gridview that Im populating with data and being allowed to edit and insert. I want to make it so when the user is inserting or editing a column's cell, the maximum (char) length is set based on a control records max length. So far Ive only been able to set the MaxWidth, but that doesnt help me because the column header is always longer than the atual text allowed, and the MaxWidth sets the column width in pixels, no the columns editing max character length. Can someone point me in the right direction. I can provide some code if need be.

    Ive also tried setting it to

    column.CellEditTemplate.SetValue(TextBoxEditor.MaxLengthProperty, MYMAXLENGTH);


    but it gives me an error.

  2. SchaF
    SchaF avatar
    28 posts
    Member since:
    Jan 2012

    Posted 30 Jan 2012 Link to this post

    Problem has been solved. Never mind.
Back to Top