Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
212 views

Hello Guys,

I have a Rad Tree controls and there are hundreds of nodes and sub nodes bound to it. 

Is there anyway from client side that i can select a node which start with "W"(For ex)  by pressing W key on my keyboard? And the tree should be scroll down automatically to selected node.

Thanks in Advance.
Kate
Telerik team
 answered on 24 Jun 2013
1 answer
203 views
Hi,

          I want to upload multiple  files using asyncupload rad control to database.Please give me a solution to get multiple file name of  uploaded files to store in database & store files in project folder.

Thanks,
Arun.
Shinu
Top achievements
Rank 2
 answered on 24 Jun 2013
8 answers
586 views
          protected void RadButtonSave_Click(object sender, EventArgs e)
        {
            foreach (GridItem item in RadGrid1.Items)
            {
                item.DataItem // this is null
            }

            foreach (GridItem item in this.RadGrid1.SelectedItems) //get SelectedItems successfully
            {
                 but item.DataItem is null
            }
        }

can not get the DataItem of SelectedItems.

PPRINC
Top achievements
Rank 1
 answered on 24 Jun 2013
5 answers
71 views
I dynamically create tabs which then have pageviews attached to them which use a ContentURL.  When the user clicks on the submit button on the main page I want to be able to save user input in textboxes in the various pageviews.  I have seen examples which demonstrate tabs being filled with usercontrols and then using the FindControl function to get to textboxes.  How can I find textboxes in PageViews created with ContentURL? 

This is how I load my pageviews.
Private Sub AddPageView(ByVal pageViewID As String, oTab As RadTab, sURLNav As String)
 
    Try
 
        Dim pageView As RadPageView = New RadPageView
        pageView.ID = "PV" + pageViewID
        oTab.PageViewID = "PV" + pageViewID
        pageView.Height = 520
        pageView.ContentUrl = sURLNav
        MainMultiPage.PageViews.Add(pageView)
 
    Catch ex As Exception
 
    End Try
 
End Sub

 

Kate
Telerik team
 answered on 24 Jun 2013
1 answer
52 views
In demo page:

http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandcombo/defaultvb.aspx?product=grid#qsf-demo-source

where you say:

    e.Column = New MyCustomFilteringColumnCS()

should be:

    e.Column = New MyCustomFilteringColumnVB()

sorry, I don't know if this is the right place to post it.

regards.
Maria Ilieva
Telerik team
 answered on 24 Jun 2013
3 answers
168 views
I am trying to use a Custom edit template with 2 Checkboxes and a textbox however when I try to edit a record I get the following error.

"Automatic Updates,Inserts are supported only when the template is IBindable Template"
 
I am not sure what is happening as I have bound all the controls below is the Radgrid code.

<telerik:RadGrid ID="RadGrid4" runat="server" AllowAutomaticUpdates="True"   
                        AllowPaging="True" AutoGenerateEditColumn="True" DataSourceID="SqlDataPending"   
                        GridLines="None" Skin="Sunset" AllowSorting="True">  
                        <MasterTableView AutoGenerateColumns="False" CellSpacing="-1"   
                            DataKeyNames="JobNumber" DataSourceID="SqlDataPending">  
                            <RowIndicatorColumn> 
                                <HeaderStyle Width="20px" /> 
                            </RowIndicatorColumn> 
                            <ExpandCollapseColumn> 
                                <HeaderStyle Width="20px" /> 
                            </ExpandCollapseColumn> 
                            <EditItemTemplate> 
                                <div style="height: 236px">  
                                    <asp:CheckBox ID="CheckBox1" runat="server" Checked='<%# Bind("Approved") %>' /> 
                                    <br /> 
                                    <asp:CheckBox ID="CheckBox2" runat="server" Checked='<%# Bind("Rejected") %>' /> 
                                    <br /> 
                                    <br /> 
                                    Notes:<br /> 
                                    <asp:TextBox ID="TextBox2" runat="server" Height="72px"   
                                        Text='<%# Bind("Notes") %>' Width="348px"></asp:TextBox> 
                                    <br /> 
                                    <asp:Button ID="Update" runat="server" Text="Update" /> 
                                    <asp:Button ID="Cancel" runat="server" Text="Cancel" /> 
                                    <br /> 
                                    <asp:Label ID="Label2" runat="server" Text='<%# Eval("JobNumber") %>'></asp:Label> 
                                </div> 
                            </EditItemTemplate> 
                            <Columns> 
                                <telerik:GridEditCommandColumn> 
                                </telerik:GridEditCommandColumn> 
                                <telerik:GridCheckBoxColumn DataField="Approved" DataType="System.Boolean"   
                                    HeaderText="Approved" SortExpression="Approved" UniqueName="Approved"   
                                    Visible="False">  
                                </telerik:GridCheckBoxColumn> 
                                <telerik:GridCheckBoxColumn DataField="Rejected" DataType="System.Boolean"   
                                    HeaderText="Rejected" SortExpression="Rejected" UniqueName="Rejected"   
                                    Visible="False">  
                                </telerik:GridCheckBoxColumn> 
                                <telerik:GridBoundColumn DataField="Notes" HeaderText="Notes"   
                                    SortExpression="Notes" UniqueName="Notes" Visible="False">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="DictatorID" HeaderText="DictatorID"   
                                    ReadOnly="True" SortExpression="DictatorID" UniqueName="DictatorID">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="JobNumber" DataType="System.Int32"   
                                    HeaderText="JobNumber" ReadOnly="True" SortExpression="JobNumber"   
                                    UniqueName="JobNumber">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="Juvenile" DataType="System.Double"   
                                    HeaderText="Juvenile" ReadOnly="True" SortExpression="Juvenile"   
                                    UniqueName="Juvenile">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="Stat" DataType="System.Int16"   
                                    HeaderText="Stat" ReadOnly="True" SortExpression="Stat" UniqueName="Stat">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="Case #" HeaderText="Case #" ReadOnly="True"   
                                    SortExpression="Case #" UniqueName="Case #">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="Date Dictated" DataType="System.DateTime"   
                                    HeaderText="Date Dictated" ReadOnly="True" SortExpression="Date Dictated"   
                                    UniqueName="Date Dictated">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="Dictating Officer"   
                                    HeaderText="Dictating Officer" ReadOnly="True"   
                                    SortExpression="Dictating Officer" UniqueName="Dictating Officer">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="Date Typed" DataType="System.DateTime"   
                                    HeaderText="Date Typed" ReadOnly="True" SortExpression="Date Typed"   
                                    UniqueName="Date Typed">  
                                </telerik:GridBoundColumn> 
                            </Columns> 
                            <EditFormSettings EditFormType="Template">  
                                <EditColumn UniqueName="EditCommandColumn1">  
                                </EditColumn> 
                            </EditFormSettings> 
                        </MasterTableView> 
                        <ClientSettings> 
                            <Selecting AllowRowSelect="True" /> 
                        </ClientSettings> 
                    </telerik:RadGrid> 
Princy
Top achievements
Rank 2
 answered on 24 Jun 2013
3 answers
53 views
My picture dropdown is requiring two tab key presses after selecting a value only in IE8 (works fine in IE7, IE9, FF, Chrome, Safari).

I've removed the client side event and commented out all of server side code in the postback event and the control still requires two tabs to leave the field after selecting a value.  If you don't change the value you can correctly tab through the field.

<telerik:RadComboBox LabelText="Occupancy:" LabelWidth="175px" Width="200px" Height="340px" DropDownWidth="260px" ID="vcbxOccupancy" OnSelectedIndexChanged="vcbxOccupancy_SelectedIndexChanged" AutoPostBack="true" OnClientSelectedIndexChanged="OccupancyType_OnChanged" runat="server" >

<ClientItemTemplate>

    <div style="font-size: 15px; font-weight: bold;">#=Text#</div>

    <div style="height: 136px; background: url(../App_Themes/common/Images/OccTypes.jpg) 0px #= Attributes.Offset #px no-repeat;"></div><br />

</ClientItemTemplate>

</telerik:RadComboBox>

 

 

 

Peter Filipov
Telerik team
 answered on 24 Jun 2013
3 answers
324 views
Hello everyone!

Tell me how to keep Insert Form Open after the commanditem event is used - check if username is not in the database so insert a new user in the database and close the form. Check If username is already in the database so keep the insert form open and change new username in the insert form. 

The InsertNewUser method is called in the CommandItem Event. 

private void InsertNewUser(GridItem gridItem)
    {
        //initizlize new object of User System
        User UserBLL = new User();
 
        //initizlize new setUser of User Info Model
        UserInfo setUserInfo = new UserInfo();
 
        //initizlize new object of PO User System Info
        POUserSystemInfo POUserSysBLL = new POUserSystemInfo();
 
        //initizlize new object of PO User Attribute Model
        POInfo setPOUserInfo = new POInfo();
 
 
        UserControl userControl = (UserControl)gridItem.FindControl(GridEditFormItem.EditFormUserControlID);
 
        RadTextBox txtfirstname = (userControl.FindControl("txtfirstname") as RadTextBox);
        RadTextBox txtlastname = (userControl.FindControl("txtlastname") as RadTextBox);
        RadTextBox txtusername = (userControl.FindControl("txtusername") as RadTextBox);
        RadTextBox txtemail = (userControl.FindControl("txtemail") as RadTextBox);
        RadMaskedTextBox txtPhone = (userControl.FindControl("txtPhone") as RadMaskedTextBox);
        RadMaskedTextBox txtExtension = (userControl.FindControl("txtExtension") as RadMaskedTextBox);
        RadMaskedTextBox txtfax = (userControl.FindControl("txtfax") as RadMaskedTextBox);
        RadTextBox txtjobtitle = (userControl.FindControl("txtjobtitle") as RadTextBox);
 
 
        RadTabStrip RadTabStrip1 = (userControl.FindControl("RadTabStrip1") as RadTabStrip);
        RadPageView RadPageView2 = (userControl.FindControl("RadPageView2") as RadPageView);
 
 
        setUserInfo.user_id = 0;
        setUserInfo.firstname = txtfirstname.Text;
        setUserInfo.lastname = txtlastname.Text;
        setUserInfo.sys_username = txtusername.Text;
        setUserInfo.jobtitle = txtjobtitle.Text;
        setUserInfo.designation = ' ';
        setUserInfo.phone = txtPhone.Text;
        setUserInfo.fax = txtfax.Text;
        setUserInfo.email = txtemail.Text;
        setUserInfo.update_date = DateTime.Now;
        setUserInfo.removed = false;
        setUserInfo.extension = txtExtension.Text;
        setUserInfo.update_date = DateTime.Now;
        setUserInfo.removed = false;
        setUserInfo.extension = txtExtension.Text;
 
        setUserInfo.update_by = 0;
 
 
        //Check if Username is not in the database.
        if (UserBLL.GetUser(txtusername.Text.Trim()) == null)
        {
            //Insert New Record to the table in the database
            int NewUserID = 0;
            NewUserID = UserBLL.RegisterUser(setUserInfo);
 
            if (NewUserID > 0)
            {
 
                //Clear ViewState and Refresh RadGrid Control
                ViewState["Users"] = null;
                rgUsersMain.Rebind();
 
                gridItem.OwnerTableView.IsItemInserted = false;
                Edit = true;
                EditItemIndex = rgUsersMain.Items.Count - 1;
                Session["IsNewUser"] = true;
                Session["rgNewUserID"] = NewUserID;
            }
        }
        else
        {
 
            //Keep Insert Form Open
 
            GridEditableItem edititem = (GridEditableItem)gridItem;
            gridItem.OwnerTableView.IsItemInserted = true;
            rgUsersMain.MasterTableView.InsertItem();
            //rgUsersMain.Rebind();
 
            RadWindowManager1.RadAlert("User Already Exists", 330, 180, "Server RadAlert", "", "");
        }
 
 
    }
                //Clear ViewState and Refresh RadGrid Control
                ViewState["Users"] = null;
                rgUsersMain.Rebind();
 
                gridItem.OwnerTableView.IsItemInserted = false;
                Edit = true;
                EditItemIndex = rgUsersMain.Items.Count - 1;
                Session["IsNewUser"] = true;
                Session["rgNewUserID"] = NewUserID;
            }
        }
        else
        {
 
            //Keep Insert Form Open
 
            GridEditableItem edititem = (GridEditableItem)gridItem;
            gridItem.OwnerTableView.IsItemInserted = true;
            rgUsersMain.MasterTableView.InsertItem();
            //rgUsersMain.Rebind();
 
            RadWindowManager1.RadAlert("User Already Exists", 330, 180, "Server RadAlert", "", "");
        }

Kostadin
Telerik team
 answered on 24 Jun 2013
1 answer
174 views
Hi,
         I tried to upload multiple files with async upload rad control.But it upload only the first file and the rest of the files are not uploaded.
Please give me the solution.

My Code:
In .Cs page:
             protected void RadAsyncUpload1_FileUploaded(object sender, FileUploadedEventArgs e)
        {
            UploadedFile file = RadAsyncUpload1.UploadedFiles[0];
            string s = file.FileName;
            string path = Path.GetFileName(s);
            string targetfolder = RadAsyncUpload1.TargetFolder;
            e.File.SaveAs(Server.MapPath(targetfolder + e.File.FileName));
           
}
In .aspx page:
                <telerik:RadAsyncUpload runat="server" ID="RadAsyncUpload1" overwriteexistingfiles="true"  TargetFolder ="~/uploadattachment/" AllowedFileExtensions=".pdf,.doc,.docx,.txt"
                              MaxFileSize="524288"  
                              Skin="Simple" MultipleFileSelection="Automatic" 
                                UploadedFilesRendering="BelowFileInput" ChunkSize="0" 
                                onfileuploaded="RadAsyncUpload1_FileUploaded">
                         </telerik:RadAsyncUpload>

        
                        
Shinu
Top achievements
Rank 2
 answered on 24 Jun 2013
3 answers
80 views
I need to have 2 charts (one on top of the other) and I also need to use the zoom feature. Is there any client events for RadChart I can use to synchronize both charts when the user zoom or scroll the content in the X-Axis (date/time axis)?

Thanks
Yavor
Telerik team
 answered on 24 Jun 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?