Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
42 views
Hi All,

           In WebSite, I'm using RadCombo Box with MultiSelect checkbox . In this I'm using Empty message property. Due to using Empty Message property, RadCombo box height increased.

           How to control this height? Can anyone assist me to fix this issue?

           Thanks in Advance!!!

Thanks,
Sathy Jay
Plamen
Telerik team
 answered on 21 Oct 2014
10 answers
262 views

Hey

I have a radgrid and a nested radgrid inside the radgrid. Everything works fine and I get the ItemCommand events for both of them.
But then I moved this whole thing inside a RadPanel and the the nested Radgrid does not fire the ItemCommand event anymore.

Any help would be appericiated.

 

<

 

 

 

telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Width="100%">

 

 

 

<telerik:RadPanelBar runat="server" ID="RadPanelBar1" ExpandMode="SingleExpandedItem" Width="99%">

 

 

 

 

 

<Items>

 

 

 

 

 

<telerik:RadPanelItem Value="pnlIncidentInfo" Expanded="True" Text="Incidents Details" Font-Bold="true" Font-Size="Medium" runat="server" Selected="true">

 

 

 

 

 

<Items>

 

 

 

 

<telerik:RadPanelItem Value="pnlIDetail" runat="server">

 

 

 

<ItemTemplate>

 

 

 

<div runat="server" id="divIncidentDetail">

 

 

 

<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" AllowSorting="True" Width="99%"

 

 

OnItemCommand="RadGrid1_ItemCommand1" EnableViewState="true" CssClass="BasicGridViewHeader"

 

 

 

AllowMultiRowSelection="False">

 

 

 

<MasterTableView AllowMultiColumnSorting="True" GroupLoadMode="Server">

 

 

 

<NestedViewTemplate>

 

 

 

<telerik:RadGrid ID="RadGrid2" runat="server" EnableViewState="true"

 

 

 

AutoGenerateColumns="False" AllowSorting="True"

 

 

AllowMultiRowSelection="true" Width="25%" CssClass="BasicGridViewHeader"

 

 

 

OnItemCommand="RadGrid2_ItemCommand" >

 

 

 

<MasterTableView AllowMultiColumnSorting="True" GroupLoadMode="Server">

 

 

 

<NestedViewTemplate>

 

 

 

<telerik:RadGrid ID="RadGrid3" runat="server"

 

 

AutoGenerateColumns="False" AllowSorting="True"

 

 

 

AllowMultiRowSelection="true" Width="100%"

 

 

HierarchyLoadMode="ServerOnDemand">

 

 

 

<MasterTableView AllowMultiColumnSorting="True" GroupLoadMode="Server">

 

 

<Columns>

 

 

 

<telerik:GridBoundColumn HeaderStyle-Font-Bold="true" HeaderText="Error Text" DataField="ErrorText" UniqueName="ErrorText" ItemStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>

 

 

 

</Columns>

 

 

 

</MasterTableView>

 

 

 

</telerik:RadGrid>

 

 

 

</NestedViewTemplate>

 

 

 

<Columns>

 

 

<telerik:GridButtonColumn HeaderStyle-Font-Bold="true" CommandArgument="PageName" HeaderText="Page Name" DataTextField="PageName" UniqueName="PageName"></telerik:GridButtonColumn>

 

 

 

</Columns>

 

 

</MasterTableView>

 

 

 

</telerik:RadGrid>

 

 

 

</NestedViewTemplate>

 

 

 

<Columns>

 

 

 

<telerik:GridBoundColumn HeaderStyle-Font-Bold="true" HeaderText="Document Name" DataField="DocumentName" UniqueName="DocumentName" ItemStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn HeaderStyle-Font-Bold="true" HeaderText="Status" DataField="Status" UniqueName="Status" ItemStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridBoundColumn HeaderStyle-Font-Bold="true" HeaderText="Due Date" DataField="LastEditDate" UniqueName="LastEditDate" ItemStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridBoundColumn HeaderStyle-Font-Bold="true" HeaderText="Action" DataField="Action" UniqueName="Action" ItemStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>

 

 

 

 

 

</Columns>

 

 

 

</MasterTableView>

 

 

 

 

</telerik:RadGrid>

 

 <

 

/div>

 

 

 

<br />

 

 

 

</ItemTemplate>

 

 

 

 

 

 

</telerik:RadPanelItem>

 

 

 

 

 

</Items>

 

 

 

</telerik:RadPanelItem>

 

 

 

 

</Items>

 

 

 

 

</telerik:RadPanelBar>

 

 

 

 

</telerik:RadAjaxPanel>

 

 

 

Kostadin
Telerik team
 answered on 21 Oct 2014
3 answers
192 views
Hi friends,I have Telerik Treelist control which works perfectly when I use EditFormType="AutoGenerated"
but when I use EditFormType="Template" with a customized template my template for insertion is not showing when I click in the Add(+) image.The template for edit works fine.
When I use breakpoint in the RadTreeList1_ChildItemsDataBind event I found this error.
I have a textbox and checkbox in the template.
The aspcheckbox is creating the problem.I tried with the following solution of using RadTreeList1_ItemCommand()
System.Collections.Specialized.ListDictionary newValues = new System.Collections.Specialized.ListDictionary();
    newValues["AccountName"] = string.empty
    newValues["IsDirect"] = true;

----------------------------------------------------------------------------------------------------------------------------------------------------------------------
but it does'nt work.
I am posting my code sniplet below:

<telerik:RadTreeList ID="RadTreeList1" runat="server"
            AutoGenerateColumns="false" DataKeyNames="AccountId"
        AllowLoadOnDemand="True"  EditMode="EditForms"
            onchilditemsdatabind="RadTreeList1_ChildItemsDataBind"
            onneeddatasource="RadTreeList1_NeedDataSource" AllowPaging="True" AllowSorting="True"           
            ParentDataKeyNames="PAccountId" Skin="Web20"
            oninsertcommand="RadTreeList1_InsertCommand"       
            >
<Columns>
               <telerik:TreeListEditCommandColumn UniqueName="InsertCommandColumn" ButtonType="ImageButton"
                HeaderStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
            </telerik:TreeListEditCommandColumn>
               <telerik:TreeListButtonColumn UniqueName="DeleteCommandColumn" Text="Delete" CommandName="Delete"
                ButtonType="ImageButton" HeaderStyle-Width="20px">
            </telerik:TreeListButtonColumn>
                <telerik:TreeListBoundColumn DataField="AccountId" HeaderText="ActId" ReadOnly="true"
                    UniqueName="AccountId"  HeaderStyle-Width="30px" ForceExtractValue="Always">                    
                </telerik:TreeListBoundColumn>
                 <telerik:TreeListBoundColumn DataField="PAccountId" HeaderText="PActId" ReadOnly="true"
                    MaxWidth="" MinWidth="" UniqueName="PAccountId"  HeaderStyle-Width="30px" ForceExtractValue="Always">                    
                </telerik:TreeListBoundColumn>
                <telerik:TreeListBoundColumn DataField="AccountName" HeaderText="Account Name"  
                    HeaderStyle-Width="180px" UniqueName="ActName">
                </telerik:TreeListBoundColumn>
 </Columns>
            
            <EditFormSettings EditFormType="Template">
                <FormTemplate>
                <table class="modalBox" style="width:500px">
                 <tr>
                        <td style="height:10px"></td>
                    </tr>
                    <tr>
                        <td>
                            <table>
                                <tr>
                                <td align="left"><asp:Label ID="lblAccountName" runat="server" Text="Account Name" CssClass="Main_LabelText" Width="120px"></asp:Label>
                                </td>
                                <td align="left">
                               <asp:TextBox ID="txtAccountName" runat="server" Text='<%# Eval("AccountName") %>'   CssClass="TextBoxSmall"></asp:TextBox>
                             </td>
                                </tr>
                                <tr>
                                    <td style="height:10px"></td>
                                </tr>
                            </table>
                        </td>
                    </tr>
 <tr>
                                    <td>                                  
                                        <asp:CheckBox ID="chkIsDirect" CssClass="chkbxSmall" Width="100px" runat="server" Text="IsDirect" TextAlign="Left" Checked='<%# Bind("IsDirect") %>' />
                                        
                                    </td>
                                </tr>
                            </table>
 <tr>
                        <td>
                            <table>
                                <tr>
                                    <td style="height:10px"></td>
                                </tr>
                                <tr>
                                <td>
                               <telerik:RadButton ID="btnUpdate" Text='<%# (Container is TreeListEditFormInsertItem) ? "Insert" : "Update" %>'
                                runat="server" CommandName='<%# (Container is TreeListEditFormInsertItem) ? "PerformInsert" : "Update" %>'
                                Icon-PrimaryIconCssClass="rbOk">
                            </telerik:RadButton>
                           
                            </td>
                                <td> <telerik:RadButton ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
                                CommandName="Cancel" Icon-PrimaryIconCssClass="rbCancel">
                            </telerik:RadButton></td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    
                    <tr>
                        <td style="height:10px"></td>
                    </tr>
                </table>
                   
                </FormTemplate>
            </EditFormSettings>
            
        </telerik:RadTreeList>
Khurram Nazir
Top achievements
Rank 2
 answered on 21 Oct 2014
1 answer
96 views
Hi Team,

User Action : User will do a single click and modify the cells and he will go the next page of the RadGrid by click on the pager. User will modify the values in the next page and so on and when user comes back to the previous page the user should see the modified values. There should not be any popup or any warning when the user moves from one page to another page using pager.



How to get the modified values or modified rows with values before the user moves another pager using the pager of the RaGrid in the codebehind ? Is there any event where we can get the modified rows?

.ASPX Content:
<form id="form1" runat="server">
        <telerik:RadScriptManager ID="ScriptManager1" runat="server" EnableTheming="True">
            <Scripts>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js">
                </asp:ScriptReference>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js">
                </asp:ScriptReference>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js">
                </asp:ScriptReference>
            </Scripts>
        </telerik:RadScriptManager>
    <div>
    
                <br />
        <div>
            Click the button to load the Student data</div>
           <br />
        <telerik:RadButton ID="btnLoadStudent" runat="server" Text="Load Student" OnClick="btnLoadStudent_Click">
        </telerik:RadButton>
         
              <br />
        
        <br />
        <div style="color: #800080">
            The below grid uses BatchEdit Mode:  (BatchEditingSettings EditType="Cell" )</div>
          <br />
        <telerik:RadGrid ID="rgStudent" runat="server" AllowPaging="True" AllowSorting="True" PageSize="4" AutoGenerateColumns="False" GridLines="Both" OnPageIndexChanged="rgStudent_PageIndexChanged" Width="673px">
            <MasterTableView EditMode="Batch"  DataKeyNames="StudentID" >
                      <BatchEditingSettings EditType="Cell" />
                <RowIndicatorColumn Visible="False">
                </RowIndicatorColumn>
                <ExpandCollapseColumn Created="True">
                </ExpandCollapseColumn>
                <Columns>
                    <telerik:GridTemplateColumn DataField="StudentID" DataType="System.Byte" FilterControlAltText="Filter StudentID column" HeaderText="StudentID" SortExpression="StudentID" UniqueName="StudentID">
                       <%-- <EditItemTemplate>
                            <asp:TextBox ID="StudentIDTextBox" runat="server" Text='<%# Bind("StudentID") %>'></asp:TextBox>
                        </EditItemTemplate>--%>
                        <ItemTemplate>
                            <asp:Label ID="StudentIDLabel" runat="server" Text='<%# Eval("StudentID") %>'></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn DataField="StudentName" FilterControlAltText="Filter StudentName column" HeaderText="StudentName" SortExpression="StudentName" UniqueName="StudentName">
                        <EditItemTemplate>
                            <asp:TextBox ID="StudentNameTextBox" runat="server" Text='<%# Bind("StudentName") %>' Width="75px"></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="StudentNameLabel" runat="server" Text='<%# Eval("StudentName") %>'></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn DataField="Mark" DataType="System.Byte" FilterControlAltText="Filter Mark column" HeaderText="Mark" SortExpression="Mark" UniqueName="Mark">
                        <EditItemTemplate>
                            <asp:TextBox ID="MarkTextBox"  Width="75px" runat="server" Text='<%# Bind("Mark") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="MarkLabel" runat="server" Text='<%# Eval("Mark") %>'></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn DataField="Grade" FilterControlAltText="Filter Grade column" HeaderText="Grade" SortExpression="Grade" UniqueName="Grade">
                        <EditItemTemplate>
                            <asp:TextBox ID="GradeTextBox" Width="75px" runat="server" Text='<%# Bind("Grade") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="GradeLabel" runat="server" Text='<%# Eval("Grade") %>'></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn DataField="Phone" FilterControlAltText="Filter Phone column" HeaderText="Phone" SortExpression="Phone" UniqueName="Phone">
                        <EditItemTemplate>
                            <asp:TextBox ID="PhoneTextBox" Width="75px"  runat="server" Text='<%# Bind("Phone") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="PhoneLabel" runat="server" Text='<%# Eval("Phone") %>'></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
    </div>             <br/>

                        <div>
                            User Action : User will do a single click and modify the cells and he will go the next page of the RadGrid by click on the pager. User will modify the values in the next page and so on and when user comes back to the previous page the user should see the modified values. There should not be any popup or any warning when the user moves from one page to another page using pager.</div>
           <br/>
                   <div>
                       How to get the modified values or modified rows with values before the user moves another pager 
                       using the pager of the RaGrid in the codebehind ? Is there any event where we can get the modified rows?</div>
   
    </form>

.cs Content
public partial class RadGrdiForm : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnLoadStudent_Click(object sender, EventArgs e)
        {
            this.rgStudent.DataSource = this.GetStudentData();
            this.rgStudent.DataBind();
        }

        public RadGridProofOfConcept.StudentDS.tblStudentDataTable GetStudentData()
        {
            RadGridProofOfConcept.StudentDSTableAdapters.tblStudentTableAdapter adapter = new StudentDSTableAdapters.tblStudentTableAdapter();
            return adapter.GetData();
        }

        protected void rgStudent_PageIndexChanged(object sender, Telerik.Web.UI.GridPageChangedEventArgs e)
        {
            this.rgStudent.CurrentPageIndex = e.NewPageIndex;
            this.rgStudent.DataSource = this.GetStudentData();
            this.rgStudent.DataBind();
        }
    }

Is there anyway to attach the sample code which we are working
Konstantin Dikov
Telerik team
 answered on 21 Oct 2014
3 answers
310 views
Hello,
I have the following scenario. I have an empty RadGrid and I want to inline insert items. I also have a button and on the button click I need to insert all the items from the RadGrid into a database.
I want to use a DataTable that is placed in a session object as a datasource for my RadGrid. On every RadGrid insert item event I want to add a row into my session DataTable. And after a button click I am going to take each row from the DataTable and insert it's data into an EntityObject (which is in my case called "Product") which I'm going to insert into a database with context.SaveChanges() method.
What I can't accomplish is to store temporary data in a DataTable that is stored in session object.

Please, is there any example of something similar?
Radoslav
Telerik team
 answered on 21 Oct 2014
1 answer
92 views
Hi,
I have a problem with telerik grid: I wan't to change pagebuttoncount property dynamically. But, I got a error (version: 2014.2.724.40)
this is my code
x =  $find('ucGlobalSearch_User_radGridContact');
x.MasterTableView.set_pageButtonCount(4);
Error is in this line: ._data.pageOfLabelClientID;
Sorry, my english is bad
Thanks.

Angel Petrov
Telerik team
 answered on 21 Oct 2014
1 answer
169 views
Hi

My code like this

  <telerik:RadAjaxLoadingPanel ID="Rad1" runat="server"  />
       <telerik:RadAjaxPanel ID="Rad2" runat="server"  LoadingPanelID="Rad1">
<asp:FileUpload ID="Fup1" runat="server" />
</telerik:RadAjaxPanel>  

But I canot retrieved the posted file how will do this? can u solve this
Boyan Dimitrov
Telerik team
 answered on 21 Oct 2014
6 answers
361 views
In http://www.obout.com/editor_new/xhtmlcompare.aspx, obout claims:

obout Editor generates identical XHTML compliant output in all browsers.

Telerik is shown providing different output for different browsers.

Does this matter, and if so, should I be using obout's editor rather than teleriks?

Thank you,
Brother Bill
George
Top achievements
Rank 2
 answered on 20 Oct 2014
4 answers
528 views
I want to add/remove a class from the RadDatePicker when validation occurs, so I can change the border and font to red when it is invalid, and remove those styles when the user fixes the input. I've seen many posts in various forums asking this question or similar questions, but none of the suggestions work with the RadDatePicker.

What I want is a simple and common scenario:
- User selects a date
- Validation fires
- If invalid, change the color or other CSS properties of the control
- Change it back to the default when the user fixes the input

**Edit: I tried to attach a stripped-down version of my project that shows what I have so far, but the extension (ZIP) was not allowed. Please give me an email address to send it to if you'd like to see the sample code.** In the sample project, the problem can be demonstrated by selecting an end date less than the start date, which should trigger the validation. It works correctly in Chrome the first time - border turns red - but only when validation fails after editing the End Date. If validation fails because of changes to the Start Date, the ASP.NET validator picks that up but not the custom code. It's not a complete solution, but it's as far as I got because when I tested in IE I found that the change event doesn't fire at all.

What I really need, and I think many developers would agree, is a simple property on all the Rad controls such as "ErrorStyle" that sets the class used when a control fails validation. Please register that as a feature request.

In the meantime, I could use some help getting this to work with the current version of the date picker. One thing that might help is some information on the client-side events which fire during validation, and which HTML elements they fire from. The date picker has quite a complex hierarchy of elements in it, and I've been having trouble discovering how to hook into the right events. It would be nice if the datepicker had some kind of "onvalidated" event I could use. Failing that, is there a way to handle all validate events on the page, determine which control is a datepicker, and act accordingly?






Edgar
Top achievements
Rank 1
 answered on 20 Oct 2014
1 answer
453 views

want to populate data in dataset from radgrid  , i have  tried following eas bit not working. please provide solution ASAP
Source, DataTable)  -Getting datatable null

2)not getting data from ITemTemplates

le();
        foreach (GridColumn col in grdShippedOrders.Columns)
        {
            DataColumn colString = new DataColumn(col.UniqueName);
            dtRecords.Columns.Add(colString);
 
        }
        foreach (GridDataItem row in grdShippedOrders.Items) // loops through each rows in RadGrid
        {
            DataRow dr = dtRecords.NewRow();
            foreach (GridColumn col in grdShippedOrders.Columns) //loops through each column in RadGrid
                   dr[col.UniqueName] = row[col.UniqueName].Text;
            dtRecords.Rows.Add(dr);
        }
      return dtRecords;

Jayesh Goyani
Top achievements
Rank 2
 answered on 20 Oct 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?