Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
174 views
Can i have a sample of a RadGrid created programatically and bound client side? Registering all scripts to page in order to get the client side databinging feature.

By the way i am facing similar issue when i have to register scripts for a filtertemplate using RegisterStartupScripts. Once i generate and register the script in server side , i dont need to use the radscriptblock because i dont need  <% %> tags because i already have the clientId at the serverside, but this does not work, seems like i cannot find a control using the registerStartupScripts. Any suggestions?

Thanks in advance

Gilberto
Iana Tsolova
Telerik team
 answered on 29 Sep 2009
0 answers
108 views
Hi,
Sorry for my bad english =(

I have asp.net WebApplication and i started to upgrade my App to Ajax technology with telerik components.
Biggest problem that in some pages all server events opens new window(sometimes blank). In some pages this problem was solved
after adding EnableEventValidation="false". But not all.
Currently i have page without any Rad Components and all PostBack open new window...
Please help/

P.S.: It's a dialog window. When some event fired, new window open and events on this window works fine.
Evgeny Stadnyuk
Top achievements
Rank 1
 asked on 29 Sep 2009
1 answer
126 views
Hi,

I am developing a web portal with a fixed number of widgets and templates. here docks are used as templates, with the option to drag and drop it from one zone to another. in this all the raddock controls except the RaddockLayout is created dynamically.

there is an option to create tabcontols dynamically. on creating a tabpage, a new Radpageview is also creaed and is associated with the new tab. After creating a tab and pageview, a Usercontol which contains a Predefined layout of RaddoxkZones is selected and is added dynamically to this pageview. Now, each tab contains a pageview,  which in turn contains a user control control whic is filled with 2-4 raddockZones.

The real issue starts here....

When I add a dock to this layout (dockzones contained within the user control), i want the docks to fill the entire area of the zone. For that I am setting the with of the raddock to "100%" . this works fine.. if I move to another tab page and do the same thing and come back to the previous page, the width of the dock is same as the width of the page. I havent given any width for the Raddockzones, as I am using a splitter control, so that if I collapse the splitter, the dockzones should keep expanding. Fitdocks property of the docks are set to true.

What i understand from this issue is that, if I perform any action which causes a postback, the entire docks in the tab page except in the one which is selected is not created properly crearted from its states, which is stored in session/database.

once again, all the docks in this page id created dynamically.

Can anyone help me with this issue.. looking forward for a solution at the earliest..

Thanks,

Ajish.
Pero
Telerik team
 answered on 29 Sep 2009
1 answer
112 views
I have a RADUpload on a page, at runtime its not rendered, all I get are the add and delete buttons, yet exactly the same markup on a different page shows the upload component.  Im not quite sure whats happened, but I also have a problem with the DatePickers on the same page, clicking the calendar icon doesnt show the popup calendar, it looks like the javascript isnt being activated

<div class="basic_row_admin_tabular">  
        <div class="two_col_left_short">  
        Poster  
        </div> 
        <div class="two_col_liquid">  
            <telerik:RadUpload  
                    ID="RadUploadImage" runat="server"   
                    Skin="Vista" 
                    MaxFileInputsCount="1" 
                    TargetFolder="~/Uploads" 
                    OverwriteExistingFiles="true"   
                    AllowedFileExtensions=".jpg,.jpeg,.gif"   
                    MaxFileSize="10000000"   
                    Culture="English (United Kingdom)" > 
        </telerik:RadUpload>    
          
        </div> 
        <div class="two_col_liquid">  
        <asp:Button ID="ButtonUpload" runat="server" Text="Upload"   
                CausesValidation="False" onclick="ButtonUpload_Click" /> 
        </div> 
          
          
        </div>   

can anyone help ?
Vesko
Top achievements
Rank 2
 answered on 29 Sep 2009
3 answers
121 views

Hi,

I am attempting to embed a RadCombo box in a grid for adding and updating items.

<WC:CustomDataGrid ID="dgDiscWorks" Runat="server" DataKeyField="disc_work_id" ClearNewOnCancel="true">  
                                                            <Columns> 
                                                                <asp:TemplateColumn HeaderText="">  
                                                                    <ItemTemplate>                    
                                                                    <%# Container.ItemIndex + 1 %>.  
                                                                    </ItemTemplate> 
                                                                </asp:TemplateColumn>                                                                 
                                                                <asp:TemplateColumn HeaderText="Composer">  
                                                                    <ItemTemplate><a href="ComposerDetail.aspx?composer_id=<%# DataBinder.Eval(Container.DataItem, "composer_id") %>" 
                                                                        ><%# ComposerName(DataBinder.Eval(Container.DataItem, "first_name"), DataBinder.Eval(Container.DataItem, "last_name")) %></a></ItemTemplate> 
                                                                    <EditItemTemplate><Combo:Composer id="dw_composer" runat="server" width="200px" FontSize="10px" /></EditItemTemplate>  
                                                                </asp:TemplateColumn> 
                                                                <asp:TemplateColumn HeaderText="Work">  
                                                                    <ItemTemplate><a href="WorkDetail.aspx?work_id=<%# DataBinder.Eval(Container.DataItem, "work_id") %>" 
                                                                        ><%# WorkTitle(DataBinder.Eval(Container.DataItem, "article"), DataBinder.Eval(Container.DataItem, "title")) %></a></ItemTemplate> 
                                                                    <EditItemTemplate><Combo:Work id="dw_work" runat="server" width="200px" FontSize="10px" /></EditItemTemplate>  
                                                                </asp:TemplateColumn> 
                                                            </Columns> 
                                                        </WC:CustomDataGrid> 

The problem is that everytime I attempt to click or type in the combo and it, consequently, attempts to retrieve the items from the database it throws a runtime javascript error. The combo's work fine retrieving the data outside the grid - it just happens on dynamic retrieval within the grid on edit/add.

Does any know why or have a solution please?

Many thanks, Richard
Simon
Telerik team
 answered on 29 Sep 2009
2 answers
291 views
Hi all,

I have rad scheduler and I need to redirect to another page when the time slot or appointment click with appointment id or start time and end time in the url. Please any one help regarding this. 

thanks,
Saravanan.S
saravanan subramanian
Top achievements
Rank 1
 answered on 29 Sep 2009
7 answers
209 views
Hi,

I would like to have a toolbar where you can drag an item from a toolbar into the relevant dock area which will then create the item in the dock - the toolbar item should be available to be dragged multiple times to create the same item in different dock areas.

Has anyone else implimented this / or are there any demos on how to do this?

thanks
Toby
Pero
Telerik team
 answered on 29 Sep 2009
2 answers
211 views
Can someone tell me how to write this in VB:

void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)   
{   
    if (e.Item is GridNestedViewItem)   
    {   
        (e.Item.FindControl("InnerGridId"as RadGrid).NeedDataSource += new GridNeedDataSourceEventHandler(_Default_NeedDataSource);   
    }   

I tried using the converter and got:

    Private Sub gridActivities_ItemCreated(ByVal sender As ObjectByVal e As Telerik.Web.UI.GridItemEventArgs) Handles gridActivities.ItemCreated  
        If TypeOf e.Item Is GridNestedViewItem Then 
            (TryCast(e.Item.FindControl("gridInvoices"), RadGrid)).NeedDataSource += New GridNeedDataSourceEventHandler(_Default_NeedDataSource)  
        End If 
    End Sub 

But I get a syntax error on the first parenthesis of the try cast line.  Thanks.

Sam
Dave
Top achievements
Rank 1
 answered on 29 Sep 2009
2 answers
174 views
HI,

I have a requirement where i want to show radtreeview and grid in explorer like view.We also need a functionality where an item from grid can be drag and drop from rad grid to treeview.

Can anyone point to any such demo where we can drag and drop items from rad grid to rad treeview?

Can i write custom code on item drop in treeview so as to add that item in backend list to which this treeview is binding?


Regards,
Amit
Pavlina
Telerik team
 answered on 29 Sep 2009
2 answers
263 views

Hello i created a simple RadGrid, see below, with 1 column for each type of column that a RadGrid can hold and i would like to figure out how to simply traverse thru every column and put an arbitrary value in that column or boolean ect. And in particular, i'm trying to figure out how to address the GridTemplateColumns but can't seem to identify or address them at all.

In this link: http://www.telerik.com/help/aspnet/grid/grdcolumntypes.html  , the "GridTemplateColumn" example contains a G
idTemplateColumn that contains colums for "CustomerID", "CompanyName", "ContactName", "ContactTitle" ect and i'm really trying to duplicate this same example scenario and then traverse thru all columns in this GridTemplateColumn and put an arbitary value in each of these columns, just so i can figure out how address all column types.

And in my example below i would be trying to populate the GridTemplateColumns, TextBox1-4 and put any text value in them.

Thanks for any  code examples you may be able to provide!
rc
 

<%

@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication3._Default" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">

    <title></title>

</head>

<body>

    <form id="form1" runat="server">

        <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False"

            GridLines="None" ondatabinding="RadGrid1_DataBinding"

            ondatabound="RadGrid1_DataBound"

        ondeletecommand="RadGrid1_DeleteCommand"

        onneeddatasource="RadGrid1_NeedDataSource" style="margin-top: 0px">

<MasterTableView>

<RowIndicatorColumn>

<HeaderStyle Width="20px"></HeaderStyle>

</RowIndicatorColumn>

<ExpandCollapseColumn>

<HeaderStyle Width="20px"></HeaderStyle>

</ExpandCollapseColumn>

    <Columns>

        <telerik:GridBoundColumn UniqueName="column1" HeaderText="myCol1">

        </telerik:GridBoundColumn>

        <telerik:GridCheckBoxColumn HeaderText="CheckBox" UniqueName="column2">

        </telerik:GridCheckBoxColumn>

        <telerik:GridDropDownColumn HeaderText="DropDown" UniqueName="column3">

        </telerik:GridDropDownColumn>

        <telerik:GridTemplateColumn HeaderText="Template1" UniqueName="TemplateColumn">

            <EditItemTemplate>

                <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>

            </EditItemTemplate>

            <FooterTemplate>

                <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>

            </FooterTemplate>

            <HeaderTemplate>

                <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>

            </HeaderTemplate>

            <ItemTemplate>

                <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>

            </ItemTemplate>

        </telerik:GridTemplateColumn>

        <telerik:GridEditCommandColumn HeaderText="EditCommand">

        </telerik:GridEditCommandColumn>

        <telerik:GridButtonColumn HeaderText="ButtonColumn" UniqueName="column">

        </telerik:GridButtonColumn>

    </Columns>

<EditFormSettings>

<EditColumn UniqueName="EditCommandColumn1"></EditColumn>

</EditFormSettings>

</MasterTableView>

        </telerik:RadGrid>

    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">

    </telerik:RadScriptManager>

    <div>

    </div>

    </form>

</body>

</html>

 

protected void RadGrid1_DataBound(object sender, EventArgs e)

{

    foreach (GridDataItem item in RadGrid1.Items)

    {

        (item["TemplateColumn"].Controls["Textbox1"] as TextBox).Text = "bbbbb";

   }

}

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication3._Default" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">

    <title></title>

</head>

<body>

    <form id="form1" runat="server">

        <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False"

            GridLines="None" ondatabinding="RadGrid1_DataBinding"

            ondatabound="RadGrid1_DataBound"

        ondeletecommand="RadGrid1_DeleteCommand"

        onneeddatasource="RadGrid1_NeedDataSource" style="margin-top: 0px">

<MasterTableView>

<RowIndicatorColumn>

<HeaderStyle Width="20px"></HeaderStyle>

</RowIndicatorColumn>

 

<ExpandCollapseColumn>

<HeaderStyle Width="20px"></HeaderStyle>

</ExpandCollapseColumn>

    <Columns>

        <telerik:GridBoundColumn UniqueName="column1" HeaderText="myCol1">

        </telerik:GridBoundColumn>

        <telerik:GridCheckBoxColumn HeaderText="CheckBox" UniqueName="column2">

        </telerik:GridCheckBoxColumn>

        <telerik:GridDropDownColumn HeaderText="DropDown" UniqueName="column3">

        </telerik:GridDropDownColumn>

        <telerik:GridTemplateColumn HeaderText="Template1" UniqueName="TemplateColumn">

            <EditItemTemplate>

                <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>

            </EditItemTemplate>

            <FooterTemplate>

                <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>

            </FooterTemplate>

            <HeaderTemplate>

                <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>

            </HeaderTemplate>

            <ItemTemplate>

                <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>

            </ItemTemplate>

        </telerik:GridTemplateColumn>

        <telerik:GridEditCommandColumn HeaderText="EditCommand">

        </telerik:GridEditCommandColumn>

        <telerik:GridButtonColumn HeaderText="ButtonColumn" UniqueName="column">

        </telerik:GridButtonColumn>

    </Columns>

 

<EditFormSettings>

<EditColumn UniqueName="EditCommandColumn1"></EditColumn>

</EditFormSettings>

</MasterTableView>

        </telerik:RadGrid>

    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">

    </telerik:RadScriptManager>

    <div>

    </div>

    </form>

</body>

</html>

 

Bob
Top achievements
Rank 1
 answered on 29 Sep 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?