I have question about following words in Bold of convert Ultrawebgrid to webdatagrid
For Each ugcResult As UltraGridColumn In webGrid.Columns
ctrlNew = Nothing metNew = Nothing mevNew = Nothing smpNew = Nothing
strEditorId = "edtColumn" & arrayIndex & "_" & ugcResult.Index
Select Case ugcResult.Type Case ColumnType.CheckBox If ugcResult.Header.Caption Is Nothing Then ugcResult.Header.Caption = "" If Not ugcResult.Header.Caption.StartsWith("<input ") Then ugcResult.Header.Caption = "<input id=""" & strWebGridClientId & "_chkheader_" & ugcResult.Index & _ """ type=""checkbox"" onmousedown=""window.event.cancelBubble=true;"" onclick=""_check_all('" & strWebGridClientId & "'," & _ ugcResult.Index & ")""><span style=""vertical-align:top""> " & ugcResult.Header.Caption & "</span>" End If ctrlNew = New CheckBox strEditorId = "chkColumn" & arrayIndex & "_" & ugcResult.Index
Case ColumnType.DropDownList
ctrlNew = New DropDownList
For Each vliContent In ugcResult.ValueList.ValueListItems If vliContent.DataValue IsNot Nothing Then If vliContent.DataValue.ToString = "" Then vliContent.DataValue = " " End If Next Case Else ctrlNew = New TextBox End Select
ctrlNew.ID = strEditorId ctrlNew.EnableViewState = False udpDynamicControl.ContentTemplateContainer.Controls.Add(ctrlNew)
ctrlNew.Width = Unit.Percentage(100) ctrlNew.Style("display") = "none" If TypeOf ctrlNew Is CheckBox Then attNew = CType(ctrlNew, CheckBox).InputAttributes attNew.Add("style", "display:none") Else attNew = ctrlNew.Attributes End If
attNew.Add("onblur", "_editor_valueChange()") attNew.Add("onselectstart", "window.event.cancelBubble=true;") attNew.Add("onkeydown", "_editor_keyDown('" & strWebGridClientId & "','')") ctrlNew.Visible = webGrid.Visible
If webGrid.Visible Then aryColumnEditor.Add("'" & ctrlNew.ClientID & "'") Else aryColumnEditor.Add("null") End If odColumnEditor.Add(ugcResult.BaseColumnName, ctrlNew.UniqueID)
Select Case True Case TypeOf ctrlNew Is TextBox Select Case ugcResult.Type Case GetType(String).FullName, GetType(DateTime).FullName, "System.Date" metNew = New MaskedEditExtender Select Case ugcResult.Format Case "yyyy/MM/dd" metNew.MaskType = MaskedEditType.Date metNew.Mask = "9999/99/99" metNew.UserDateFormat = MaskedEditUserDateFormat.YearMonthDay Case "yyyy/MM/dd HH:mm:ss" metNew.MaskType = MaskedEditType.DateTime metNew.Mask = "9999/99/99 99:99:99" metNew.UserDateFormat = MaskedEditUserDateFormat.YearMonthDay Case "yyyy/MM/dd HH:mm" metNew.MaskType = MaskedEditType.DateTime metNew.Mask = "9999/99/99 99:99" metNew.UserDateFormat = MaskedEditUserDateFormat.YearMonthDay Case "yy/MM/dd HH:mm" metNew.MaskType = MaskedEditType.DateTime metNew.Mask = "99/99/99 99:99" metNew.UserDateFormat = MaskedEditUserDateFormat.YearMonthDay Case "yy/MM/dd" metNew.MaskType = MaskedEditType.Date metNew.Mask = "99/99/99" metNew.UserDateFormat = MaskedEditUserDateFormat.YearMonthDay Case "HH:mm" metNew.MaskType = MaskedEditType.Time metNew.Mask = "99:99" metNew.UserDateFormat = MaskedEditUserDateFormat.None Case "yyyy/MM" metNew.Mask = "9999/99" Case Else Select Case ugcResult.DataType Case "System.Date" metNew.UserDateFormat = MaskedEditUserDateFormat.YearMonthDay metNew.MaskType = MaskedEditType.Date metNew.Mask = "9999/99/99" ugcResult.DataType = "yyyy/MM/dd" Case GetType(DateTime).FullName metNew.UserDateFormat = MaskedEditUserDateFormat.YearMonthDay metNew.MaskType = MaskedEditType.DateTime metNew.Mask = "9999/99/99 99:99:99" ugcResult.Format = "yyyy/MM/dd HH:mm:ss" Case Else metNew.PromptCharacter = "" metNew.Chinese = True metNew.ClearMaskOnLostFocus = False If ugcResult.FieldLen = 0 Then CType(ctrlNew, TextBox).MaxLength = 20 metNew.Mask = "".PadRight(20, "?"c) Else CType(ctrlNew, TextBox).MaxLength = ugcResult.FieldLen metNew.Mask = "".PadRight(ugcResult.FieldLen, "?"c) End If End Select End Select Case GetType(Integer).FullName metNew = New MaskedEditExtender metNew.PromptCharacter = "" If ugcResult.FieldLen = 0 Then metNew.Mask = "".PadRight(20, "9"c) Else metNew.Mask = "".PadRight(ugcResult.FieldLen, "9"c) End If Case GetType(Byte).FullName metNew = New MaskedEditExtender metNew.PromptCharacter = "" If ugcResult.FieldLen = 0 Then metNew.Mask = "".PadRight(3, "9"c) Else metNew.Mask = "".PadRight(ugcResult.FieldLen, "9"c) End If Case GetType(Decimal).FullName, GetType(Single).FullName, GetType(Double).FullName metNew = New MaskedEditExtender metNew.PromptCharacter = "" If ugcResult.FieldLen = 0 Then metNew.Mask = "".PadRight(20, "N"c) Else metNew.Mask = "".PadRight(ugcResult.FieldLen, "N"c) End If metNew.Filtered = "." Case Else metNew = New MaskedEditExtender metNew.PromptCharacter = "" metNew.Chinese = True metNew.ClearMaskOnLostFocus = False If ugcResult.FieldLen = 0 Then CType(ctrlNew, TextBox).MaxLength = 20 metNew.Mask = "".PadRight(20, "?"c) Else CType(ctrlNew, TextBox).MaxLength = ugcResult.FieldLen metNew.Mask = "".PadRight(ugcResult.FieldLen, "?"c) End If End Select
Next
Any help would be appreciated
Thanks
Jacksonkao
Hi Jacksonkao,
I will do my best to provide you with helpful information regarding how the features of the ultraWebGrid in bold can be "upgraded" to WebDataGrid.
Regarding columns in WebDataGrid: you can find more information of the field features of the new grid at:
http://help.infragistics.com/NetAdvantage/ASPNET/2011.1/CLR4.0/
As far as checkbox columns are concerned, the WebDataGrid provides (bound/unbound) check box fields, more information about which can be found in the link above.
WebDataGrid's columns can use DropDown editor providers in order to exhibit drop-down list functionality. The following article describes how to bind a provider to a column:
http://help.infragistics.com/NetAdvantage/ASPNET/2011.1/CLR4.0/?page=WebDataGrid_Using_Editor_Providers.html
For the format of your date values, you can use a MaskProvider in order to fulfill your requirements. The full list of available providers for the WebDataGrid is available at:
http://help.infragistics.com/NetAdvantage/ASPNET/2011.1/CLR4.0/?page=WebDataGrid_Editor_Providers.html
Hope this helps. Please contact me if you have any questions.
Best Regards,Petar IvanovDeveloper Support EngineerInfragistics, Inc.http://www.infragistics.com/support
Hi Peter-
We currently are using Ultrawebgrids and other Ultra type controls in a couple production applications at our facility. I would like to upgrade these to the latest webdatagrids. There is a lot of code behind using the ultrawebgrids. If we install the latest Infragistics and run the upgrade tool will that upgrade everything? Or whats the best way of going about upgrading.
Hi ,
I was using infrgistics v7.3 (UltraWebGrid,WebDataInput,WebCombo,UltraWebTab,WebDateChooser) in framework 2.0.I upgraded the framework to 4.5 and got the latest INFRAGISTICS control.I need to know the alternate controls for the above mentioned controls and the events that are retired in above controls.
I Want all the controls to work in IE 11
Hi Team,
Currently we are using various controls of Infragistics4.WebUI.UltraWebGrid.v11.1 like Ultra Web Grid, Ultra Web menu, Ultra Chart and many others.
Now when tried to migrate to IE Edge, the application stopped working, neither the menu nor the Grid.
Could you please suggest what are our options to resolve this. Can we still use UltraWebGrid, if yes, then how much extra work will be required.
Please confirm. Its very critical.