Telerik Forums
UI for WinForms Forum
2 answers
132 views
Is it possible to prevent users from moving and reordering tiles?
Jack
Telerik team
 answered on 25 Jan 2013
9 answers
238 views
Is there a way to put a date picker in a ribbon bar chunk?
Peter
Telerik team
 answered on 25 Jan 2013
3 answers
387 views
Dear All,

I have two RadGridView in WindowsForms namely radGridView1 and radGridView2.
 
I have data in radGridView1 and also i need to drag and drop radGridView1 row to radGridView2 wise single row and multi row.

And also no data in radGridView2.

My coding are mentioned below.

private void Form1_Load(object sender, EventArgs e)
       {
           DataTable dt = new DataTable();
           dt = c.getdata();
           radGridView1.DataSource = dt;
       }
public DataTable getdata()
       {
           con.Open();
           cmd = new SqlCommand("select * from employee", con);
           sda = new SqlDataAdapter(cmd);
           sda.Fill(dt);
 
           con.Close();
           return dt;
       }


How to implement this?

Thanks in Advance..!

Svett
Telerik team
 answered on 25 Jan 2013
4 answers
329 views
Hi -

 How can I make the width of my drop down be the width of the largest row in the drop down?

 Thanks,
Anton
Telerik team
 answered on 25 Jan 2013
3 answers
111 views
Hello Sir,

We have bought Telerik License and we are using Telerik product from a long period of time. Now we want to update our Telerik License so that we are able to use updated version of Telerik with updated controls.But we are facing some problems with the Latest verion. As we are using Trial version of Telerik and while using it we have found that it is being clashed with its previous version. 
Issue is that when we upgrade Latest verion of Telerik with the Previous version, it replaces Previous version completely(replaces old DLL with new DLL in same folder) and because of which a lot of problems occurs with the previous controls of Telerik. As Our Software is divided into multiple Exe files and we are using Telerik dll in these files and these are being used in multiple places and we do not want to compile all exe's again with new version. so we are not able to update our License because of the problems with some controls in previous version's exe. Please provide us the solution of this problem so that we can update our Telerik License and using it our Software will run without any problem.

Thank you
Biliana Ficheva
Telerik team
 answered on 25 Jan 2013
2 answers
289 views
Hi, :)

I use a radgridview inside my application where certain words inside of cells should be marked. At the moment I solved this via DisableHTMLRendering and manipulating the data displayed in the cells... for instance with 
cellInfo.Value = "<html>" + cellInfo.Value.ToString() + "</html>";
foreach (KeyValuePair<String, Color> kvp in this._highlightWords)
{
    cellInfo.Value = Regex.Replace(cellInfo.Value.ToString(), kvp.Key, "<span style=" + '"' + "background-color:" + System.Drawing.ColorTranslator.ToHtml(kvp.Value) + '"' + ">" + kvp.Key + "</span>", RegexOptions.IgnoreCase);
    string[] tmpString = Regex.Split(cellInfo.Value.ToString(), kvp.Key, RegexOptions.IgnoreCase);
}

I have a list of words to be marked and I want them to have a colored background... depending on the current word.

Works fine so far, but I do have problems with the encoding. Special characters, like "ä", "ö" are not displayed properly... is there any way to set the encoding?

I already tried to hard-convert my content to utf-8, but that didn't change anything.

byte[] utf8String = Encoding.UTF8.GetBytes(cellInfo.Value.ToString());
cellInfo.Value = Encoding.UTF8.GetString(utf8String);

The data is received from a SQLCE database... am I doing something wrong? Or is this only solvable via the webbrowsercolumns you mentioned in another thread? Will those webbrowsercolumns still be performant, if I do have thousands of them? :)

Thanks in advance!
Kind Regards
Fabian
RAG
Top achievements
Rank 1
 answered on 25 Jan 2013
1 answer
241 views

I am currently create an web application to load the selected order in the client transaction record by clicking the copy button in the RadGrid. I implement this by getting the id of the order and retrieve the required entity to insert the form.

JS Runtime Error That Microsoft JScript runtime error: 'document.getElementById(...)' is null or not an object By using MVVM Model , I preset the blank row to be null in terms of the mapped fields such as consumer ID , order ID , consumer Name , Price and so on .

The Order Reference Id is named as referenceOrder and retrieve the LoadReference to insert the record

I am currently using C# , Visual Studio 2012.

What I want to ask is there any methodology to check if the row is blank before the copy action being executed ?

The below is my code



 protected void grdCustomerReport_ItemCommand(object sender, GridCommandEventArgs e)
    {
        // [Start] Declare Grid and GridData.
        RadGrid CurrentGrid = (RadGrid)sender;
        GridDataCustomerReport GridSource = PageSource.GrdCustomerReport;
        //[End] 
        if (e.CommandName == "CustomInsert" &&
            GridSource.state != GridModelState.Edit)
        {
           //Add blank row
        }
        else if (e.CommandName == "DeleteCurrent")
        {
          //Delete Row
            CurrentGrid.Rebind();
        }
        else if (e.CommandName == "Copy") <--I click the button and retrieve the dataset index 
        {
            //Check if there is empty row  ? 

            int referenceOrder ;
            int rowIndex = Convert.ToInt32(e.CommandArgument);

            RadComboBox cbo= (RadComboBox) CurrentGrid.Items[rowIndex].FindControl("cboCode");
            if (cbo.SelectedIndex > 0  && cbo.SelectedValue != "")
            {
                referenceOrder = Convert.ToInt32(cbo.SelectedValue);
                PageSource.SetOrder(referenceOrder );
                LoadReference();
            }
            else
            {
               winAlert.RadAlert("<b>" + "Please Select Reference Orderin the Dropdown List" + "</b>.<br />", 330, 100, "", null);
            }
        }
    }
Angel Petrov
Telerik team
 answered on 25 Jan 2013
1 answer
217 views
Hi,

When users need to select from a large list a dropdownlist is arguably not necessarily the best solution. However using teleriks "SuggestAppend" option it is a user friendly option. I'm faced with a patient list which potentially has a few thousand names. Instead of binding the full list, I'd like to bind a subset based on the users input: load on demand.

So far I managed to get things working. The dropdownlist is populated when the user inputs at least 3 characters. I also enabled "SuggestAppend" on the control. I'm using the Key_Up event like this:
/// <summary>
/// Load on demand drop down list
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
/// <remarks></remarks>
private void ddlPatient_KeyUp(object sender, System.Windows.Forms.KeyEventArgs e)
{
    //Datasource only changes when user hits a letter
    //OrElse e.KeyCode = Keys.Return Then
    if ((e.KeyCode >= Keys.A && e.KeyCode <= Keys.Z)) {
        //and we have atleast 3 characters
        if (ddlPatient.Text.Length > 2) {
            //suspend any further keyboard input, untill we're done
            ddlPatient.KeyDown += SuspendKeyboard;
            string txt = ddlPatient.Text;
            //update de dropdown datasource based on the user input (from Open Access model)
            ddlPatient.DataSource = _context.Patients
                  .Where(c => c.Naam.StartsWith(txt) || c.GetrouwdeNaam.StartsWith(txt))
                            .OrderBy(c => c.Naam)
                                                 .ThenByDescending(c => c.GeboorteDatum)
                                 .Take(100);
            //This should be done when initializing the form
            //ddlPatient.DisplayMember = "InfoZoekPatient"
            //ddlPatient.ValueMember = "PatientID"
            //restore the user input and place the cursor at the and of the text
            ddlPatient.Text = txt;
            ddlPatient.SelectionStart = txt.Length;
            //restore keyboard input
            ddlPatient.KeyDown -= SuspendKeyboard;
        }
        e.Handled = true;
        e.SuppressKeyPress = true;
    }  
}
 
/// <summary>
/// Catch any keyboard input and ignore it!
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
/// <remarks></remarks>
private void SuspendKeyboard(object sender, KeyEventArgs e)
{
    e.Handled = true;
    e.SuppressKeyPress = true;
}

The problem is that the selected value of the dropdownlist does not necessarily reflect the user selection? Somehow it gets the value of the first item of the renewed datasource. I've fixed this with the leave event:

/// <summary>
/// When a patient was not selected, but the user enter a search string we need to clean up.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
/// <remarks></remarks>
private void ddlPatient_Leave(object sender, System.EventArgs e)
{
    RadDropDownList ddl = sender;
    bool clear = true;
    //check if the selected item valuemember equals the ddl text.
    if (ddl.SelectedItem != null) {
        Patient pat = ddl.SelectedItem.DataBoundItem;
        if (pat != null) {
            if (ddl.Text.Trim == pat.InfoZoekPatient.Trim)
                clear = false;
        }
    }
 
    if (clear) {
        ddl.SelectedIndex = -1;
        ddl.Text = string.Empty;
        ddl.SelectedItem = null;
        ddl.Update();
    }
 
}

Now, it works but it seems like a lot of code compared to the ASP.Net control...
Is there an easier way to do this?

Regards,
Raoul
Peter
Telerik team
 answered on 24 Jan 2013
1 answer
97 views
Hi,Telerik

     My  RadTreeView is customize . And RadTreeView associated with  RadTreeView .Now,I want  to Click RadContextMenu's  "Add Node"  enevt  at  the end of RadTreeView 's nodes  add  an node. Please let me konw how to do.
 

Thanks very much.
Plamen
Telerik team
 answered on 24 Jan 2013
4 answers
221 views
Hello,

I have some trouble with RadMaskedEditBox using Numeric Masks.
When I use a standard Numeric Mask like "c2" or "N", it's working.
When I try to use any Custom Numeric Mask like "#,##.00 'CHF'" or a simple "0" I'm getting in trouble (can't type anything in the maskedbox !).

My final purpose is to have a mask for Swiss Currency typing (independant of culture, so I can't use the standard currency).
Some examples: "120.00 CHF", "1'420.15 CHF".

I actually use a workaround with the "N2" mask and a label for my "CHF".

Thanks
Peter
Telerik team
 answered on 24 Jan 2013
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)
Chart (obsolete as of Q1 2013)
Form
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
Diagram, DiagramRibbonBar, DiagramToolBox
GanttView
Panorama
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
TrackBar
MessageBox
Rotator
SpinEditor
StatusStrip
CheckedListBox
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
DataEntry
ScrollablePanel
ScrollBar
WaitingBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
Callout
ColorBox
PictureBox
FilterView
Accessibility
NavigationView
VirtualKeyboard
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
BarcodeView
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
DateOnlyPicker
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?