Telerik Forums
UI for ASP.NET AJAX Forum
10 answers
241 views
Hello,

I want the demo for Filtering and grouping in one radgrid
Please give me the demo for My requirement.

Please help me its urgent.

Regards
Eyup
Telerik team
 answered on 22 Nov 2012
1 answer
148 views
Hello

I am developing a usercontrol using Radgrid. My problem is that when I insert a template column containing a RadAutoCompleteBox the insert command stops firing and the callback from the RadAutoCompleteBox inside the TemplateColumn is invalid. In Edit Mode everything works fine. If I remove the column from the grid the insert command starts firing again and works perfectly, any ideas as to what the problem might be? 

the code for my custom column is as follows:

public class GridLookupColumn : GridTemplateColumn
    {
        private string _lookupDataMember;
 
        public string LookupDataMember
        {
            get { return _lookupDataMember; }
            set { _lookupDataMember = value; }
        }
        private string _lookupTextField;
 
        public string LookupTextField
        {
            get { return _lookupTextField; }
            set { _lookupTextField = value; }
        }
        private string _lookupValueField;
 
        public string LookupValueField
        {
            get { return _lookupValueField; }
            set { _lookupValueField = value; }
        }
        public class LookupActionTemplate : IBindableTemplate
        {
            public GridLookupColumn Column = null;
            
            
            public void InstantiateIn(Control container)
            {
                RadAutoCompleteBox lookup = new RadAutoCompleteBox();
                lookup.ID ="LC" + this.Column.UniqueName;
                lookup.DataSource = Column.Owner.OwnerGrid.DataSource;
                lookup.DataMember = Column.LookupDataMember;
                lookup.DataTextField = Column.LookupTextField;
                lookup.DataValueField = Column.LookupValueField;
                lookup.EnableViewState = true;
                container.Controls.Add(lookup);
                 
                 
                lookup.DataBind();
                lookup.DataBinding += new EventHandler(LookupDataBindingHandler);
                lookup.EntryAdded += new AutoCompleteEntryEventHandler(EntryAddedHandler);
                 
            }
            private void EntryAddedHandler(object sender, EventArgs e)
            {
                RadAutoCompleteBox lookup = sender as RadAutoCompleteBox;
                if (lookup.Entries.Count > 1)
                {
                    lookup.Entries.RemoveAt(0);
                    ExtractValues(lookup.NamingContainer as GridDataItem);
                     
                }
            }
            private void LookupDataBindingHandler(object sender, EventArgs e)
            {
                RadAutoCompleteBox lookup = sender as RadAutoCompleteBox;
                GridDataItem item = (GridDataItem)lookup.NamingContainer;
                string id = DataBinder.Eval(item.DataItem, this.Column.DataField).ToString();
                string text = String.Empty;
                DataSet data = (DataSet)Column.Owner.DataSource;
                foreach (DataRow r in data.Tables[Column.LookupDataMember].Rows)
                {
                    if (r[Column.LookupValueField].ToString() == id)
                    {
                        text = r[Column.LookupTextField].ToString();
                    }
                }
                AutoCompleteBoxEntry entry = new AutoCompleteBoxEntry(text, id);
                if(text != String.Empty)
                lookup.Entries.Add(entry);
                 
                             
                 
            }
 
            public System.Collections.Specialized.IOrderedDictionary ExtractValues(Control container)
            {
                IOrderedDictionary values = new OrderedDictionary();
                RadAutoCompleteBox lookup = container.FindControl("LC" + Column.UniqueName) as RadAutoCompleteBox;
                values.Add(Column.UniqueName, lookup.Entries[0].Value);
                return values;
            }
        }
        public class LookupTemplate : ITemplate
        {
            public GridLookupColumn Column = null;
            public void InstantiateIn(Control container)
            {
                Label l = new Label();
                l.ID = Column.UniqueName;
                container.Controls.Add(l);
                l.DataBinding += new EventHandler(LookupDataBindingHandler);
            }
            private void LookupDataBindingHandler(object sender, EventArgs e)
            {
                Label l = sender as Label;
                GridDataItem item = (GridDataItem)l.NamingContainer;
                string id = DataBinder.Eval(item.DataItem, this.Column.DataField).ToString();
                DataSet data = (DataSet) Column.Owner.DataSource;
                foreach (DataRow r in data.Tables[Column.LookupDataMember].Rows)
                {
                    if (r[Column.LookupValueField].ToString() == id)
                    {
                        l.Text = r[Column.LookupTextField].ToString();
                    }
                }
                  
 
            }
        }
         
        public GridLookupColumn()
        {
             
            LookupActionTemplate lookupActionTemplate = new LookupActionTemplate();
            LookupTemplate lookupTemplate = new LookupTemplate();
            lookupTemplate.Column = this;
            lookupActionTemplate.Column = this;
            this.EditItemTemplate = lookupActionTemplate;
            this.ItemTemplate = lookupTemplate;
            this.InsertItemTemplate = lookupActionTemplate;
            
             
             
             
        }
    }

I create the grid on Page Load as described in the documentation.

Any help is highly appreciated

Best Regards,

Claus Veirup
Antonio Stoilkov
Telerik team
 answered on 22 Nov 2012
2 answers
87 views

Hello, I have some problems with the RadNumericTextBox.
If is set the value

 

var tbox = document.getElementById(elementId);
if (tbox) {
    tbox.value = value;
}

The textbox display value is changed but if i click the textbox the value dissapears.
So i tried to see if the online examples work, but that won't work either. Or i am missing the point.
Ive updated to the latest release of the asp.net ajax controls.

Can you help me?

Greetings
Marcel de Groot



ABECON Groep BV
Top achievements
Rank 1
 answered on 22 Nov 2012
1 answer
110 views
Hello Team ,

I am really happy use telerik controls . There are really good. I am facing one problem , I dont know why it is ? I need you people help .

I am using telerik tab strip , worked for me great for some days . This is my sample code.

 <telerik:radtabstrip id="radGallaryTabStrip" runat="server" skin="Vista" multipageid="radPhotoGallarymultiPage"
                selectedindex="0">
                        <Tabs>
                            <telerik:RadTab Text="Gallery" runat="server">
                            </telerik:RadTab>
                            <telerik:RadTab Text="Floor plans" runat="server" Selected="True">
                            </telerik:RadTab>
                        </Tabs>
                    </telerik:radtabstrip>
            <div class="AP-telericblock">
                <telerik:radmultipage runat="server" id="radPhotoGallarymultiPage" selectedindex="0">
                            <telerik:RadPageView runat="server" ID="radPhotoGallary">
                                <Smart:newPropertyImageGallary ID="ucNewPropertyGallary" runat="server" />
                            </telerik:RadPageView>
                            <telerik:RadPageView ID="radFloorGallary" runat="server">
                               <Smart:newFloorplanGallary ID="ucFloorPlanGallary" runat="server"></Smart:newFloorplanGallary>
                            </telerik:RadPageView>
                           
                        </telerik:radmultipage>
            </div>


After some tabs , my tab clicks are not working . I am attaching a screen shot for you . There is # symbol coming up in the url and controls are not firing . Please help to get out of the problem . It is really urgent for me .

Thanks

Rama. M





Rama
Top achievements
Rank 1
 answered on 22 Nov 2012
1 answer
63 views
Are there any plans for adding caching to the AutocompleteBox like the RadComboBox has?
Kalina
Telerik team
 answered on 22 Nov 2012
3 answers
96 views
This is my requirement,

I have a radgrid - that shows project names
I have a detailed table - that shows project details

So by default i want to expand all the projects and bind the project details to detailed table. The DataSource value for detailed table will be from SQL. 

Please give me a link for similar sample. Or tell me some idea. 

Right now, i tried to expand the node by default in prerender method. But the detailed table's datasource is coming from the Grid i.e. the project names is displayed in detailed table also. 

Any Suggestion?
Shinu
Top achievements
Rank 2
 answered on 22 Nov 2012
20 answers
3.1K+ views
Hi,

Trying to add a RadAjaxManager to my page.  I'm getting the "Error Creating Control ... Could not load file or assembly 'Telerik ... " error.

I'm using VS 2005 Orcas and the v3.5 .NET framework ... I'm also using Vista x64 Enterprise ... and I also have the Microsoft AJAX Dev Toolkit installed.  I've also installed the SP1 for Prometheus 

BTW ... the RadAjaxmanager for RAD 2007 Q1 SP1 works fine ...

Cheers,

Gp.
Matthew
Top achievements
Rank 1
 answered on 21 Nov 2012
1 answer
126 views
Hi,
here you can see my code:

<telerik:RadChart ID="RadChart12" runat="server" Width="600px" Height="400px" DataSourceID="SqlDataSource12" AutoLayout="true" SeriesOrientation="Vertical" Style="float: left;">
            
            <ChartTitle TextBlock-Text="Slot History" TextBlock-Appearance-TextProperties-Color="#333333" Appearance-FillStyle-MainColor="Transparent"></ChartTitle>
             <Appearance Border-Color="Transparent" >
                    <FillStyle   MainColor="Transparent" />               
               </Appearance>
            <Legend Visible="false">
                <Appearance ItemTextAppearance-TextProperties-Color="White" FillStyle-MainColor="Transparent" GroupNameFormat="#VALUE">
                </Appearance>
            </Legend>
            <Series>
            
                <telerik:ChartSeries Name="Total Trains" DataYColumn="count" >
                    <Appearance>
                       
                        <LabelAppearance Visible="FALSE"></LabelAppearance>
                        <FillStyle MainColor="#fbb03b" SecondColor="#fbb03b" >
                        </FillStyle>
                    </Appearance>
                    
                </telerik:ChartSeries>
                <telerik:ChartSeries Name="Cumulative Percentage" YAxisType="Secondary" DataYColumn="Pct_To_Total" DataLabelsColumn="labelPerc" Type="Spline">
                     <Appearance>
                     
                     <TextAppearance  TextProperties-Color="Black"></TextAppearance>
                        
                        <FillStyle  MainColor="Red">
                        </FillStyle>
                    </Appearance>
                </telerik:ChartSeries>
            </Series>
            <PlotArea Appearance-FillStyle-MainColor="Transparent" Appearance-FillStyle-SecondColor="Transparent" >
                        <YAxis2 Appearance-TextAppearance-TextProperties-Color="#333333" Appearance-MajorGridLines-Visible="false" Appearance-MinorGridLines-Visible="false"></YAxis2>
                        <YAxis Appearance-TextAppearance-TextProperties-Color="#333333" Appearance-MajorGridLines-Visible="false" Appearance-MinorGridLines-Visible="false"></YAxis>
                        <XAxis  Appearance-LabelAppearance-RotationAngle="45"  Appearance-TextAppearance-TextProperties-Color="#333333" DataLabelsColumn="slotcount" Appearance-MajorGridLines-Visible="false" Appearance-MinorGridLines-Visible="false">
                        </XAxis>
            </PlotArea>
        </telerik:RadChart>

here the sql result:

slotcount count pc_to_total labelPerc
n°1 Slot 24 6.25 6.25%
n°2 Slot 3 7.81 7.81%
n°10 Slot 1 10.42 10.42%
n°11 Slot 1 13.28 13.28%
n°333 Slot 1 100 100.00%

and here the result:



My problem is that the line does not have to go down and it happens when i use type=Spline to have the curved line...
Can You please help me to understand if this is my fault or if this is telerik issue and can i do anything to show a correct curved line?

Petar Kirov
Telerik team
 answered on 21 Nov 2012
1 answer
728 views
I have a     function pageLoad()     in an asp.net master page and have
added a     function pageLoad()    to the content page.

However it seems that the pageLoad() in the master page is no longer being called!?

Any suggestions much appreciated.

Thanks

Mike


Daniel
Telerik team
 answered on 21 Nov 2012
6 answers
348 views
When my grid is displayed, my headers are aligned to the left. However, when the grid is exported, the headers are all aligned to the center. Is there a way to keep the alignment to the left when exporting to PDF?

Thanks,
Adam
Daniel
Telerik team
 answered on 21 Nov 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?