Telerik Forums
UI for WinForms Forum
5 answers
3.2K+ views
I wanted to search in the datagrideview using a textbox
as i write in textbox automatically that value matched with particular row
is displayed

https://dl.dropbox.com/u/10717574/project%20problems/search.png

here is the image 
here u can see as i type "Hi" Automatically all the rows that contains the "Hi" are filterd and show...
i want to do like this
plzzz give me suggestion
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 25 Mar 2016
1 answer
309 views

Hi,

I'm still new to Telerik and having a hard time editing cell in the grid when selected the row. 

below is my Linq .

var voters = (
               from voter in db.VotersLists
                     .OrderBy(c => c.Barangay)
               from data in db.VotersDatas
                   .Where(b => b.RecId == voter.ID)
                   .DefaultIfEmpty()
               from leader in db.VotersLists
                   .Where(d => d.ID == data.LeaderID)
                   .DefaultIfEmpty()
               select new
               {
                   ID = voter.ID,
                   VotersID = voter.VotersID,
                   Precinct = voter.Precinct,
                   Name = voter.Name,
                   Birthday = voter.Birthday.GetValueOrDefault().ToShortDateString(),
                   Sex = voter.Sex,
                   Barangay = voter.Barangay,
                   Address = voter.Address,
                   PoliticalParty = data.PoliticalParty,
                   IsRD = data.IsRD,
                   LeaderName = leader.Name,
                   LeaderPosition = data.LeaderPosition
                   ,DataID = data.ID.ToString() == null ? "" : data.ID.ToString()
               });
              dg2.DataSource = voters;

I tried using the code below and it won't work.

     dg2.Rows[dg2.CurrentRow.Index].Cells[10].Value = "Test";
     
or
       
     if (this.dg2.CurrentRow is GridViewRowInfo)
     {
         GridViewRowInfo editRow = dg2.CurrentRow;
         editRow.Cells["LeaderName"].Value = "TEST";
      }

 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 25 Mar 2016
5 answers
165 views
I looked around through the forums and documentation but could not find anything... is there a way to set a subtitle of the chart, that is one a different line with the main title, that uses a different font and/or color?
Dimitar
Telerik team
 answered on 25 Mar 2016
3 answers
674 views

Hello,

I can't seem to get various controls (button, label, dropdown, etc.) to scale correctly when the form font size is changed. Actually the size of the control appears to be scaled correctly but the font size of the control remains the same.

For example, create a new application and drop a radbutton on the form. In the form constructor add a change to the form font size:

Public Sub New()

        ' This call is required by the designer.

         InitializeComponent()

        ' Add any initialization after the InitializeComponent() call.
        Dim sysFont As Font = SystemFonts.MessageBoxFont
        Me.Font = New Font(sysFont.Name, 14, sysFont.Style)
    End Sub

At run-time the size of the button increases (good) but the font size remains at the default 8.25. This is not how the MS controls behave when added to the same form. The MS button size and font size change accordingly.

The form AutoScaleMode is set to Font. 

Visual Studio 2015

Windows 10

 

Am I missing something?

Dimitar
Telerik team
 answered on 25 Mar 2016
7 answers
2.2K+ views

I am new to Telerik and is trying to run the selection changed event for my gridview when select different rows. I have the code for the function, but I do not have the code to call this event. I know the event code for the button is generated in the designer.cs when I double click on the button in the form, but how do I generate an event for selection changed and other events which I cannot see? Do I have to add it in to the Designer manually?

 

private void gvUser_SelectionChanged(object sender, Telerik.WinControls.UI.SelectionChangedEventArgs e)
{
}​

Hristo
Telerik team
 answered on 24 Mar 2016
1 answer
339 views

Hi Telerik Forum,
I'd like to put a bookmark (or another marker) on severals fragment doc (inserted programmatically into the radrichtexteditor) in order to easily select them / delete them / replace the whole text/table inside them. I tried to use textrange object in order to do it but without success.
I don't know what's the best approach to do theses actions above.

Some precision about my app :
* my paragraphs text comes from database in html format, so i use htmlprovider to insert them into my final document
* user can modify paragraph with different buttons in order to change the defaults paragraphs generated before

Thx for your help :)

Here's my sample code :

Shared Sub GenerateDocument(rte As RadRichTextEditor)
    Dim document = New RadDocument()
    rte.Document = document
 
    Dim htmlProvider = New HtmlFormatProvider()
    Dim parHtml1 = "<span>Start of Paragrah1</span><br/><table style='border:1px solid black'><tr><td>Desc.</td><td>Value</td></tr><tr><td>Variable1</td><td>10.23</td></tr></table>Some text after the table<br/><span>End of Paragrah1</span><br/>"
    Dim parHtml2 = "<span>Start of Paragrah2</span><br/>Some text before creating table<table style='border:1px solid black'><tr><td>Desc.</td><td>Value</td></tr><tr><td>Variable2</td><td>50.18</td></tr></table><br/><span>End of Paragrah2</span><br/>"
 
    'Converting html to raddoc
    Dim docPar1 = htmlProvider.Import(parHtml1)
    Dim docPar2 = htmlProvider.Import(parHtml2)
 
    'Creating fragments
    Dim fragmentPar1 = New DocumentFragment(docPar1)
    Dim fragmentPar2 = New DocumentFragment(docPar2)
 
    Dim documentEditor As New RadDocumentEditor(document)
 
    'Inserting paragraph 1
    rte.Document.CaretPosition.MoveToLastPositionInDocument()
    documentEditor.InsertBookmark("bookmarkPar1")
    documentEditor.InsertFragment(fragmentPar1)
 
    'Inserting paragraph 2
    rte.Document.CaretPosition.MoveToLastPositionInDocument()
    documentEditor.InsertBookmark("bookmarkPar2")
    documentEditor.InsertFragment(fragmentPar2)
 
    'Trying of selecting / delete / replace all content in specified bookmark (that doesn't work)
    SelectAndUpdateContentBookmark("bookmarkPar1", rte, String.Empty) 'only select
    SelectAndUpdateContentBookmark("bookmarkPar2", rte, "New content") 'select and replace with new text
End Sub
 
Shared Sub SelectAndUpdateContentBookmark(ByVal bookmarkName As String, rte As RadRichTextEditor, newContent As String)
    rte.Focus()
 
    Dim bookmarks() As BookmarkRangeStart = rte.Document.GetAllBookmarks().ToArray()
    Dim posstart As New DocumentPosition(rte.Document)
    Dim posend As New DocumentPosition(rte.Document)
    Dim item = bookmarks.Where(Function(x) x.Name = bookmarkName).FirstOrDefault
 
    If item IsNot Nothing Then
        rte.Document.GoToBookmark(item)
        posstart.MoveToInline(TryCast(item.FirstLayoutBox, InlineLayoutBox), 0)
        posend.MoveToInline(TryCast(item.End.FirstLayoutBox, InlineLayoutBox), 0)
        posstart.MoveToNextInline()
        rte.Document.Selection.SetSelectionStart(posstart)
        rte.Document.Selection.AddSelectionEnd(posend)
 
        'Replacing with new content
        If Not String.IsNullOrEmpty(newContent) Then
            rte.Delete(False)
            rte.Insert(newContent)
        End If
    End If
End Sub

Hristo
Telerik team
 answered on 24 Mar 2016
1 answer
139 views

I have a series where I am using the "LabelFormatting" event to color scatter points individually, and I would like to paint the legend item as a gradient to reflect that is not a single color but I cannot tell how to accomplish it. I am also using something I saw in the forums for adding checkboxes to the legend via handling the VisualItemCreating and replacing with my own derived LegendItemElement. After creating the child elements I am looking at the legend item marker and I see a lot of properties for gradients but no way to activate them.

 

I've also tried setting the BackColor and BackColor2 of the series, as well as NumberOfColors = 2 with no effect.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 24 Mar 2016
1 answer
216 views
Dear support staff,
I am currently working on a project with a very large table(millions of records) in a remote database using c# and mysql database.
Without going in to too much details,  I use the datagridview in VS2010 with the (Virtual Mode with Just-In-Time Data Loading)
as illustrated in this article:

https://msdn.microsoft.com/en-us/library/ms171624%28v=vs.110%29.aspx

Does your gridview support the Virtual Mode with Just-In-Time Data Loading or any thing similar to it that retrieve query result in potions?

yours Murad
Dimitar
Telerik team
 answered on 24 Mar 2016
1 answer
193 views

I am evaluating RadGridview. I need to create lots of custom editors for my upcoming project. To begin with, I just created a simple texteditor with the following code (I referred you demo code for this) .The issue is, the control losing the first key stroke. Suppose I start to edit a column by typing "John" then the column only showing "ohn". 

Did I miss something ??

 

class MyTextEditor : BaseGridEditor
   {
       public RadFormProductList ListForm { get; set; }
       protected override RadElement CreateEditorElement()
       {
           var editor = new MyTextEditorElement();
           return editor;
       }
       public override object Value
       {
           get
           {
               MyTextEditorElement editor = (MyTextEditorElement)this.EditorElement;
               return editor.Text;
           }
           set
           {
               MyTextEditorElement editor = (MyTextEditorElement)this.EditorElement;
               if (value != null && value != DBNull.Value)
               {
                   editor.Text = value.ToString();
               }
               else
               {
                   editor.Text = "";
               }
           }
       }
      
   }
 
   public class MyTextEditorElement : RadTextBoxElement
   {
       public MyTextEditorElement()
       {
           this.BackColor = Color.White;
           this.ShowBorder = false;
       }
 
       protected override Type ThemeEffectiveType
       {
           get
           {
               return typeof(RadTextBoxEditorElement);
           }
       }
 
   }

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 24 Mar 2016
3 answers
107 views

I have a scatter series, and setting the Shape to Telerik.WinControls.UI.DiamondShape does not work. It gives me no markers at all.

Dimitar
Telerik team
 answered on 24 Mar 2016
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
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
Wizard
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
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?