Validators

Last post 11-09-2006 5:02 PM by phuff. 3 replies.

Sort Posts:

  • Validators

    11-09-2006, 1:04 PM
    • Contributor
      3,346 point Contributor
    • WhatThe12
    • Member since 10-08-2003, 7:37 AM
    • Herts, UK
    • Posts 890

    Hi,

     In Paul Wilsons's UIMapper, his widgets, which I believe are equivalent DetailsView BoundFields, have properties on them that easily allow a validator to be added to the field. You can just specify a value for 'warning' and a required field validator is added. Or you can specify a value for 'regex' and 'regexwarning' and a regez validator is added.

     This would be good to have for Blinq I think.

     Are the DetailsView and GridView and ObjectDataSource used in Blinq the same one's that come with asp.net 2.0?

    Cheers, Wt.

     

    Web dev - spending forever achieving nothing.
  • Re: Validators

    11-09-2006, 2:52 PM
    • Contributor
      2,680 point Contributor
    • phuff
    • Member since 06-11-2002, 8:39 AM
    • Redmond, WA
    • Posts 547

    Wt, thanks for the suggestion.  Validators are something we are considering for Blinq-type features in the future.

    Yes, the controls that Blinq uses are the standard ASP.NET 2.0 controls.

    Polita Paulus

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: Validators

    11-09-2006, 3:42 PM
    • Contributor
      3,346 point Contributor
    • WhatThe12
    • Member since 10-08-2003, 7:37 AM
    • Herts, UK
    • Posts 890

    Hi,

     It would also be good to have some more powerful BoundFields.

     I've created some widgets for Paul Wilson's UIMapper. One enables the manging of a file. All you have to do is bind the file name to the widget and it gives the user the option of keeping the current file, deleting the current file and uploading a new file to replace the old. It can also resize and thumbnail an image, give a preview of the image and give a new file a unique filename. This makes managing files amazingly easy.

     I've also created a widget that allows one to manage a join table with a couple of listboxes. One list box contains the source items and the other contains the selected. The selected items can also be ordered with a couple of arrow buttons.

     Here's an example of a control declaration...

    <c

    ontrol member="AdGroupFooterAds" label="Footer Adverts" widget="OrderedJoinTable" selectedRootKeyDependant="true" selectedPredicate="GetSelectedFooterAdverts" selected="NWN.EntityClasses.AdGroupFooterAdsEntity" sourcePredicate="GetAvailableFooterAdverts" selectedKeyField="AdGroupId" selectedRelatedKeyField="AdId" source="NWN.EntityClasses.AdvertEntity" key="AdId" display="Title" span="1" rightCssClass="rightBox" leftCssClass="leftBox" />

     Another interesting difference I've noticed between Blinq and the Wilson UIMapper is that the Wilson widgets which go to the database independently of the main edit view have the equivalent of the ObjectDataSource incapsulated inside then. So you don't need to specify an ObjectDataSource and a drop down list, you just specify a ComboWidget and put the types to load etc. on the widget. Like this..

     <control member="AdTypeId" label="Advert Type" widget="ComboBox" readonly="OnEdit" source="NWN.EntityClasses.AdTypeEntity" key="AdTypeId" sortBy="Name" display="Name" width="400" span="1" required="Please select the advert type." />

    Just thought you might be interested!

    WT.

    Web dev - spending forever achieving nothing.
  • Re: Validators

    11-09-2006, 5:02 PM
    • Contributor
      2,680 point Contributor
    • phuff
    • Member since 06-11-2002, 8:39 AM
    • Redmond, WA
    • Posts 547

    I agree- It would be great to have some of these cool DataControlFields.  We wanted to build many of them but simply ran out of time.  However, DataControlField and BoundField are both classes that are inheritable so that customers can easily build the DataControlField types they need in their applications.  You've listed several that would be useful; if you decide to build this functionality into new DataControlFields, please post them so others can take advantage of them too.

    Perhaps there will be more time in the future for the ASP.NET team to build some of the fields you mention, but it always seems like time is too short for all the features we want to build.  We need to rely on the community to fill in some of the gaps for more specialized functionality.

    If you get a job at Starbucks, send me mail and I'll come work for you. Smile  Barista is my dream job...

    Polita Paulus

    This posting is provided "AS IS" with no warranties, and confers no rights.
Page 1 of 1 (4 items)