or

protected void cboFilterCompany_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e){ RadComboBox combo = sender as RadComboBox; ViewState["CompanyFilterVal"] = e.Value; //to persist value GridColumn column = grdParts.MasterTableView.GetColumnSafe("Company"); //if (grdParts.MasterTableView.FilterExpression != "") //{ // //append? //} grdParts.MasterTableView.FilterExpression = "([Company] = '" + e.Text + "')"; column.CurrentFilterFunction = GridKnownFunction.EqualTo; column.CurrentFilterValue = e.Text; grdParts.MasterTableView.Rebind();}
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not IsPostBack Then Dim rspId As String = Request.QueryString("RSP") If rspId = String.Empty Then 'Send to another page Else Dim userlogon As String = Split(Current.User.Identity.Name, "\")(1) HFUserId.Value = GetPersId(userlogon) HFRecruitId.Value = rspId LoadRSP(rspId) fillGridNotes = True End If End If End Sub Protected Sub myRadNotes_NeedDataSource(sender As Object, e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles myRadNotes.NeedDataSource 'Load the Notes Grid If fillGridNotes = True Then sql = "Select intRspNotesId, CONVERT(varchar(10), dtRSPNotesDateEntered, 111) dtNotes, strRSPNotesDesc, mn.strFullname + ' ' + ISNULL(' ' + strRank, '') LoggedBy from tblRSPNotes n LEFT JOIN MNNGPersonnel..tblMNNatPersonnel mn on " _ & "mn.intPersonnelId = n.intLoggedBy where intRSPID in (Select intRSpId from tblRSp where intRecruitId = " & HFRecruitId.Value & ") Order by dtRSPNotesDateEntered DESC" myRadNotes.DataSource = getReader(sql) End If End SubHere is where I am having the problem though, becuase how can I set the boolean statement to true when posting back to do an insert statment on the radgrid.Protected Sub myRadNotes_ItemCommand(sender As Object, e As Telerik.Web.UI.GridCommandEventArgs) Handles myRadNotes.ItemCommand If (e.CommandName = RadGrid.PerformInsertCommandName) Then fillGridNotes = True Dim editedItem As GridEditableItem = CType(e.Item, GridEditableItem) Dim notes As TextBox = DirectCast(editedItem.FindControl("txtNotes"), TextBox) Dim rspId As Integer = 16533 sql = "Insert tblRSPNotes (intRSPId, dtRSpNotesDateEntered, strRSPNotesDesc, intLoggedBy) VALUES (" & rspId & ", '" & Date.Now & "', '" & sanitizeString(notes.Text) & "', " & HFUserId.Value & ")" insertUpdateDelete(sql) myRadNotes.Rebind() End If End SubERROR 2011-07-19 19:18:47,994 - Application Error by user: Telerik.Web.UI.AsyncUpload.AsyncUploadHandlerExeption: RadAsyncUpload handler is registered succesfully, however, it may not be accessed directly. at Telerik.Web.UI.AsyncUpload.RequestData..ctor(HttpContext context) at Telerik.Web.UI.AsyncUploadHandler.EnsureSetup() at Telerik.Web.UI.AsyncUploadHandler.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)