or
<LabelsAppearance DataFormatString="{0:F}"> <TextStyle Bold="true" Color="#003366" /></LabelsAppearance><LabelsAppearance> <TextStyle Bold="true" Color="#003366" /></LabelsAppearance><telerik:RadGrid ID="grdDesc" runat="server" AutoGenerateColumns="false"> <MasterTableView CommandItemDisplay="Top" EditMode="InPlace" DataKeyNames="Descrip" InsertItemPageIndexAction="ShowItemOnCurrentPage" ShowHeader="false"> <Columns> <telerik:GridEditCommandColumn ButtonType="PushButton" UniqueName="Edit"> </telerik:GridEditCommandColumn> <telerik:GridBoundColumn DataField="Descrip" UniqueName="Descrip"> </telerik:GridBoundColumn> </Columns> </MasterTableView> <ClientSettings> <Scrolling UseStaticHeaders="true" AllowScroll="true" /> </ClientSettings></telerik:RadGrid><telerik:RadInputManager runat="server" ID="RadInputManager1" Enabled="true"> <telerik:TextBoxSetting BehaviorID="TextBoxSetting1"> </telerik:TextBoxSetting></telerik:RadInputManager>Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load ... Dim ctxSql As LINQtoSQLDataContext = New LINQtoSQLDataContext() If chkDesc.Checked = True Then grdDesc.Visible = True Dim descrips = From c In ctxSql.COMBOBOXes Where c.fieldname = "DESCRIP" Select New With {c.descrip} grdDesc.DataSource = descrips grdDesc.DataBind() Else grdDesc.Visible = False End If ...End SubProtected Sub grdDesc_ItemCreated(ByVal sender As Object, ByVal e As GridItemEventArgs) Handles grdDesc.ItemCreated If TypeOf e.Item Is GridEditableItem AndAlso (e.Item.IsInEditMode) Then Dim editableItem As GridEditableItem = DirectCast(e.Item, GridEditableItem) Dim textBox = (DirectCast(editableItem.EditManager.GetColumnEditor("Descrip"), GridTextBoxColumnEditor)).TextBoxControl textBox.ID = "TextBox1" Dim inputSetting As InputSetting = RadInputManager1.GetSettingByBehaviorID("TextBoxSetting1") inputSetting.TargetControls.Add(New TargetInput(textBox.UniqueID, True)) inputSetting.InitializeOnClient = True inputSetting.Validation.IsRequired = True End IfEnd SubProtected Sub grdDesc_InsertCommand(sender As Object, e As Telerik.Web.UI.GridCommandEventArgs) Handles grdDesc.InsertCommand Dim ctxSql As LINQtoSQLDataContext = New LINQtoSQLDataContext() Dim custFileID = ctxSql.CUSTFILEs.Where(Function(c) c.CUSTNO = cboCustNew.SelectedValue).Single.CUSTFILE Dim newComboBox As COMBOBOX = New COMBOBOX() newComboBox.custfile = custFileID newComboBox.department = -1 newComboBox.fieldname = "DESCRIP" newComboBox.descrip = "" ctxSql.COMBOBOXes.InsertOnSubmit(newComboBox)End Sub| "The file you are trying to open, '[filename]', is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?" (Yes | No | Help) |