Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
118 views
Hi,

I have two RAD grids with Ajax enabled in two different areas. The first grid is the master grid and the second grid is dependent on the first grid. I have the first grid which has sorting, paging and some links. On doing any of the actions to the data in the master grid the data in the child grid should change. Since the master grid has the attribute EnableAjax=True the child grid won't get refreshed. The ASP.Net UpdatePanel also does not seem to work on this. Please provide me with your suggestions. Thanks.
Yavor
Telerik team
 answered on 30 Dec 2008
5 answers
190 views
i have installed telerik rad controls developer version (Q3 2008 AJAX ASP).
but i have alot of problems about images and css files. All of the controls load without images and style.
for example my menu in my project or in telerik live demo has just text,no images and no style.
could you please tell me how can i fix this problem?
thanks
Dimo
Telerik team
 answered on 30 Dec 2008
1 answer
111 views
Hi to all, I'm trying to use your controls for a test, but I've a little problem with the scheduler :
is it possible to add manually appointments, without databind the control to a datasource ?

Thanks and happy new year
Peter
Telerik team
 answered on 30 Dec 2008
1 answer
137 views
Hi all,

I have a grid, and I have designed edit template "input type=text" and in onkeypress text box I want to do these 2 actions:
1- validate input value to be number (I have done).
2- put this value in the next row text box (how to do?).
so anyway in javascript to control next edit row cells?
My code  below:

<telerik:GridTemplateColumn ColumnEditorID="GridTextBoxColumnEditor1"   
                                            DataField="start" HeaderText="start" SortExpression="start" UniqueName="start">  
                                            <EditItemTemplate> 
                                                <input id="Text1" style="width: 40px" type="text" onkeypress="return Bind(event)"/>  
                                            </EditItemTemplate> 
                                            <ItemTemplate> 
                                                <asp:Label ID="startLabel" runat="server" Text='<%# Eval("start") %>'></asp:Label> 
                                            </ItemTemplate> 
                                        </telerik:GridTemplateColumn> 
.  
.  
.  
.  
function Bind(e)  
                            {  
                                var keynum;  
                                var keychar;  
                                var numcheck;  
                                if(window.event) // IE  
                                {  
                                    keynum = e.keyCode;  
                                }  
                                else if(e.which) // Netscape/Firefox/Opera  
                                {  
                                    keynum = e.which;  
                                }  
                                keychar = String.fromCharCode(keynum);  
                                numcheck = /\d/;  
                                return numcheck.test(keychar);  
                            }  
 
 
 

Please advise

Regards
Yavor
Telerik team
 answered on 30 Dec 2008
1 answer
60 views
hi,

I am using telerik treeview control, on each node i am adding context menu. on one of the menu i am opening rad window.
when i open window, node of treeview not keeping  font in bold they  taking normal font.  i am not getting what is happning.

wating for your replay
anand gole
Yana
Telerik team
 answered on 30 Dec 2008
1 answer
189 views

I have a RadGrid issue. My grid binds data via ObjectDatasource and my inserts, updates and deletes are happening in my codebehind.  Editing and inserts are contained the the Grids FormTemplate.  I use ItemDataBound event to preload two dropdownlists in the formtemplate.  When a user clicks "Add a record" the formtempate displays on the first page first row, this is fine.  When the user clicks on a record to edit, the formtemplate displays on the last page of the grid at the top.  Example:  pagesize is set to 25 and we have 70 records and you click on edit on the 4 record on the 1st page, the formtemplate will display on the 3rd page at the top.  The grid works as far as insert, editing and deleting just can't figure out why the formtemplate doesn't display where the row was originally. Any suggestions would be great. I'm including code, I stripped out most everything that isn't "relevant", to keep it brief.

.aspx page

<telerik:RadGrid ID="RadGrid1" runat="server" Width="900px" 
            DataSourceID="ObjectDataSource1" GridLines="Vertical" AllowPaging="True" AllowSorting="True" 
            AutoGenerateColumns="False" PageSize="25"   
            OnItemDataBound="RadGrid1_ItemDataBound"   
            onitemcommand="RadGrid1_ItemCommand" AllowFilteringByColumn="True" OnInit="RadGrid1_Init">  
            <MasterTableView DataKeyNames="PublicVideoID" DataSourceID="ObjectDataSource1" CommandItemDisplay="Top" > 
                <CommandItemTemplate> 
                <div> 
                        <asp:LinkButton ID="btnInsert" runat="server" CommandName="InitInsert" Visible='<%# !RadGrid1.MasterTableView.IsItemInserted %>'><img style="border:0px;vertical-align:middle;" alt="" src="../images/icons/newRecord.gif" /> Add New Video</asp:LinkButton>&nbsp;  
                        <asp:LinkButton ID="btnCancel" runat="server" CommandName="CancelAll" CausesValidation="false" Visible='<%# RadGrid1.EditIndexes.Count > 0 || RadGrid1.MasterTableView.IsItemInserted %>'><img style="border:0px;vertical-align:middle;" alt="" src="../images/icons/cancel.gif" /> Cancel Editing</asp:LinkButton>&nbsp;  
                        <asp:LinkButton ID="btnRebind" runat="server" CommandName="RebindGrid" Visible='<%# RadGrid1.EditIndexes.Count < 0 || !RadGrid1.MasterTableView.IsItemInserted %>'><img style="border:0px;vertical-align:middle;" alt="" src="../images/icons/refresh.gif" /> Refresh Video List</asp:LinkButton> 
                    </div> 
                </CommandItemTemplate> 
                <RowIndicatorColumn> 
                <HeaderStyle Width="20px"></HeaderStyle> 
                </RowIndicatorColumn> 
                <ExpandCollapseColumn> 
                <HeaderStyle Width="20px"></HeaderStyle> 
                </ExpandCollapseColumn> 
                <Columns> 
                <telerik:GridEditCommandColumn ButtonType="ImageButton" 
                        EditImageUrl="../images/icons/editrecord.gif" > 
                        <HeaderStyle Width="30px" /> 
                    </telerik:GridEditCommandColumn> 
                    <telerik:GridBoundColumn DataField="PublicVideoID" DataType="System.Int32" HeaderText="ID" 
                        ReadOnly="True" SortExpression="PublicVideoID" UniqueName="PublicVideoID"   
                        Display="true" AllowFiltering="False">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="VideoID" DataType="System.Int32" HeaderText="VideoID" 
                        SortExpression="VideoID" UniqueName="VideoID" Display="false" > 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="FirstName" HeaderText="First Name" SortExpression="FirstName" 
                        UniqueName="FirstName" AllowFiltering="False">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="LastName" HeaderText="Last Name" SortExpression="LastName" 
                        UniqueName="LastName" > 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="BusinessName" HeaderText="Organization" SortExpression="BusinessName" 
                        UniqueName="BusinessName">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="Name" HeaderText="Public Story Title" SortExpression="Name" 
                        UniqueName="Name" AllowFiltering="False">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="Description"   
                        HeaderText="Public Director’s Notes" SortExpression="Description" 
                        UniqueName="Description" Display="false" AllowFiltering="False">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="FileName" HeaderText="FileName" SortExpression="FileName" 
                        UniqueName="FileName" Display="false" > 
                    </telerik:GridBoundColumn> 
                    <telerik:GridCheckBoxColumn DataField="RemoteVideo" DataType="System.Boolean" HeaderText="RemoteVideo" 
                        SortExpression="RemoteVideo" UniqueName="RemoteVideo" Display="false">  
                    </telerik:GridCheckBoxColumn> 
                    <telerik:GridBoundColumn DataField="FileSize" DataType="System.Int32" HeaderText="FileSize" 
                        SortExpression="FileSize" UniqueName="FileSize" Display="false">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="Duration" HeaderText="Duration" SortExpression="Duration" 
                        UniqueName="Duration" Display="false" Groupable="False">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="ThumbnailName" HeaderText="ThumbnailName" Display="false" 
                        SortExpression="ThumbnailName" UniqueName="ThumbnailName" > 
                    </telerik:GridBoundColumn> 
                    <telerik:GridCheckBoxColumn DataField="Featured" DataType="System.Boolean" HeaderText="Featured" 
                        SortExpression="Featured" UniqueName="Featured">  
                    </telerik:GridCheckBoxColumn> 
                    <telerik:GridBoundColumn DataField="ReleaseDate" HeaderText="ReleaseDate" SortExpression="ReleaseDate" 
                        UniqueName="ReleaseDate" Display="false">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridCheckBoxColumn DataField="Approved" DataType="System.Boolean" HeaderText="Approved" 
                        SortExpression="Approved" UniqueName="Approved">  
                    </telerik:GridCheckBoxColumn> 
                    <telerik:GridBoundColumn DataField="Created" DataType="System.DateTime" HeaderText="Created" 
                        SortExpression="Created" UniqueName="Created" Display="false" > 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="Category" HeaderText="Category" SortExpression="Category" 
                        UniqueName="Category">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="Keywords" HeaderText="Keywords" SortExpression="Keywords" 
                        UniqueName="Keywords" Display="false">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridCheckBoxColumn DataField="Favorite" DataType="System.Boolean" HeaderText="Favorite" 
                        SortExpression="Favorite" UniqueName="Favorite">  
                    </telerik:GridCheckBoxColumn> 
                    <telerik:GridButtonColumn CommandArgument="DigitalAssetID" CommandName="Delete" ButtonType="ImageButton" 
                            ImageUrl="../images/icons/deleteRecord.gif" Text="Delete File" UniqueName="column">  
                            <HeaderStyle Width="30px" /> 
                        </telerik:GridButtonColumn> 
                </Columns> 
                <EditFormSettings EditFormType="Template">  
                        <FormTemplate> 
                                <table style="width: 100%;">  
                                    <tr><td>table full of text boxes</td></tr>  
                                </table>         
                        </FormTemplate> 
                        <EditColumn UniqueName="EditCommandColumn1">  
                        </EditColumn> 
                    </EditFormSettings> 
            </MasterTableView> 
            <GroupingSettings CaseSensitive="False" /> 
            <ClientSettings AllowDragToGroup="True">  
            </ClientSettings> 
            <FilterMenu EnableTheming="True">  
                <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
            </FilterMenu> 
            <PagerStyle AlwaysVisible="true" Mode="NextPrevAndNumeric" /> 
        </telerik:RadGrid> 

code behind
    //Just need a subset of filters  
    protected void RadGrid1_Init(object sender, System.EventArgs e)  
    {  
        GridFilterMenu menu = RadGrid1.FilterMenu;  
        int i = 0;  
        while (i < menu.Items.Count)  
        {  
            if (  
               menu.Items[i].Text == "NoFilter" ||  
               menu.Items[i].Text == "Contains" ||  
               menu.Items[i].Text == "DoesNotContain" ||  
               menu.Items[i].Text == "StartsWith" ||  
               menu.Items[i].Text == "IsEmpty" ||  
               menu.Items[i].Text == "IsNotEmpty" ||  
               menu.Items[i].Text == "EqualTo" ||  
               menu.Items[i].Text == "NotEqualTo")  
            {  
                i++;  
            }  
            else  
            {  
                menu.Items.RemoveAt(i);  
            }  
        }  
    }   
      
    //ItemCommand  
    protected void RadGrid1_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)  
    {          
        if (e.CommandName == "Delete")  
        {  
           //I have to delete my records manually   
        }  
 
        if (e.CommandName == RadGrid.RebindGridCommandName)  
        {  
            //reset filters  
            RadGrid1.Rebind();  
            RadGrid1.CurrentPageIndex = 0;  
        }  
 
        if (e.CommandName == RadGrid.InitInsertCommandName)  
        {  
            // cancel the default operation  
            e.Canceled = true;  
            //Prepare an IDictionary with the predefined values  
            System.Collections.Specialized.ListDictionary newnewValues = new System.Collections.Specialized.ListDictionary();  
            
            //set default checked state for the checkbox inside the EditItemTemplate  
              
            //Insert the item and rebind  
            e.Item.OwnerTableView.InsertItem(newValues);  
            e.Item.OwnerTableView.Rebind();  
        }  
 
 
        if (e.CommandName == RadGrid.UpdateCommandName)  
        {  
            //update my records manually  
            e.Item.OwnerTableView.CurrentPageIndex = 0;  
        }  
 
        if (e.CommandName == RadGrid.PerformInsertCommandName)  
        {  
            //insert my records manually  
            e.Item.OwnerTableView.CurrentPageIndex = 0;  
        }  
 
        if(e.CommandName == RadGrid.EditCommandName)  
        {  
            //prepopulate all my textboxes manually  
              
            // cancel the default operation  
            e.Canceled = true;  
                
            //Insert the item and rebind  
            e.Item.OwnerTableView.InsertItem(newValues);  
        }  
    }  
 
    //Need to bind some listboxes in the FormTemplate  
    protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)  
    {  
         
        if (e.Item is GridEditableItem && e.Item.IsInEditMode)  
        {  
            GridEditableItem edititem = (GridEditableItem)e.Item;  
            //looking for Session variable PubVidID so we can set the dropdownlist correctly  
            if (Session["PubVidID"] !=null)  
            {                int pubVidID = -1;  
                if (int.TryParse(Session["PubVidID"].ToString(), out pubVidID))  
                {  
                    Session["PubVidID"] = null;  
                    if (pubVidID > 0)  
                    {  
                        PublicVideos vds = new PublicVideos();  
                        PublicVideoCategoryTableAdapter pcsta = new PublicVideoCategoryTableAdapter();  
 
                        pcsta.FillByPublicVideoID(vds.PublicVideoCategory, pubVidID);  
 
                        if (vds.PublicVideoCategory != null && vds.PublicVideoCategory.Rows.Count > 0)  
                         {  
                             ((DropDownList) e.Item.FindControl("ddlCategories")).SelectedValue =  
                               vds.PublicVideoCategory[0].LC_CategoryID.ToString();  
                         }  
                    }  
                    else  
                    {  
                        ((DropDownList) e.Item.FindControl("ddlCategories")).SelectedIndex = 0;  
                    }  
                }  
            }  
            else  
            {  
                ((DropDownList)e.Item.FindControl("ddlCategories")).SelectedIndex = 0;  
                RadGrid1.CurrentPageIndex = 0;  
            }  
            LoadFileDropDownList((ListBox) e.Item.FindControl("lbVideo"), ".flv");  
            LoadFileDropDownList((ListBox) e.Item.FindControl("lbThumbnail"), ".jpg");  
              
        }  
    }  
      
    /// <summary> 
    /// Loads the pick list.  
    /// </summary> 
    private void LoadFileDropDownList(ListBox ddl, string ext)  
    {  
        var di = new DirectoryInfo(_ftpPath);  
        FileInfo[] rgFiles = di.GetFiles("*" + ext);  
 
        foreach (FileInfo fi in rgFiles)  
        {  
            if (fi.Extension.ToLower().Equals(ext))  
            {  
                ddl.Items.Add(new ListItem(fi.Name, fi.Name));  
            }  
        }  
    } 
Vlad
Telerik team
 answered on 30 Dec 2008
6 answers
127 views
Hello,

I simply changed my telerik.web.UI.dll to the new 515 version and half of my RadTabStrip stopped synchronising the corresponding PageView when clicked.

Anybody knowing the change originating this, I found nothing in release notes.

I also noticed that for Web20 skin, the vertical TabStrip is not displaying correctly(horizontal half background empty now) ?

CS
Kamen Bundev
Telerik team
 answered on 30 Dec 2008
7 answers
115 views
Hello,

If I have a recurring appointment from november to march, is it possible to figure out which days it recurs in the month of december?  Say this is the range of dates that get picked up in the recurrence:

11/1/2008 9:00 AM
11/15/2008 10:00 AM
12/1/2008 9:00 AM
12/15/2008 10:00 AM
1/1/2009 9:00 AM
1/15/2009 10:00 AM

I want to get only the 12/1 and 12/15 dates; can that be done and how?

Thanks.
Peter
Telerik team
 answered on 30 Dec 2008
1 answer
67 views
Hi

i have a usercontrol inside a radgrid in which input controls ,SAVE and CANCEL buttons available .

suppose user entered  values in input control without clicking save button,  if he choose any other Tab means it should prompt alert message saying that please SAVE details or please click CANCEL


looking for help


Thanks in advance
Paul
Telerik team
 answered on 30 Dec 2008
1 answer
90 views
Hello
I have the need to use the listview radgrid as is possible? If so, can I send in example?

I want to use it as follows.

When you click a button the code would have to add a new line with the values in a textbox and informers, they would want for the columns without the need for the grid is linked with sqldatasource.


att
Claudinei.
Yavor
Telerik team
 answered on 30 Dec 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?