Telerik Forums
UI for WinForms Forum
3 answers
193 views
I have been trying to follow the code for loading data into a radgrid using an xml file with hierarchical data with no luck.  I have a similar file to the sample invoices / parts code located throughout the telerik codes samples and I can't get "table[0]" to bind with table[2].  The one thing I don't see in any of the samples is the properties that need to be set on the grid after in is placed on a winform (not sure if this is really the problem.  Below is the code for my function:

private void uiTSSearchTitleScan_Click(object sender, EventArgs e)
{
    DAOLoginService.DAOLoginService LoginServices = new DAOLoginService.DAOLoginService();
    DAODataService.DAODataService DataServices = new DAODataService.DAODataService();
    try
    {
        // create the objects needed for the process
        XmlDocument Document = new XmlDocument();
        XmlNode Result = null;
        XmlDocument doc = new XmlDocument();
        XslCompiledTransform xslt = new XslCompiledTransform();
        DataSet xmlDataSet = new DataSet();
 
        //Set Variable Values
        string UserCompany = "xxxx";
        string UserName = "xxxxx";
        string UserPassword = "xxxx";
        string sLotBlkUnit = "xxx";
 
        Result = Document.DocumentElement;
        Token = LoginServices.Login(UserCompany, UserName, UserPassword);
        Result = DataServices.GetSubdivisionList(Token, this.uiCboCounty.SelectedValue.ToString(), this.uiTxtSearchFor.Text, "P", sLotBlkUnit, "", "", "", "", "", "");
 
        XmlNode ResultNodes = Document.ImportNode(Result, true);
 
        Document.AppendChild(ResultNodes);
 
        //=============================================
        // save the original data response from titlescan to xml
        //=============================================
        Document.Save("_GetSubdivisionList.xml");
 
        //=============================================
        // need to reformat the xml file to friendly tags so
        // we do it here
        //=============================================
        doc.Load(@"_GetSubdivisionList.xml");
        xslt.Load("GetSubdivisionLotList.xsl");
        xslt.Transform("_GetSubdivisionList.xml", "GetSubdivisionList.xml");
        xmlDataSet.ReadXml("GetSubdivisionList.xml");
 
        //=============================================
        //clear grid from last lookup if applicable
        //=============================================
        this.uiGrdSearchResults.MasterTemplate.Templates.Clear();
        this.uiGrdSearchResults.Relations.Clear();
        
        //=============================================
        // setup the grid and load using the xml data provided
        //=============================================
        GridViewTemplate LotTemplate1 = new GridViewTemplate();
        this.uiGrdSearchResults.MasterTemplate.Templates.Add(LotTemplate1);
        GridViewRelation relation = new GridViewRelation(this.uiGrdSearchResults.MasterTemplate);
        relation.ChildTemplate = LotTemplate1;
        relation.RelationName = "Subdivisions_LotBlockUnits";
        relation.ParentColumnNames.Add("Subdivision_Id");
        relation.ChildColumnNames.Add("LotBlockUnits_Id");
        uiGrdSearchResults.Relations.Add(relation);
 
        if (xmlDataSet.Tables.Count == 0)
        {
            MessageBox.Show("No records found that match the criteria entered.","No Records!",MessageBoxButtons.OK,MessageBoxIcon.Exclamation);
        }
        else
        {
            this.uiGrdSearchResults.DataSource = xmlDataSet.Tables[0];
            LotTemplate1.DataSource = xmlDataSet.Tables[2];
            this.uiGrdSearchResults.MasterTemplate.BestFitColumns();
            this.uiGrdSearchResults.MasterTemplate.Templates[0].BestFitColumns();
        }
    }
    catch (Exception ex)
    {
        if (Convert.ToString(Token) == "00000000-0000-0000-0000-000000000000")
        {
            MessageBox.Show("Login Failed. Token returned was \n" + Token);
        }
        else
        {
            MessageBox.Show(ex.Message);
        }
    }
    finally
    {
        if (Convert.ToString(Token) != "00000000-0000-0000-0000-000000000000")
        {
            LoginServices.Logout(Token);
        }
    }
 
}


The grid will display table[0] correctly with an arrow indicating the child template but when clicking on the arrow the position indicates the child is open but the data does not display.  I have replace table[0] with table[2] as the mastergrid and the data does display as the master data.

Below is a sample of the XML file data

  <?xml version="1.0" encoding="utf-8" ?>
- <Subdivisions>
- <Subdivision>
  <CountyCode>M</CountyCode>
  <Name>CHERRYWOOD VILLAGE CONDO 89-203 POST W/BLKS</Name>
  <Number>CHERRY100</Number>
  <DefinitionFlag>Y</DefinitionFlag>
  <UnitFlag>N</UnitFlag>
  <Comments>UNIT IS LT, BLDG IS BLK EXAMPLE:UNIT 101 BLDG 9500 IS LT 101 BLK 9500 UNIT 9502 BLDG 100 IS LT 950+++</Comments>
- <LotBlockUnits>
- <LotBlockUnit>
  <SubdivisionNumber>CHERRY100</SubdivisionNumber>
  <OpenFlag>Y</OpenFlag>
  <Block>100</Block>
  <StartLot>9502</StartLot>
  <EndLot />
  <StartUnit />
  <EndUnit />
  <StartDate />
  <EndDate />
  <UnitComments />
  </LotBlockUnit>
- <LotBlockUnit>
  <SubdivisionNumber>CHERRY100</SubdivisionNumber>
  <OpenFlag>Y</OpenFlag>
  <Block>100</Block>
  <StartLot>9504</StartLot>
  <EndLot />
  <StartUnit />
  <EndUnit />
  <StartDate />
  <EndDate />
  <UnitComments />
  </LotBlockUnit>
- <LotBlockUnit>
  <SubdivisionNumber>CHERRY100</SubdivisionNumber>
  <OpenFlag>Y</OpenFlag>
  <Block>100</Block>
  <StartLot>9506</StartLot>
  <EndLot />
  <StartUnit />
  <EndUnit />
  <StartDate />
  <EndDate />
  <UnitComments />
  </LotBlockUnit>
- <LotBlockUnit>
  <SubdivisionNumber>CHERRY100</SubdivisionNumber>
  <OpenFlag>Y</OpenFlag>
  <Block>100</Block>
  <StartLot>9508</StartLot>
  <EndLot />
  <StartUnit />
  <EndUnit />
  <StartDate />
  <EndDate />
  <UnitComments />
  </LotBlockUnit>
- <LotBlockUnit>
  <SubdivisionNumber>CHERRY100</SubdivisionNumber>
  <OpenFlag>Y</OpenFlag>
  <Block>100</Block>
  <StartLot>9510</StartLot>
  <EndLot />
  <StartUnit />
  <EndUnit />
  <StartDate />
  <EndDate />
  <UnitComments />
  </LotBlockUnit>
- <LotBlockUnit>
  <SubdivisionNumber>CHERRY100</SubdivisionNumber>
  <OpenFlag>Y</OpenFlag>
  <Block>100</Block>
  <StartLot>9512</StartLot>
  <EndLot />
  <StartUnit />
  <EndUnit />
  <StartDate />
  <EndDate />
  <UnitComments />
  </LotBlockUnit>
-</LotBlockUnits>
  </Subdivision>
  </Subdivisions>

Help!

Doug
Nikolay
Telerik team
 answered on 19 Jul 2011
1 answer
102 views
Hey,
I have created a Chart with a Datatable-Binding. So now I have only one y-Axis. The values are in the same area so i dont need a second y-Axis. But are there only one y-axis if the values are completly diffrent or is then a second y-Axis?
Thanks for your support
Evgenia
Telerik team
 answered on 19 Jul 2011
3 answers
273 views
How can I get a close button in the tabs for document windows in RadDock? Similar to how Firefox has implemented them. I was able to do it in RadPageView by doing something like the following, just not sure where it goes in the tree for a DocumentWindow.

RadButtonElement radB = new RadButtonElement();
radB.MaxSize = new Size(15, 15);
radB.Click += new EventHandler(control.CloseTabButtonClicked);
radB.Font =
  new System.Drawing.Font("Verdana", 7, FontStyle.Regular, GraphicsUnit.Point, ((Byte)0));
radB.Text = "X";
radB.TextElement.Location = new Point(1, 0);
radB.Margin = new Padding(0);
radB.TextAlignment = ContentAlignment.TopLeft;
radB.Alignment = ContentAlignment.MiddleRight;
tabItem.Children[2].Margin = new Padding(0, 0, 20, 0);
tabItem.Children.Add(radB));
Stefan
Telerik team
 answered on 19 Jul 2011
1 answer
66 views
Hi
i am dynamically setting the resources(may be multiple).
when i am double cliking on scheduler new appointment window is opening, that time i want to know from which resource i am creating appointment

Thanks
Hema
Ivan Todorov
Telerik team
 answered on 19 Jul 2011
3 answers
69 views
Hi, I have a problem.
Let's see the picture.
How can I solve this problem. Can anyone help me, thank so much.
Nikolay
Telerik team
 answered on 19 Jul 2011
3 answers
123 views
Hi,

I am using the radpageview in strip mode ,i have problem while applying office colors the pageview doesnt change the colors why is it so ,can anyone explain me why the colors are not applied .



Thanks
Hema
Boryana
Telerik team
 answered on 19 Jul 2011
6 answers
508 views
I have a DataTable that I am setting as the datasource of a RadComboBox. The DataTable has about 1300 entries in it. If I use the standard Windows ComboBox, Autocomplete works quickly, and I have no issues with it. If I try to use the RadComboBox, the first time I enter the field and start typing, the first letter auto-completes fine, but it hangs for 5-10  seconds upon typing the second letter into the field, before it matches values for autocomplete. And  if I click the arrow to display the drop-down list, the form kind of hangs, until I click around for a bit.   Any idea what is causing this, and what I can do to avoid it? No way I can expect my users to put up with that.
Dimitar Terziev
Telerik team
 answered on 18 Jul 2011
1 answer
144 views
Hi ,
we are using RadSchedulerRecurrenceEditor in web application.
so through web application we are saving recurrence rule in database.(in string format)

now we want to read this recurrence rule in windows service and find occurences.
but when we try to add telerik.web.ui reference in windows service its giving error while building.

Error 1 The type or namespace name 'Telerik' could not be found (are you missing a using directive or an assembly reference?) 

so do we have different set of dll's for windows service? if yes from where i can get it?

and what approch i shoud follow to get my requirment?

waiting for your reply...




Veronica
Telerik team
 answered on 18 Jul 2011
4 answers
109 views
I am new to the Telerik Windows controls(Usually a Web guy), but do you guys not have a Rich Textbox Editor for Windows?  I see one for WPF, Silverlight and ASP.NET, but not for Windows...unless I am missing something.

thanks
Nikolay
Telerik team
 answered on 18 Jul 2011
1 answer
133 views
hi sorry I'm new to telerik, provide long tryouts, and I liked, but my question is, what is the difference between Q1, Q2 and Q3?
Nikolay
Telerik team
 answered on 18 Jul 2011
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
ProgressBar
CheckedDropDownList
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
VirtualKeyboard
NavigationView
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?