I have added the one checkbox colum in the grid. I would like to make that column editbale and rest of the columns are not. how to make it ?, At the same time I want to capture the checkbox state changed event.
FYI : I am using the following code to add checkbox column
GridViewCheckBoxColumn checkBoxColumn = new GridViewCheckBoxColumn();
checkBoxColumn.DataType =
typeof(bool);
checkBoxColumn.HeaderText =
string.Empty;
checkBoxColumn.Width = 25;
dGridDisplayField.MasterGridViewTemplate.Columns.Insert(0, checkBoxColumn);
Thanks you
Raghu
System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value) at Telerik.WinControls.UI.GridTableElement.GetRowStyleForType(String elementTypeFullName) at Telerik.WinControls.UI.GridTableElement.GetRowStyle(GridRowElement row) at Telerik.WinControls.UI.GridRowElement.GetRowStyle() at Telerik.WinControls.UI.GridRowElement.ApplyCustomFormatting() at Telerik.WinControls.UI.GridRowElement.UpdateInfo() at Telerik.WinControls.UI.GridTableBodyElement.UpdateState() at Telerik.WinControls.UI.GridTableElement.UpdateCurrentColumn() at Telerik.WinControls.UI.GridViewTemplate.SetCurrentColumn(GridViewColumn column, Boolean update, Boolean shift, Boolean control) at Telerik.WinControls.UI.GridViewTemplate.set_CurrentColumn(GridViewColumn value) at Telerik.WinControls.UI.GridTableElement.UpdateCurrentPosition() at Telerik.WinControls.UI.GridViewInfo.SetCurrentRow(GridViewRowInfo row, Boolean setPosition, Boolean shift, Boolean control, Boolean rightMouseButton) at Telerik.WinControls.UI.GridViewTemplate.SetCurrentRow(GridViewRowInfo rowInfo) at Telerik.WinControls.Data.DataAccessComponent.InitDataGrid() at Telerik.WinControls.Data.DataAccessComponent.Bind(Object dataSource, String dataMember) at Telerik.WinControls.Data.DataAccessComponent.set_DataSource(Object value) at WindowsApplication4.Form1.worker_DoWork(Object sender, DoWorkEventArgs e) in c:\devprojects\WindowsApplication4\WindowsApplication4\Form1.vb:line 14
2) The second error is Exception has been thrown by the target of an invocation. There is no clear way to reproduce. Sometimes it happens on startup, other times it me three or four clicks.
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
at System.Windows.Forms.Control.WndProc(Message& m)
at Telerik.WinControls.RadControl.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at WindowsApplication4.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Please le tme know if you can help.
((
CS_MainForm)this.Owner).treeView.SelectedNode = ((CS_MainForm)this.Owner).treeView.Nodes[0];
Sample Line Of Code Above.
I have tried to change the selected node using the line of code below, but have had no joy..
Sample Line Of Code Below.
((
CS_MainForm)this.Owner).treeView.SelectedNode = ((CS_MainForm)this.Owner).treeView.Nodes["New Page Name"];
Sample Line Of Code Above.
So far all of my attempts have failed and i would be grateful if somebody could offer me some assistance. I have a feeling its staring me right in the face and i just can't see it.
Kind Regards
Chris