PushValue error??

6 posts, 0 answers
  1. Mateo
    Mateo avatar
    17 posts
    Member since:
    Aug 2007

    Posted 10 Sep 2007 Link to this post

    one cell is defined as a textbox column bound to an int field.
    When i modify the value an error occurs stating that it cannot convert from type string to type int.
    Here is how i define the column 

    colTxt = new GridViewTextBoxColumn("Age");

    colTxt.UniqueName = "Age";

    colTxt.IsVisible = true;

    colTxt.MaxLength = 3;

    colTxt.DataType = typeof(int);

    colTxt.AllowResize = false;

    colTxt.ReadOnly = false;

    this.grdSearchResults.MasterGridViewTemplate.Columns.Add(colTxt);



    How can i handle this? Is there an event where i can do the convert myself?
    Thanks

  2. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 11 Sep 2007 Link to this post

    Hello Mateo,

    This issues is already fixed and will be available in our Q2 release planed for next week.

    Note that when you add a column which is not bound to any data, its values will be processed from the CellFormatting event and it will be unbound.

    Thank you for the feedback and sorry for the inconvenience.

     
    Best wishes,
    Julian Benkov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Louis
    Louis  avatar
    44 posts
    Member since:
    Sep 2007

    Posted 13 Sep 2007 Link to this post

    Could it be possible that it is not included in the beta release now available ?
  5. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 14 Sep 2007 Link to this post

    Indeed, Louis , the fix was added after the Beta release. The good news is that the Q2 release is next week so you would not have to wait much longer to get it.


    All the best,
    Julian Benkov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. Russell Groover
    Russell Groover avatar
    9 posts
    Member since:
    Dec 2007

    Posted 21 Mar 2008 Link to this post

    I'm getting this error with Q3 2007 SP1. 

    My column is defined as the following

    gridViewTextBoxColumn2.HeaderText =

    "Max. Units #";
    gridViewTextBoxColumn2.MinWidth = 90;
    gridViewTextBoxColumn2.UniqueName =
    "maxUnits";
    gridViewTextBoxColumn2.DataField =
    "MaximumUnits";
    gridViewTextBoxColumn2.DataType =
    typeof(int);

    My datagrid is bound to a BindingList of objects.  The value displays ok but I get the error "System.String cannot be converted to type System.Int32" when I try to edit the cell and move to another cell.

    What can I do to allow users to edit numeric values?

  7. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 24 Mar 2008 Link to this post

    Hello Russell,

    This issue is already solved in our Q1 2008 Beta release. I encourage you to download it at this link. Please give us your feedback on whether it meets your needs, and where you would like us to take it for the official release version.

    I hope this helps. If you have any other questions, please contact me.

    Sincerely yours,
    Julian Benkov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top
UI for WinForms is Visual Studio 2017 Ready