Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
101 views
Hi guys,

I had a bit of a look in the forums, but I'm not really sure what to search for. I have a RadGrid connected to a custom DataSourceControl. When using filtering it retrieves EVERY record from the database, which is currently quite expensive as the data is coming across a remoting channel.

Is there anyway to get the radgrid to show the filter items, but to pass the resulting filter expression to my custom DataSourceControl to do the actual processing at the database end?

Any links related to this and/or to manual filtering with RadGrid would be helpful.

Thanks,
Veli
Telerik team
 answered on 04 May 2010
6 answers
254 views
hi

is there any method to remove the annoying resizing thing of the radsplitter when
my page load?
btw it  master page..
here is my code:

<%@ Master Language="VB" AutoEventWireup="false" CodeBehind="Main.master.vb" Inherits="GRC30.Main" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head id="Head1" runat="server"> 
    <title>Xyou</title> 
    <link href="styles/Main.css" type="text/css" rel="stylesheet" /> 
    <style type="text/css"> 
    html, body, form 
    { 
        height: 100%; 
        margin: 0px; 
        padding: 0px; 
        overflow: hidden; 
    } 
    </style> 
</head> 
<body> 
    <form id="form2" runat="server"> 
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" /> 
            <telerik:RadFormDecorator ID="RadFormDecorator1" DecoratedControls="All" runat="server" EnableRoundedCorners="false" /> 
            <div style="display:none"> 
                <telerik:RadTextBox runat="server" ID="Num" /> 
            </div>           
        <div id="ParentDivElement" style="height: 100%;"> 
            <telerik:RadSplitter ID="MainSplitter" runat="server" Height="100%" Width="100%" 
                Orientation="Horizontal"> 
                <telerik:RadPane ID="paneTitle" runat="server" Width="100%" Height="100px" BackColor="#000000" Locked="true" Scrolling="None"> 
                    <div id="mHeader"> 
                        <table width="100%" cellspacing="0" cellpadding="0"> 
                            <tr> 
                                <td> 
                                    <img id="Img1" src="img/LogoGextra.png" alt="logo" runat="server" style="border:none; height:100px" /> 
                                </td> 
                                <td align="center"> 
                                    <h2 style="color:Red"><asp:Label runat="server" ID="lblNotice"></asp:Label></h2> 
                                </td> 
                                <td align="right"> 
                                    <div class="skin-chooser"> 
                                        <label for="ctl00_RadMenu1_i3_SkinChooser_Input" class="skinLabel">Skin:</label> 
                                            <telerik:RadSkinManager ID="RadSkinManager" runat="server" ShowChooser="true" Skin="Office2007" 
                                                PersistenceKey="Skin" PersistenceMode="Session"> 
                                            </telerik:RadSkinManager> 
                                    </div> 
                                </td> 
                            </tr> 
                        </table> 
                    </div> 
                </telerik:RadPane> 
                <telerik:RadSplitBar ID="RadsplitbarTop" runat="server" CollapseMode="None" /> 
                <telerik:RadPane ID="MainPane" runat="server" Scrolling="none" MinWidth="500"> 
                    <telerik:RadSplitter ID="NestedSplitter" runat="server" LiveResize="true"> 
                        <telerik:RadPane ID="LeftPane" runat="server" Width="230" MinWidth="150" MaxWidth="400"> 
                            <telerik:RadPanelBar ID="panelMenu" runat="server" PersistStateInCookie="true" ExpandMode="SingleExpandedItem" Height="100%" Width="225px"> 
                                <Items> 
                                    <telerik:RadPanelItem runat="server" Text="Mio Profilo"> 
                                        <Items> 
                                            <telerik:RadPanelItem runat="server" Text="Anagrafica" NavigateUrl="grcEditAnagrafica.aspx" />                                                                                   
                                            <telerik:RadPanelItem runat="server" Text="Documenti" NavigateUrl=""/> 
                                            <telerik:RadPanelItem runat="server" Text="Cambia password" Navigateurl="grcCambiaPswd.aspx"/> 
                                        </Items> 
                                    </telerik:RadPanelItem>                                                                              
                                    <telerik:RadPanelItem runat="server" Text="I servizi XYOU" NavigateUrl="grcElencoProdotti.aspx"> 
                                    </telerik:RadPanelItem> 
                                    <telerik:RadPanelItem runat="server" Text="Acquisto servizi XYOU" NavigateUrl="grcElencoOrdini.aspx"> 
                                    </telerik:RadPanelItem> 
                                    <telerik:RadPanelItem runat="server" Text="Situazione Acquisti"> 
                                        <Items> 
                                            <telerik:RadPanelItem runat="server" Text="Elenco Acquisti" NavigateUrl="grcVisualizzaOrdini.aspx" /> 
                                            <telerik:RadPanelItem runat="server" Text="Estratto Conto" NavigateUrl="grcElencoEstrattoConto.aspx" /> 
                                            <telerik:RadPanelItem runat="server" Text="Segnalazione Scadenza dei Crediti" NavigateUrl="grcElencoEsaurimentoCrediti.aspx" />                                          
                                        </Items> 
                                    </telerik:RadPanelItem>                                  
                                    <telerik:RadPanelItem runat="server" Text="Caricamento pratica" > 
                                        <Items> 
                                            <telerik:RadPanelItem runat="server" Text="Azienda" NavigateUrl="grcInsertPratica.aspx?D=A" /> 
                                            <telerik:RadPanelItem runat="server" Text="Privato" NavigateUrl="grcInsertPratica.aspx?D=P" />                                           
                                        </Items> 
                                    </telerik:RadPanelItem> 
                                    <telerik:RadPanelItem runat="server" Text="Caricamento pratica Unico Form" > 
                                        <Items> 
                                            <telerik:RadPanelItem runat="server" Text="Azienda" NavigateUrl="grcInsertPraticaUnica.aspx?D=A" /> 
                                            <telerik:RadPanelItem runat="server" Text="Privato" NavigateUrl="grcInsertPraticaUnica.aspx?D=P" />                                          
                                        </Items> 
                                    </telerik:RadPanelItem>                                  
                                    <telerik:RadPanelItem runat="server" Text="Richiesta storno pratica" NavigateUrl="grcRichiestaStorno.aspx"> 
                                    </telerik:RadPanelItem>  
                                    <telerik:RadPanelItem runat="server" Text="Visualizza la Gestione Pratiche"> 
                                        <Items> 
                                            <telerik:RadPanelItem runat="server" Text="Dettaglio Affidamenti" NavigateUrl="grcDettaglioAffidamento.aspx" /> 
                                            <telerik:RadPanelItem runat="server" Text="Cerca Pratica" NavigateUrl="grcCercaPratica.aspx" /> 
                                        </Items> 
                                    </telerik:RadPanelItem> 
                                    <telerik:RadPanelItem runat="server" Text="Comunicazioni con Gextra" NavigateUrl="grcMessaggistica.aspx" />                                                                                                                  
                                    <telerik:RadPanelItem runat="server" Text="Log out" NavigateUrl="~/Login.aspx?action=logout"/>                                                   
                                    <telerik:RadPanelItem runat="server" Text="Assistenza" NavigateUrl=""/> 
                                </Items>                         
                        </telerik:RadPanelBar> 
                        </telerik:RadPane> 
                        <telerik:RadSplitBar ID="VerticalSplitBar" runat="server" CollapseMode="Forward" /> 
                        <telerik:RadPane ID="ContentPane" runat="server"> 
                              <asp:ContentPlaceHolder ID="cphMain" runat="server"></asp:ContentPlaceHolder> 
                        </telerik:RadPane> 
                    </telerik:RadSplitter> 
                </telerik:RadPane> 
                <telerik:RadSplitBar ID="Radsplitbar1" runat="server" CollapseMode="None" /> 
                <telerik:RadPane ID="FOoter" runat="server" Width="100%" Height="50px" BackColor="#FFFFFF" Locked="true" Scrolling="None"> 
                    <table align="center" cellpadding="0" width="85%" cellspacing="0"> 
                        <tr> 
                            <td align="center"><p><b>Contact Number: 051-xxx xxx </b></p></td> 
                            <td align="center"><p><img src="img/skype.gif" alt="skype" /><b>: </b></p></td> 
                            <td align="center"><asp:Button runat="server" ID="Button2" Text="Manuale utilizzo servizi" /></td> 
                        </tr> 
                    </table> 
                </telerik:RadPane>                 
            </telerik:RadSplitter> 
        </div> 
    </form> 
</body> 
</html> 

i can add a demo to show u what i mean if u need it..
thanks
regard webster
Dobromir
Telerik team
 answered on 04 May 2010
13 answers
243 views
I would like to add about 10000 recoders to a RadListBox in client side, I used the follows code:

var getCallBack = function(returnValue) { 
                items = returnValue.value; 
                if (items != null && items != "") { 
                    var rows = items.Tables[0].Rows, i = 0, l = rows.length;                     
                    for (; i < l; i++) { 
                        //add new items 
                        var raditem = new Telerik.Web.UI.RadListBoxItem(); 
                        raditem.set_text(items.Tables[0].Rows[i].Description); 
                        raditem.set_value(items.Tables[0].Rows[i].Code); 
                        oRadListItems.add(raditem); 
                    } 
                } 
            } 

it will be very slow when large items (about 10000 records) , and the browser will be halts.

if I use html control (select), I can use array to do this, then it will be very fast , just like
for (; i < l; i++) { 
            k.push("<option value='" + items.Tables[0].Rows[i].Code + "'>" +  items.Tables[0].Rows[i].Description + "</option>"); 
        } 

so I don't know whether can I improve the performance of RadListBox, have any idea to solve this ?

thank you !



Yana
Telerik team
 answered on 04 May 2010
1 answer
82 views
I've been looking around the documentation and I'm trying to find if there exists any methods which return the HTML document size for the contents of the WYSIWYG editor, which also takes into account image sizes etc.

ie: HTML content including images is 317Kb

thanks
Dobromir
Telerik team
 answered on 04 May 2010
1 answer
136 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
103 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
333 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
94 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
143 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
110 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
Narrow your results
Selected tags
Tags
+? 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?