Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
134 views
Hello,

I am using a RadGrid and when the user selects to add a new row I am using the EditFormSettings in modal fashion. I then have a RadComboBox that gets populated from a datasource and then some read only asp textboxes. When the users selects from the combobox list of values I would have thought the SelectedIndexChanged event would fire and I could populate the text boxes but it is not to be. Instead what happens is that the ClientSelectedIndexChanged event fires but the serverside never does. I do have AutoPostBack=false as I thought this event should fire without the postback as postback cause me to run through pageLoad? Further I have an Asp button and the onclick there does fire??

Any ideas how / why I am not able to get the slectedindex and query db to populate the read only text boxes?

Thank You
JB
Shinu
Top achievements
Rank 2
 answered on 04 May 2010
3 answers
96 views
I have a radcombo box which is doing the ajax autosuggest successfully, however when it doesnt find any results can I populate the text box with "no results found" or something similar?

Kalina
Telerik team
 answered on 04 May 2010
8 answers
320 views
hi all,
  I need to bind xml data t rad grid view. Accoridng to the xml i want to set column dynamically So i need to create gridview column dynamically when click button for load xml. All columns working except command columns. For command column also i created template column with link buttons. But when i click the button command not initiating..

My staic declaration of RadGrid at initial:

<telerik:RadGrid ID="rad_grd_XmlGrid" runat="server"   
AutoGenerateColumns="false" oncancelcommand="rad_grd_XmlGrid_CancelCommand"   
oneditcommand="rad_grd_XmlGrid_EditCommand"   
 onitemcommand="rad_grd_XmlGrid_ItemCommand">   
 </telerik:RadGrid>  
 
 


My Code for Grid Generation

 

 

GridTemplateColumn tcol1 = new GridTemplateColumn();   
tcol1.HeaderText = "Name";   
tcol1.ItemTemplate = new DynamicTemplate(GridItemType.Item, "name", tcol1.DataType.ToString());   
tcol1.EditItemTemplate = new DynamicTemplate(GridItemType.EditItem, "name", tcol1.DataType.ToString());   
GridTemplateColumn tcol2 = new GridTemplateColumn();   
tcol2.HeaderText = "Modify";   
tcol2.ItemTemplate = new DynamicTemplate(GridItemType.Item, "..""Command");   
tcol2.EditItemTemplate = new DynamicTemplate(GridItemType.EditItem, "..""Command");   
grid.MasterTableView.Columns.Add(tcol1);  
grid.MasterTableView.Columns.Add(tcol2);  
DataSet ds = new DataSet();   
ds.ReadXml("c:\\Services.xml");   
grid.DataSource = ds;  
grid.DataBind();  
 
 
 


My Code for TemplateGeneration

 

public class DynamicTemplate : ITemplate   
{  
GridItemType iType;   
String fName;   
String sinfo;   
   
public DynamicTemplate(GridItemType itemType, String fieldName, String info)   
{  
iType = itemType;  
fName = fieldName;  
sinfo = info;  
}  
 
public void InstantiateIn(System.Web.UI.Control Container)   
{  
switch (iType)   
{  
case GridItemType.Header:   
   Literal header_ltrl = new Literal();   
   header_ltrl.Text = "<b>" + fName + "</b>";   
   Container.Controls.Add(header_ltrl);  
   break;   
case GridItemType.Item:   
switch (sinfo)   
{  
case "Command":   
   LinkButton edit_button = new LinkButton();   
   edit_button.ID = "editButton";   
   edit_button.CommandName = "Edit";   
   //edit_button.Click +=new EventHandler(edit_button_Click);   
   edit_button.Text = "Edit";   
   edit_button.ToolTip = "Edit";   
   Container.Controls.Add(edit_button);  
   break;   
default:   
   Label field_lbl = new Label();   
   field_lbl.ID = fName;  
   field_lbl.DataBinding += new EventHandler(OnDataBinding);   
   Container.Controls.Add(field_lbl);  
   break;   
}  
break;   
case GridItemType.EditItem:   
    if (sinfo == "Command")   
    {  
      LinkButton update_button = new LinkButton();   
      update_button.ID = "updateButton";   
      update_button.CommandName = "Update";   
      update_button.Text = "Update";   
      Container.Controls.Add(update_button);  
      LinkButton cancel_button = new LinkButton();   
      cancel_button.ID = "cancelButton";   
      cancel_button.CommandName = "Cancel";   
      cancel_button.Text = "Cancel";   
      cancel_button.ToolTip = "Cancel";   
      Container.Controls.Add(cancel_button);  
     }  
     else   
     {  
       TextBox field_txtbox = new TextBox();   
       field_txtbox.ID = fName;  
       field_txtbox.DataBinding += new EventHandler(OnDataBinding);   
       Container.Controls.Add(field_txtbox);  
     }  
     break;   
}  
}  
//protected void edit_button_Click(Object sender, EventArgs e)   
//{   
// new Page().Session["InsertFlag"] = 0;   
}   
   
private void OnDataBinding(object sender, EventArgs e)   
{  
 
switch (iType)   
{  
case GridItemType.Item:   
     Label field_ltrl = (Label)sender;   
     GridDataItem container = (GridDataItem)field_ltrl.NamingContainer;   
     field_ltrl.Text = DataBinder.Eval(container.DataItem, fName).ToString();   
     break;   
case GridItemType.EditItem:   
     TextBox field_txtbox = (TextBox)sender;   
     GridEditFormItem container1 = (GridEditFormItem)field_txtbox.NamingContainer;   
     field_txtbox.Text = DataBinder.Eval(container1.DataItem, fName).ToString();   
     break;   
}  
}  
}  
 

 


How can i trigger edit command?


 

 

Yavor
Telerik team
 answered on 04 May 2010
3 answers
89 views
Hi All,

So far we have been using old version Telerik control "RadGrid.Net2.dll"(4.5.2). In master page we wrote the same dll. Currently in the content page we need to use the advanced telerik control version 2009.1.311. We are facing problems in it.
My question is:
1) Is it possible to use different versions of Telerik control in master page and content page?
Does any one has an idea about this?

Regards,
Satish Kumar.
Iana Tsolova
Telerik team
 answered on 04 May 2010
3 answers
135 views
Hi,

I trying to change the skin for the page and chart as well in a usercontrol.

But doesn't work fine when i change the chart skin dynamically,

 Given below is the code i have used in codebehind page,

For Whole page,

Private

 

Sub skinPage_SelectedIndexChanged(ByVal o As Object, ByVal e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles skincmb.SelectedIndexChanged

 

 

Dim skin As String = skincmb.SelectedItem.Text

 

SkinChoosers.ApplySkin(Page.Form, skin)

 

Dim radchart As New RadChart

 

radchart1 =

DirectCast(Userctrl1.FindControl("DetailedGraph"), RadChart)

 

radchart1.Skin = skin

 

End Sub

 

 


For Chart Only
Private
Sub skinchart_SelectedIndexChanged(ByVal o As Object, ByVal e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles skinchart.SelectedIndexChanged

 

 

Dim radchart As New RadChart

 

radchart1 =

DirectCast(Userctrl1.FindControl("DetailedGraph"), RadChart)

 

radchart1.Skin = skinchart.SelectedItem.Text

 

End Sub

 


Please give suggestions to solve it.
thanks in advance.

Regards,
Maha

utchi
Top achievements
Rank 1
 answered on 04 May 2010
1 answer
106 views

The system that I am working on already has a image library subsystem that we would like to reuse.  I would like to:

  1. Create an aspx page with a RADEditor control and create a custom tool button for the control.
  2. When the user presses the custom button, an existing "Image selector" form is presented (modally).  (We do not want to use the RAD Image Manager).
  3. When the user selects an image and dismisses this form, an HTML <img> tag is constructed and placed on the clipboard and the modal form is dismissed.
  4. At this point, I would like to have the <img> HTML tag inserted into the body of the document being editted in the RADEditor control from the clipboard, automatically.

Is this possible and if so, how would I do it?

Rumen
Telerik team
 answered on 04 May 2010
3 answers
258 views
I've successfully populated your Treeview using this statement for every node:
  node.ExpandMode = TreeNodeExpandMode.ServerSide;
For each node I'd also added an "id" attribute with some special data in it.

Configured this way, everything works fine.

But now I've started investigating using this statement instead for every node:
  node.ExpandMode = TreeNodeExpandMode.ServerSideCallback;

After doing this I noticed that when a node is click, the "id" attribute appears not to exist.  In fact, in Debug mode I detected that the attribute count for each node was 0.

Any idea why?

Robert



Veronica
Telerik team
 answered on 04 May 2010
13 answers
168 views
Hi,
I'm using RadWindow with a custom skin, and I don't want to use gif's for the background's , but colors and gradients instead.
my only problem is that I can't seem to control the height of the titlebar (and it's conrners) and the height of the footer (and it's corners). no matter what value I set in height in the css , it stays the same (looks like it's 16 px or something like that).

here's a little sample from the css :
div.radwindow_ReformaSkin table td.footercenter  
{  
    background-color#d4d0c8;  
     border-bottom:solid 1px #808080;  
     border-top:solid 1px;  
    height2px !important;  
}  
 
div.radwindow_ReformaSkin table td.titlebar  
{  
    filter: progid:DXImageTransform.Microsoft.Gradient(gradientType=1,startColorStr=#00A246A,endColorStr=#A5C9EF);  
    height5px;  
    border-bottom:solid 1px;  
    border-top:solid 1px;  
can you please point me out to the correct css class to change, or any other change I should make.

thanx,
Revital

 by the way, I am using version 2008.3.1314.35 of telerik's controls.

Yavor
Telerik team
 answered on 04 May 2010
6 answers
325 views

Greetings,
I'm trying to figure out a quirk I see with RadEditor. I've declared a RadEditor instance in the .aspx page, and when the page loads initially the editor content area is rendered as a single line ( although I have declared the width=680px and the height=500px ). When I hit F5 to refresh the page, the editor's content area is displayed as I would expect.

Any ideas on what could cause this? I have attached two screen shots so you can see how the editor content area is being rendered ( "screen_1.jpg" and "screen_2.jpg" ). The markup declaring the Editor is as follows, and is contained within an UpdatePanel.

Regards,
Tom

                                                       <telerik:RadEditor   
                                                             ID="EmailBodyEditor" runat="server" 
                                                             Width="680px" 
                                                             Height="500px"   
                                                             AutoResizeHeight="true" 
                                                             NewLineBr="true" 
                                                             ToolBarMode="Default" 
                                                             EnableResize="False"   
                                                             ExternalDialogsPath="~/EditorDialogs/"   
                                                             EditModes="Design, Preview, HTML" 
                                                             OnClientCommandExecuting="OnClientCommandExecuting"   > 
                                                        <CssFiles> 
                                                            <telerik:EditorCssFile Value="fakeCssfile.css" /> 
                                                        </CssFiles>                                                                     
                                                        <Tools> 
                                                           <telerik:EditorToolGroup> 
                                                               <telerik:EditorTool Name="Bold" /> 
                                                               <telerik:EditorTool Name="Italic" /> 
                                                               <telerik:EditorTool Name="Underline" /> 
                                                               <telerik:EditorTool Name="StrikeThrough" /> 
                                                               <telerik:EditorTool Name="ForeColor" /> 
                                                               <telerik:EditorTool Name="BackColor" /> 
                                                               <telerik:EditorTool Name="InsertOrderedList" /> 
                                                               <telerik:EditorTool Name="InsertUnorderedList" /> 
                                                               <telerik:EditorTool Name="Indent" /> 
                                                               <telerik:EditorTool Name="Outdent" /> 
                                                               <telerik:EditorTool Name="JustifyLeft" /> 
                                                               <telerik:EditorTool Name="JustifyCenter" /> 
                                                               <telerik:EditorTool Name="JustifyRight" /> 
                                                               <telerik:EditorTool Name="JustifyFull" /> 
                                                            </telerik:EditorToolGroup> 
                                                            <telerik:EditorToolGroup> 
                                                               <telerik:EditorTool Name="FindAndReplace" /> 
                                                               <telerik:EditorTool Name="ToggleScreenMode" /> 
                                                               <telerik:EditorTool Name="InsertTable" /> 
                                                               <telerik:EditorSeparator /> 
                                                               <telerik:EditorTool Name="FontName" /> 
                                                               <telerik:EditorTool Name="FontSize" /> 
                                                               <telerik:EditorTool Name="LinkManager" /> 
                                                               <telerik:EditorTool Name="ImageManager" /> 
                                                               <telerik:EditorTool Name="AjaxSpellCheck" /> 
                                                           </telerik:EditorToolGroup> 
                                                        </Tools> 
                                                        <ContextMenus> 
                                                            <telerik:EditorContextMenu TagName="IMG">  
                                                              <telerik:EditorTool Name="SetImageProperties" /> 
                                                              <telerik:EditorTool Name="ImageMapDialog" /> 
                                                            </telerik:EditorContextMenu> 
                                                            <telerik:EditorContextMenu TagName="TABLE">  
                                                              <telerik:EditorTool Name="ToggleTableBorder" /> 
                                                              <telerik:EditorTool Name="SetTableProperties" /> 
                                                              <telerik:EditorTool Name="DeleteTable" /> 
                                                            </telerik:EditorContextMenu> 
                                                            <telerik:EditorContextMenu TagName="TD">  
                                                              <telerik:EditorTool Name="InsertRowAbove" /> 
                                                              <telerik:EditorTool Name="InsertRowBelow" /> 
                                                              <telerik:EditorTool Name="DeleteRow" /> 
                                                              <telerik:EditorTool Name="InsertColumnLeft" /> 
                                                              <telerik:EditorTool Name="InsertColumnRight" /> 
                                                              <telerik:EditorTool Name="MergeColumns" /> 
                                                              <telerik:EditorTool Name="MergeRows" /> 
                                                              <telerik:EditorTool Name="SplitCell" /> 
                                                              <telerik:EditorTool Name="DeleteCell" /> 
                                                              <telerik:EditorTool Name="SetCellProperties" /> 
                                                            </telerik:EditorContextMenu> 
                                                            <telerik:EditorContextMenu TagName="A">  
                                                              <telerik:EditorTool Name="SetLinkProperties" /> 
                                                              <telerik:EditorTool Name="Unlink" /> 
                                                            </telerik:EditorContextMenu> 
                                                            <telerik:EditorContextMenu TagName="BODY">  
                                                              <telerik:EditorTool Name="Cut" /> 
                                                              <telerik:EditorTool Name="Copy" /> 
                                                              <telerik:EditorTool Name="Paste" /> 
                                                              <telerik:EditorTool Name="PasteFromWord" /> 
                                                              <telerik:EditorTool Name="PastePlainText" /> 
                                                              <telerik:EditorTool Name="PasteAsHtml" /> 
                                                            </telerik:EditorContextMenu> 
                                                        </ContextMenus> 
                                                        <ImageManager ViewPaths="~/Documents/Images"   
                                                                      UploadPaths="~/Documents/Images"   
                                                                      DeletePaths="~/Documents/Images"   
                                                                      MaxUploadFileSize="2097152" SearchPatterns="*.jpg, *.gif, *.jpeg, *.bmp" /> 
                                                       </telerik:RadEditor> 
Rumen
Telerik team
 answered on 04 May 2010
1 answer
82 views
If you go to the following URL, the datepickers cannot be used in IE 6. Works fine in other browsers, but in IE 6, the date selections cannot be used. The behavior is also happening with radcombobox on another page. But you have to login and register to see that page. I figure the problems are likely similar, so if you have any thoughts, it would be greatly appreciated.

https://www.lin-mark.com/calendar.aspx?#
Pavel
Telerik team
 answered on 04 May 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?