This is a migrated thread and some comments may be shown as answers.

GridNumericColumn MinValue MaxValue

3 Answers 368 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 10 Jul 2014, 11:58 AM
  Am I missing something?  MinValue and MaxValue do not appear to be members of GridNumericColumn.  A search of the forums doesn't find much revealing either.  Is there some sort of workaround that does not involve using a Template Column?  I would prefer to use the GridNumericColumn for its DefaultInsertValue which takes a bit longer to implement with the template column.

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 10 Jul 2014, 12:17 PM
Hi Alex,

I guess in edit/insert mode you want to set the MinValue and MaxValue, please try the following code snippet.

C#:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
 if (e.Item is GridEditableItem && e.Item.IsInEditMode)
 {
   GridEditableItem editItem = (GridEditableItem)e.Item;
   RadNumericTextBox numtxtID = (RadNumericTextBox)editItem["ColumnUniqueName"].Controls[0];
   numtxtID.MinValue = 1;
   numtxtID.MaxValue = 20;
 }
}

Thanks,
Shinu
0
Alex
Top achievements
Rank 1
answered on 10 Jul 2014, 12:38 PM
  Yeah, that should work, but a bit painful to have to wire all that extra up when everything else is declarative.  I was hoping to just be able to set the property like I would do with a regular RadNumericTextbox.  Anyone else think adding this as something standard would make sense?
0
Eyup
Telerik team
answered on 14 Jul 2014, 10:17 AM
Hi Alex,

Thank you for your feedback. Please note that we have a public feedback portal available where you can freely log such ideas and our developers will take them under consideration for the upcoming releases:
http://feedback.telerik.com/Project/108


Regards,
Eyup
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Alex
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Alex
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or