Telerik Forums
UI for WinForms Forum
13 answers
549 views
On ListControl with SelctionMode MultiSimple the SelectedIndexChanged event fires whenever an item is selected, but only fires on de-selection when the items are de-selected in the reverse order that they were selected in. It's as if when selecting items it forms a stack (firing the event on each select) and when de-selecting items the event only fires if the item on the top of the stack is de-selected).  Is there another event I should be using?
Peter
Telerik team
 answered on 19 Nov 2010
4 answers
188 views
Since Q3-2010 the font property on the RadButton doesn't work. However you can change the textboxitem element to set the font but can you explain why this is now the case ?

I haven't checked every rad control but the SpinEditor has the same issue...

Thanks


Paul.
Stefan
Telerik team
 answered on 19 Nov 2010
2 answers
162 views
Hi

Since the new release of Q3-2010 controls I cannot set the Drop Down size to a manual size. I used to use the "DropDownMinSize" property but now it doesn't work. Neither does any other size related property for that matter.

Am I doing something wrong or has the Q3-2010 release stopped this property working ?

Many thanks


Paul.
Peter
Telerik team
 answered on 19 Nov 2010
11 answers
397 views
Hi Guys,

I wonder if any one can shed some light on an issue I am having.

I have a form created from the RadForm template (2009 Q2), and if I turn off the ControlBox, MinimiseBox, MaximiseBox and then run the project the form renders with some of the desktop background in the form. If you add any one of these boxes back in the issue goes away. Is this expected behaviour? If so is there anyway around it? So far my only option seems to be leaving the ControlBox in place which the application does not really require.

I have attached a screen shot which shows the purple of my desktop wallpaper peeking through the form,

Thanks in advance.

Best regards,
Duane.

Edited: for spellos
Duane
Top achievements
Rank 1
 answered on 19 Nov 2010
11 answers
191 views
i am using the code given below to add a grid template .in this controls are
dgrdsubcategory -> RAD GRID
category is the table from database it returns 

Please Reply at earliest

dgrdSubCategory.AutoGenerateHierarchy = true;
            SqlDataAdapter sdaCatid = null;
            DataSet dsCatid = new DataSet();
            DataSet dsGrid = DBFunctions.FillRadDataGirdReturnDS("category where parentcatid IN (select catid from category where catname='" + TV1.SelectedNode.Text + "')", dgrdSubCategory);
 
            for (int i = 0; i < dsGrid.Tables[0].Rows.Count; i++)
            {
                DataRow drow = dsGrid.Tables[0].Rows[i];
                sdaCatid = FillDataset("category where parentcatid='" + drow["catid"] + "'");
                sdaCatid.Fill(dsCatid);
 
            }
            
 
            GridViewTemplate template = new GridViewTemplate();
            template.DataSource = dsCatid.Tables[0];
//i get values in the template variable
            dgrdSubCategory.MasterGridViewTemplate.ChildGridViewTemplates.Add(template);
 
            GridViewRelation relation = new GridViewRelation(dgrdSubCategory.MasterTemplate);
            relation.ChildTemplate = template;
            relation.RelationName = "SubCategory";
            relation.ParentColumnNames.Add("catid");
            relation.ChildColumnNames.Add("catid");
            dgrdSubCategory.Relations.Add(relation);
            radGrid1.DataSource = template;

///But though i have done this i dont get the corresponding result.
//It shows a "+" sign but nothing comes under it when clicked on "+"

public static SqlDataAdapter FillDataset(string strTableName)  { 
ds = new SqlDataAdapter();
sda=new SqlDataAdapter();
 conn = new SqlConnection();
conn.ConnectionString = ConfigurationSettings.AppSettings["conString"];
string strCmd = "select * from " + strTableName;
sqlcommand sqlCmd = new SqlCommand(strCmd, conn);
                sda = new SqlDataAdapter(sqlCmd);
                //sda.Fill(ds);
                //dgrdv.DataSource = ds.Tables[0];            
}
            catch (Exception excep)
            {
                MessageBox.Show("" + excep.Message + "  Stack Trace:" + excep.StackTrace, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            return sda;
        }
lic static SqlDataAdapter FillDataset(string strTableName)
        {
            SqlDataAdapter ds = new SqlDataAdapter();
            SqlDataAdapter sda=new SqlDataAdapter();
            try
            {
                SqlConnection conn = new SqlConnection();
                conn.ConnectionString = ConfigurationSettings.AppSettings["conString"];
                string strCmd = "select * from " + strTableName;
                SqlCommand sqlCmd = new SqlCommand(strCmd, conn);
                sda = new SqlDataAdapter(sqlCmd);
                //sda.Fill(ds);
                //dgrdv.DataSource = ds.Tables[0];

            }
            catch (Exception excep)
            {
                MessageBox.Show("" + excep.Message + "  Stack Trace:" + excep.StackTrace, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            return sda;
        }


dgrdSubCategory.AutoGenerateHierarchy = true;
            SqlDataAdapter sdaCatid = null;
            DataSet dsCatid = new DataSet();
            DataSet dsGrid = DBFunctions.FillRadDataGirdReturnDS("category where parentcatid IN (select catid from category where catname='" + TV1.SelectedNode.Text + "')", dgrdSubCategory);

            for (int i = 0; i < dsGrid.Tables[0].Rows.Count; i++)
            {
                DataRow drow = dsGrid.Tables[0].Rows[i];
                sdaCatid = FillDataset("category where parentcatid='" + drow["catid"] + "'");
                sdaCatid.Fill(dsCatid);

            }
            int count = dsCatid.Tables[0].Rows.Count;

            GridViewTemplate template = new GridViewTemplate();
            template.DataSource = dsCatid.Tables[0];
            dgrdSubCategory.MasterGridViewTemplate.ChildGridViewTemplates.Add(template);

            GridViewRelation relation = new GridViewRelation(dgrdSubCategory.MasterTemplate);
            relation.ChildTemplate = template;
            relation.RelationName = "SubCategory";
            relation.ParentColumnNames.Add("catid");
            relation.ChildColumnNames.Add("catid");
            dgrdSubCategory.Relations.Add(relation);
            radGrid1.DataSource = template;
dgrdSubCategory.AutoGenerateHierarchy = true;
            SqlDataAdapter sdaCatid = null;
            DataSet dsCatid = new DataSet();
            DataSet dsGrid = DBFunctions.FillRadDataGirdReturnDS("category where parentcatid IN (select catid from category where catname='" + TV1.SelectedNode.Text + "')", dgrdSubCategory);

            for (int i = 0; i < dsGrid.Tables[0].Rows.Count; i++)
            {
                DataRow drow = dsGrid.Tables[0].Rows[i];
                sdaCatid = FillDataset("category where parentcatid='" + drow["catid"] + "'");
                sdaCatid.Fill(dsCatid);

            }
            int count = dsCatid.Tables[0].Rows.Count;

            GridViewTemplate template = new GridViewTemplate();
            template.DataSource = dsCatid.Tables[0];
            dgrdSubCategory.MasterGridViewTemplate.ChildGridViewTemplates.Add(template);

            GridViewRelation relation = new GridViewRelation(dgrdSubCategory.MasterTemplate);
            relation.ChildTemplate = template;
            relation.RelationName = "SubCategory";
            relation.ParentColumnNames.Add("catid");
            relation.ChildColumnNames.Add("catid");
            dgrdSubCategory.Relations.Add(relation);
            radGrid1.DataSource = template;


 dgrdSubCategory.AutoGenerateHierarchy = true;
            SqlDataAdapter sdaCatid = null;
            DataSet dsCatid = new DataSet();
            DataSet dsGrid = DBFunctions.FillRadDataGirdReturnDS("category where parentcatid IN (select catid from category where catname='" + TV1.SelectedNode.Text + "')", dgrdSubCategory);

            for (int i = 0; i < dsGrid.Tables[0].Rows.Count; i++)
            {
                DataRow drow = dsGrid.Tables[0].Rows[i];
                sdaCatid = FillDataset("category where parentcatid='" + drow["catid"] + "'");
                sdaCatid.Fill(dsCatid);

            }
            int count = dsCatid.Tables[0].Rows.Count;

            GridViewTemplate template = new GridViewTemplate();
            template.DataSource = dsCatid.Tables[0];
            dgrdSubCategory.MasterGridViewTemplate.ChildGridViewTemplates.Add(template);

            GridViewRelation relation = new GridViewRelation(dgrdSubCategory.MasterTemplate);
            relation.ChildTemplate = template;
            relation.RelationName = "SubCategory";
            relation.ParentColumnNames.Add("catid");
            relation.ChildColumnNames.Add("catid");
            dgrdSubCategory.Relations.Add(relation);
            radGrid1.DataSource = template;
dgrdSubCategory.AutoGenerateHierarchy = true;
            SqlDataAdapter sdaCatid = null;
            DataSet dsCatid = new DataSet();
            DataSet dsGrid = DBFunctions.FillRadDataGirdReturnDS("category where parentcatid IN (select catid from category where catname='" + TV1.SelectedNode.Text + "')", dgrdSubCategory);

            for (int i = 0; i < dsGrid.Tables[0].Rows.Count; i++)
            {
                DataRow drow = dsGrid.Tables[0].Rows[i];
                sdaCatid = FillDataset("category where parentcatid='" + drow["catid"] + "'");
                sdaCatid.Fill(dsCatid);

            }
            int count = dsCatid.Tables[0].Rows.Count;

            GridViewTemplate template = new GridViewTemplate();
            template.DataSource = dsCatid.Tables[0];
            dgrdSubCategory.MasterGridViewTemplate.ChildGridViewTemplates.Add(template);

            GridViewRelation relation = new GridViewRelation(dgrdSubCategory.MasterTemplate);
            relation.ChildTemplate = template;
            relation.RelationName = "SubCategory";
            relation.ParentColumnNames.Add("catid");
            relation.ChildColumnNames.Add("catid");
            dgrdSubCategory.Relations.Add(relation);
            radGrid1.DataSource = template;


 dgrdSubCategory.AutoGenerateHierarchy = true;
            SqlDataAdapter sdaCatid = null;
            DataSet dsCatid = new DataSet();
            DataSet dsGrid = DBFunctions.FillRadDataGirdReturnDS("category where parentcatid IN (select catid from category where catname='" + TV1.SelectedNode.Text + "')", dgrdSubCategory);

            for (int i = 0; i < dsGrid.Tables[0].Rows.Count; i++)
            {
                DataRow drow = dsGrid.Tables[0].Rows[i];
                sdaCatid = FillDataset("category where parentcatid='" + drow["catid"] + "'");
                sdaCatid.Fill(dsCatid);

            }
            int count = dsCatid.Tables[0].Rows.Count;

            GridViewTemplate template = new GridViewTemplate();
            template.DataSource = dsCatid.Tables[0];
            dgrdSubCategory.MasterGridViewTemplate.ChildGridViewTemplates.Add(template);

            GridViewRelation relation = new GridViewRelation(dgrdSubCategory.MasterTemplate);
            relation.ChildTemplate = template;
            relation.RelationName = "SubCategory";
            relation.ParentColumnNames.Add("catid");
            relation.ChildColumnNames.Add("catid");
            dgrdSubCategory.Relations.Add(relation);
            radGrid1.DataSource = template;

 dgrdSubCategory.AutoGenerateHierarchy = true;
            SqlDataAdapter sdaCatid = null;
            DataSet dsCatid = new DataSet();
            DataSet dsGrid = DBFunctions.FillRadDataGirdReturnDS("category where parentcatid IN (select catid from category where catname='" + TV1.SelectedNode.Text + "')", dgrdSubCategory);

            for (int i = 0; i < dsGrid.Tables[0].Rows.Count; i++)
            {
                DataRow drow = dsGrid.Tables[0].Rows[i];
                sdaCatid = FillDataset("category where parentcatid='" + drow["catid"] + "'");
                sdaCatid.Fill(dsCatid);

            }
            int count = dsCatid.Tables[0].Rows.Count;

            GridViewTemplate template = new GridViewTemplate();
            template.DataSource = dsCatid.Tables[0];
            dgrdSubCategory.MasterGridViewTemplate.ChildGridViewTemplates.Add(template);

            GridViewRelation relation = new GridViewRelation(dgrdSubCategory.MasterTemplate);
            relation.ChildTemplate = template;
            relation.RelationName = "SubCategory";
            relation.ParentColumnNames.Add("catid");
            relation.ChildColumnNames.Add("catid");
            dgrdSubCategory.Relations.Add(relation);
            radGrid1.DataSource = template;
Richard Slade
Top achievements
Rank 2
 answered on 19 Nov 2010
4 answers
147 views
Hi,

I have a RadTreeView with a list of nodes, each of which should have a count after them.

Root (10)
-- Cars (20)
---- Ford (12)
---- Chrysler (2)
---- GM (30)

I realize I can use the tag to store a "value" for the node independent of the display format - I'm already doing that.  However, when I export the data in the table, I make use of the convenient "Path" property to flatten out the hierarchy.  Is there a way to generate the Path from the Tag property rather than from the Text property?

How would you go about exporting this to a list that looks like this?:

Root
Root/Cars
Root/Cars/Ford
Root/Cars/Chrysler
Root/Cars/GM

I'd rather not write the code to walk the tree and construct the paths myself - but it's the most practical solution I can think of.

Richard Slade
Top achievements
Rank 2
 answered on 19 Nov 2010
1 answer
225 views
can i wrap text in RAD tree View control
Richard Slade
Top achievements
Rank 2
 answered on 19 Nov 2010
6 answers
225 views
Hi, in my program I have a RadGridView. Some of the cells are formatted with different backgroundcolor or they are disabled. The first time I bind the grid with data read from a table of a database it shows correct but If I update the grid it loses the format (All the cells are white and enabled) . 

The cells are formatted according to this approach  http://www.telerik.com/community/forums/winforms/gridview/createcell-event-cellelement-is-always-null.aspx (First it sets a tag for each cell in DataBindingComplete and subsequently depending on this value it sets backcolor and enabled properties for the cell.)

Here is the code (Cheers to Emanuel Varga for it):

void radGridView1_CellFormatting(object sender, CellFormattingEventArgs e)
{
    if (e.CellElement.RowInfo.Cells[0].Tag != null && e.CellElement.RowInfo.Cells[0].Tag.Equals(true))
    {
        e.CellElement.BackColor = Color.Red;
        e.CellElement.DrawFill = true;
    }
    else
    {
        e.CellElement.ResetValue(LightVisualElement.BackColorProperty, ValueResetFlags.Local);
        e.CellElement.ResetValue(LightVisualElement.DrawFillProperty, ValueResetFlags.Local);    
    }
}
   
void radGridView1_DataBindingComplete(object sender, GridViewBindingCompleteEventArgs e)
{
    foreach (var row in radGridView1.Rows)
    {
        if (row.Index % 2 == 0)
        {
            row.Cells[0].Tag = true;
        }
    }
}

Thanks for the answers.
Richard Slade
Top achievements
Rank 2
 answered on 19 Nov 2010
4 answers
243 views
Hi,

I would like to change tooltip value which is ('Close Page') on PageView's close button because my application is in French.
I searched but I didn't find how to do it ?

Could you help me please ?

Thanks

best regards.

Fred
Cantenot Frederic
Top achievements
Rank 1
 answered on 19 Nov 2010
2 answers
231 views

Hi

 

I tried to hide the GroupPanel and for that I set the ShowGroupPanel property  to fasle but nothing change.

I'm using version  Q2 2010

Can someone help me with that ?


Thank u,
Emanuel Varga
Top achievements
Rank 1
 answered on 19 Nov 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?