Telerik Forums
UI for WinForms Forum
6 answers
282 views

FilterExpression filter = 
new FilterExpression(); 
                    filter.Predicates.Add(FilterExpression.BinaryOperation.AND, 
                       GridKnownFunction.Contains, 
                       "@FilterEditor1"); 
                    filter.Parameters.Add("@FilterEditor1", "rgvKeyword.CurrentRow.Cells[0].Value"); 
                    rgvEmails.Columns["tk_name"].Filter = filter; 

Above is my code to apply filter to the grid column "tk_name" programatically.
Filtering works great for normal alphabetic string.
But, If the filtertext contains any double quote character("), the filtering functionality won't work. it just displays all the records.

Is this a bug or Is there any escape seq. for double quote character in filtertext?

Please help.
Aswin S
Top achievements
Rank 1
 answered on 07 Jul 2010
1 answer
446 views
Hi,

I am using RadControls for WinForms Q3 2009 SP1

I created two UserControls each one has a RadGridView in it. i.e. AListControl and BListControl.
Each RadGridView is bounded to a DataSource which list objects of type A and B.
When I use the controls separately (as I should) it works fine.

Now I try to use the RadGridView of object B as a ChildGridViewTemplate of A.
To avoid recreating the whole grid definition I use the following in AListControl constructor:

 
public AListControl() 
{ 
   InitializeComponent(); 
 
   // Create dummy BListControl 
   BListControl bListControl = new BListControl(); 
 
   // Add the B's MasterGridViewTemplate to A as a ChildGridViewTemplates 
   this.radGridViewA.MasterGridViewTemplate.ChildGridViewTemplates.Add( 
      bListControl.radGridViewB.MasterGridViewTemplate); 
 
   // Add the relation 
   GridViewRelation relation = new GridViewRelation(this.radGridViewA.MasterGridViewTemplate); 
   relation.ChildTemplate = bListControl.radGridViewB.MasterGridViewTemplate; 
   relation.RelationName = "A2B"; 
   relation.ParentColumnNames.Add("Id"); 
   relation.ChildColumnNames.Add("B.AId"); 
   this.radGridViewA.Relations.Add(relation); 
} 
    

I also added a menu item in the context menu that sets the DataSource of bListControl.radGridViewB.MasterGridViewTemplate.
When I set the DataSource the application fails with the exception "Object reference not set to an instance of an object."

This is the callstack I got:

     Telerik.WinControls.GridView.dll!Telerik.WinControls.UI.GridTraverser.IsRowVisible(Telerik.WinControls.UI.GridViewRowInfo rowInfo) + 0x32 bytes   
     Telerik.WinControls.GridView.dll!Telerik.WinControls.UI.GridTraverser.MoveForward() + 0x95 bytes   
     Telerik.WinControls.GridView.dll!Telerik.WinControls.UI.GridTableElement.UpdateScrollbars(bool resetValue) + 0x165 bytes   
     Telerik.WinControls.GridView.dll!Telerik.WinControls.UI.GridTableElement.Update_OrderChanged(Telerik.WinControls.UI.GridUINotifyAction action, Telerik.WinControls.UI.GridViewRowInfo[] rowInfos) + 0x12c bytes   
     Telerik.WinControls.GridView.dll!Telerik.WinControls.UI.GridTableElement.UpdateCore(Telerik.WinControls.UI.GridUINotifyAction action, Telerik.WinControls.UI.GridViewRowInfo[] rowInfos) + 0x74 bytes   
     Telerik.WinControls.GridView.dll!Telerik.WinControls.UI.GridViewTemplate.UpdateUI(Telerik.WinControls.UI.GridUINotifyAction action = SortingChanged, Telerik.WinControls.UI.GridViewRowInfo[] rowInfos) + 0x33f bytes   
     Telerik.WinControls.GridView.dll!Telerik.WinControls.Data.DataAccessComponent.InitializeSorting() + 0x109 bytes   
     Telerik.WinControls.GridView.dll!Telerik.WinControls.Data.DataAccessComponent.InitDataGrid() + 0x14e bytes   
     Telerik.WinControls.GridView.dll!Telerik.WinControls.Data.DataAccessComponent.Bind(object dataSource, string dataMember) + 0x32c bytes   
     Telerik.WinControls.GridView.dll!Telerik.WinControls.Data.DataAccessComponent.DataSource.set(object value) + 0x65 bytes   
>   InspectSims.exe!Inspector.AListControl.ShowBsClicked(object sender = {Telerik.WinControls.UI.RadMenuItem}, System.EventArgs e = {System.EventArgs}) Line 62 + 0x2b bytes   C#

Can you tell me if this is the correct way to do this, or if there is another way to do this ?

Regards,
Ami

Stefan
Telerik team
 answered on 07 Jul 2010
1 answer
161 views
hi,

I have a radgridview.While clicking on the cells, I got the values in a radlabel as shown below.
But I got the error ,"Object reference not set to an instance of an object " when clicking on the gridview header or some other places in the radgridview.How can i avoid this error.

Private Sub RadGridView1_CellClick(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.GridViewCellEventArgs) Handles RadGridView1.CellClick

 

 

 

RadLabel5.Text =

 

"Selected S.No :" & e.Row.Cells("serialno").Value & " - " & e.Row.Cells("name").Value.ToString

 

Boryana
Telerik team
 answered on 07 Jul 2010
1 answer
142 views
hi,telerik
    we are developing the winform application in telerik control,we used the RadGridView to display the data to the user,we listed all the files that came from a folder,we want to drag an item from RadGridView to desktop(item means a row,it display the information for a file,for example ,filename,datetime,author),but it failed ,it can trigger any events,or drag a file from desktop to RadGridView,it also failed,we have set the AllowDrop=true;i don't know how to implement this function,could u pls help me implement this function, it's very important to our project.my email is feiying0803@163.com;Thanks for you help...
Svett
Telerik team
 answered on 07 Jul 2010
3 answers
147 views
Hi,

Having spent way too long on this, what has to be done to switch autogenerated columns OFF on the GridView?  The property seems to be getting ignored, whether I set it in codebehind or in the propertymanager.

I've defined my columns through the collection in Vis Studio, and then call

SqlConnection cn = new SqlConnection(feedsSvr);
            cn.Open();
            SqlCommand cmd = new SqlCommand("ASP_GetDeltas", cn);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@FeedGUID", feedGUID);
            SqlDataReader dr = cmd.ExecuteReader();
            radGridView1.MasterGridViewTemplate.AutoGenerateColumns = false;
            radGridView1.MasterGridViewTemplate.LoadFrom(dr);

Thanks for your help!!

Paul
Julian Benkov
Telerik team
 answered on 07 Jul 2010
4 answers
265 views
Do not work (?)
Jack
Telerik team
 answered on 07 Jul 2010
2 answers
128 views
How can I retrieve the SQL Server Auto Increment ID when adding a record to the grid when binding source is a Table Data Adapter?

Anyone?

T.I.A.
Julian Benkov
Telerik team
 answered on 07 Jul 2010
9 answers
442 views

I have setup a Hierarchical Grid programmatically basically following the example in the Documentation. Now I need to update some Cells in the ChildGridView programmatically and assumed I can update the cell info with the following:


'-- The ChildGridView has already been populated with data  
Dim cTemplate As GridViewTemplate = GridViewPricing.MasterGridViewTemplate.ChildGridViewTemplates(0)  
 
'The following throws an error : 
'Object reference not set to an instance of an object.  
cTemplate.Rows(0).Cells(1).Value="somedata"    
 
 
The above throws the Object reference not set to an instance of an object error.  In fact accessing any of the Cells methods or properties throws the Object Not set to an instance of an object. 

Any help greatly appreicated.
Julian Benkov
Telerik team
 answered on 07 Jul 2010
1 answer
176 views
Hi,
I'm evaluating your WinForms control suite and was wondering if I can build an application where the user can choose between having a ribbon or a menu/toolbar application window. If so, how can I switch between those modes programmatically? Some other control vendors just require to drop the ribbon control onto a standard form to make it a ribbon form. When I then hide the ribbon control and show the menu/toolbar, I'm basically back in standard (menu/toolbar) mode again. Is something like that possible using Telerik?
Stefan
Telerik team
 answered on 06 Jul 2010
2 answers
659 views
I have been looking all weekend for this solution but cant seem to figure it out.  I have a sql database, very small and simple.  It is basically is a support database for taking service requests.  (just a training for myself)  I have a database view that i'm using to bring the information into my winform project.

I'm trying to figure out the best way to filter a gridview using the dropdown.

1.  Is it possible to populate a RadDropDownButton with the Technician Name items from a sql database and then filter the records in a gridview?
2. Is it better to use a combobox although the dropdown seems to look cooler?

So I have a radform, drop a raddropdown and a gridview on the form... I can get the gridview to display records, I can get a combobox to show the technicians but I can only get the dropdown to display the first technician.

I have not been able to get any of the dropdowns or combobox's to filter the gridview.. anybody have any simple solutions that I may be missing? 

I have tried several different ways, one such as this:

Public Class RadForm1  
 
     
 
    Private Sub RadForm1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load  
        'TODO: This line of code loads data into the 'WODataset.WorkOrderMain' table. You can move, or remove it, as needed.  
        Me.WorkOrderMainTableAdapter.Fill(Me.WODataset.WorkOrderMain)  
 
        RadDropDownButton1.Items.Add(WODataset.WorkOrderMain.techFullNameColumn)  
        RadComboBox1.Items.Add(WODataset.WorkOrderMain.techFullNameColumn)  
 
    End Sub 
End Class 
Both of these do not work for populating the fields...

Please excuse my noviceness... :)

 
Jack
Telerik team
 answered on 06 Jul 2010
Narrow your results
Selected tags
Tags
GridView
General Discussions
Scheduler and Reminder
Treeview
Dock
RibbonBar
Themes and Visual Style Builder
ChartView
Calendar, DateTimePicker, TimePicker and Clock
DropDownList
Buttons, RadioButton, CheckBox, etc
ListView
ComboBox and ListBox (obsolete as of Q2 2010)
Form
Chart (obsolete as of Q1 2013)
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
PropertyGrid
Menu
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
Tabstrip (obsolete as of Q2 2010)
MaskedEditBox
PdfViewer and PdfViewerNavigator
CommandBar
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
Label
AutoCompleteBox
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
SyntaxEditor
Wizard
CollapsiblePanel
LayoutControl
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
WaitingBar
GroupBox
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
NavigationView
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
TreeMap
StepProgressBar
SplashScreen
Flyout
Separator
SparkLine
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
SmartPasteButton
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?