Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
1.2K+ views
hi

I have this casting of dataset issues and i just could not get it working. please help and any inconvience caused regretted. Thanks

Unable to cast object of type 'System.Data.DataTable' to type 'System.Data.DataSet'.
 
Protected Sub RadGrid1_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.ItemCommand
If e.CommandName = "select" Then
Session("sessiondataset") = CType(Session("sessiondataset"), DataSet).Tables("CTETable").Select("Customer ='" + DirectCast(e.CommandSource, LinkButton).Text + "'")
 RadGrid1.Rebind()
end if
End Sub

Protected Sub RadGrid1_NeedDataSource(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource
        RadGrid1.DataSource = Session("sessiondataset")
 End Sub

 

L
Top achievements
Rank 1
 answered on 11 Oct 2011
3 answers
207 views
I'm running VS 2010 (.net 4.0) and RadControls Ajax Q1 2010.

I have a (Microsoft) Menu on a my Site.Master that works perfectly throughout the site except for the Scheduler page.  When I click on the Menu to display it's sub menus, the they get hidden behind the RadScheduler that's right below the Menu.  I cannot reproduce this behavior with any other control. So far, I've tried to change the z order of the div that contains the menu.  No luck.

Any suggestions are welcome.
Thanks
Ben
Kate
Telerik team
 answered on 11 Oct 2011
2 answers
67 views
How do you change the fill color on a pie chart? Nothing I do works. I've changed the series fill style to solid, set the main and second colors, but I still get blue and green.
Eric Wallace
Top achievements
Rank 1
 answered on 11 Oct 2011
1 answer
126 views
View picture attachement

I am trying to make space for the legend, it put the width to 700 but it extends the plot area when I set a width to it it has no effect

<

 

PlotArea>

 

 

<Appearance Dimensions-Width="300">

 

 

<FillStyle FillType="Solid" MainColor="White"></FillStyle>

 

 

<Border Color="130, 130, 130" />

 

 

</Appearance>

 

 

</PlotArea>

How do I resolve this

Thanks

Evgenia
Telerik team
 answered on 11 Oct 2011
1 answer
177 views
Hi,
Is there any way to get a sum aggregate on a column when there is no DataField?  We have a RadGrid where we need to fill some of the cells from ItemDataBound because our data item has in it a list of custom field values.  The ItemDataBound method is here:
protected void WorkOrderGrid_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridDataItem)
    {
        GridDataItem item = e.Item as GridDataItem;
        WorkOrderDetailItem view = item.DataItem as WorkOrderDetailItem;
        List<CustomField> CustFlds = CustFields();
        for (int j = 0; j < CustFlds.Count; j++)
        {
            item.Cells[FirstCustomFieldCell + j].Text = (string.IsNullOrEmpty(view.CustomFieldValues[j]) ? " " : view.CustomFieldValues[j]);
        }
    }
}
Now, some of the custom fields are numeric and we need to do aggregates on them.  These fields are added to the grid this way:
protected void AddCustomFieldColumnsToGrid(List<CustomField> customFields)
{
    foreach (CustomField custFld in customFields)
    {
        if (custFld.CustomFieldType == "money")
        {
            GridNumericColumn col = new GridNumericColumn();
            _reportGrid.Columns.Add(col);
            col.DataType = typeof(Decimal);
            col.DataFormatString = "$ {0:N}";
            col.Aggregate = GridAggregateFunction.Sum;
            col.UniqueName = "cf" + custFld.Id.ToString();
            col.HeaderText = custFld.Name;
            col.Display = false;
        }
        else
The problem is that this code results in a "Exception has been thrown by the target of an invocation." error with an InnerException of "No matching constructor in type 'Decimal?'"  When I comment the Aggregate line of the column definition, I get the expected values but the DataFormatString is not applied.  This lead me to wonder if the issue is that I am setting the cell text in the ItemDataBound instead of giving a DataField, which I can't do.  Any suggestions you have would be greatly appreciated.

Thanks,
Dan Norton
Iana Tsolova
Telerik team
 answered on 11 Oct 2011
1 answer
392 views
Hello,

I have a RESTful web service (url: http://www.example.com/foods.json) which returns JSON (list of foods). How do I configure the RadTreeView to pull the JSON data and build it's tree structure based on this data?

Example:

JSON =>
[ 
{ "Name":"Jalepeno", "Temp":"HOT" },
{ "Name":"Serano", "Temp":"HOT" },
{ "Name":"Bell Pepper", "Temp":"MILD" }
]

What I want my tree to look like =>
+HOT
|---Jalepeno
|---Serano
+MILD
|---Bell Pepper

Thanks!
Plamen
Telerik team
 answered on 11 Oct 2011
1 answer
69 views
I am using RadEditor with ContentAreaMode = "Div" and I would like to limit the CSS Classes available to the user.  Is there a way to do that by affecting the ApplyClass tool?

Alternatively, if I created my own RadComboBox of styles, how could I apply those to selected html?

Thanks
Bryan

Rumen
Telerik team
 answered on 11 Oct 2011
1 answer
395 views
Hi,

I have a radgrid with AutoGenerateColumns is true.

I need to add a template column with Image at runtime when AutoGenerateColumns is true.

I am able to add the template column at run time when AutoGenerateColumns is true but not able set the column order for this template column.

Is it possible to set the order for this template column?

If it is possible then can you please attach a small demo example for the able.

Thanks & Regards,
Shirish
Pavlina
Telerik team
 answered on 11 Oct 2011
1 answer
73 views
This problem is relate with position of click behavior.
It working if click at the below of "select" button.sorry for my bad english explain
I attach picture for more information for this case.

Thanks


Telerik.Web.UI_2011_2_915_Dev
This is my RadEditor Configuration with transparent background and Menu Top

<telerik:RadEditor Runat="server" id="FCKeditorThai" Width="100%"

AutoResizeHeight="true" AllowScripts="True" EnableResize="false"

BorderStyle="None" Visible="false" OnClientPasteHtml="OnClientPasteHtml"

ToolbarMode="PageTop" onclientload="OnClientLoadEdit"

ToolsFile="~/upload/toolFile.xml" Skin="Office2010Blue" >

<ExportSettings OpenInNewWindow="True">

</ExportSettings>

<mediamanager deletepaths="~/upload/images/Media/"

searchpatterns="*.asf,*.asx,*.wm,*.wmx,*.wmp,*.wma,*.wax,*.wmv,*.wvx,*.avi,*.wav,*.mpeg,*.mpg,*.mpe,*.mov,*.m1v,*.mp2,*.mpv2,*.mp2v,*.mpa,*.mp3,*.m3u,*.mid,*.midi,*.rm,*.rma,*.rmi,*.rmv,*.aif,*.aifc,*.aiff,*.au,*.snd"

uploadpaths="~/upload/images/Media/" viewpaths="~/upload/images/Media/"

maxuploadfilesize="20480000"

/>

<silverlightmanager deletepaths="~/upload/images/Silverlight/"

maxuploadfilesize="20480000" searchpatterns="*.*"

uploadpaths="~/upload/images/Silverlight/"

viewpaths="~/upload/images/Silverlight/" />

<templatemanager deletepaths="~/Template/"

searchpatterns="*.htm,*.html" uploadpaths="~/Template/"

viewpaths="~/Template/" />

<documentmanager deletepaths="~/upload/images/Document/"

maxuploadfilesize="20480000" searchpatterns="*.*"

uploadpaths="~/upload/images/Document/" viewpaths="~/upload/images/Document/" />

<content></content>

<flashmanager deletepaths="~/upload/images/Flash/"

maxuploadfilesize="20480000"

searchpatterns="*.swf" uploadpaths="~/upload/images/Flash/"

viewpaths="~/upload/images/Flash/" />

<imagemanager deletepaths="~/upload/images/Image/"

maxuploadfilesize="20480000"

searchpatterns="*.gif,*.xbm,*.xpm,*.png,*.ief,*.jpg,*.jpe,*.jpeg,*.tiff,*.tif,*.rgb,*.g3f,*.xwd,*.pict,*.ppm,*.pgm,*.pbm,*.pnm,*.bmp,*.ras,*.pcd,*.cgm,*.mil,*.cal,*.fif,*.dsf,*.cmx,*.wi,*.dwg,*.dxf,*.svf"

uploadpaths="~/upload/images/Image/" viewpaths="~/upload/images/Image/" />

</telerik:RadEditor>


Rumen
Telerik team
 answered on 11 Oct 2011
1 answer
92 views
I set my RadEditor content like this :

editorScheduleText.Content = scheduleDetail.ScheduleText

 

I set content to : Problème avec les accents même si ca marche pas
When I try to get content like this :

 

editorScheduleText.Content

I lost all accent, content is now : Probl&easpme avec les accents m&ahdfme si ca marche pas

Why I lost accent ?

Rumen
Telerik team
 answered on 11 Oct 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?