I am unable to get a webdatechooser to work with an ultragridcolumn. I'm using .NET 7.3 version. In the cell I can enter text but the webdatechooser never pops up for me to select a date from.
<igtbl:UltraGridColumn HeaderText="Date Bill Received" Key="BillDate" BaseColumnName="BillDate" Format="MM/dd/yyyy" Type="Custom" DataType="System.DateTime" AllowUpdate="Yes" NullText=""></igtbl:UltraGridColumn>
<igsch:webdatechooser ID="txtDate" Runat="server" BorderWidth="0px" BorderStyle="None" Visible="false"> <CalendarLayout FooterFormat="Today: {0:d}"></CalendarLayout> <ExpandEffects ShadowColor="LightGray"></ExpandEffects></igsch:webdatechooser>
In the code behind
Private Sub grdBills_InitializeLayout(ByVal sender As Object, ByVal e As Infragistics.WebUI.UltraWebGrid.LayoutEventArgs) Handles grdBills.InitializeLayout
...Other...
grdBills.Bands(0).Columns.FromKey("BillDate").EditorControlID = txtDate.UniqueID
End Sub
Is there a reason why the webdatechooser in an ultrawebgrid sample doesn't show any helpful code? Or am I missing something?
http://samples.infragistics.com/2007.3/webfeaturebrowser/default.htm
You're definitely not missing something... For whatever reason Infragistics decided to post the code for the nice and confusing redirect... instead of just posting the code.
Long story short: the code for embedding a WebDateChooser in an WebGrid can be found here:
http://samples.infragistics.com/2009.2/WebFeatureBrowser/contents.aspx?showCode=true&t=WebDateChooser/Grid/webform1.aspx~srcview.aspx?path=../WebFeatureBrowserVB/WebDateChooser/Grid/webform1.src~srcview.aspx?path=WebDateChooser/Grid/webform1.src
You can also check out the LOCAL sample code, if you have it installed:
C:\Documents and Settings\All Users\Documents\Infragistics\NetAdvantage 2009.2\ASP.NET\Samples\WebFeatureBrowserVB\WebDateChooser\Grid
UltraWebGrid2.Bands[0].Columns.HeaderText = "Data Emiss";// "Data Emiss";
// UltraWebGrid2.Bands[0].Columns.Format = "MM-dd-yyyy";
UltraWebGrid2.Bands[0].Columns.EditorControlID = WebDateChooser1.UniqueID;
UltraWebGrid2.Bands[0].Columns.Type = Infragistics.WebUI.UltraWebGrid.ColumnType.Custom;