Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
196 views
I have a master page which contains the form tag

now on the content page i have radtextbox,radnumbericboc.raddatepicker,radcombobox,checkbox and radio button.

i have a buton called clear on the content page.
now onclientClick event of the buton i want to clear the fileds in the content page.

i dont want to do  manually each fileds like setting txtabc.text=""; etc.
just want to clear form by using loops.

please help me as soon as possible.

thnaks in advance
Aarsh
Top achievements
Rank 1
 answered on 04 Feb 2013
4 answers
173 views
I have a RadGrid in a user control and have Radcombo boxes in Radgrid's Items Template. I want to use Load on demand to populate the combobox in 3rd column of the grid (ddlElementEdit in code below). The data in this column will be populated based on the value selected in the comboboxes in 1st column (ddlETypeEdit in code below) and 2nd column (ddlCOIDEdit) of the grid. Please let me know how can I implement this. Please find the markup of the grid below.

<telerik:RadGrid ID="RadGrid1" GridLines="None" runat="server" AllowAutomaticDeletes="True"
        EnableViewState="true" AllowAutomaticInserts="True" Skin="Outlook" ShowHeader="true" 
        CssClass="GridStyle" AllowPaging="true" PageSize="10"
        OnDeleteCommand="RadGrid1_DeleteCommand" OnPageIndexChanged="RadGrid1_PageIndexChanged"
        Height="100%" HorizontalAlign="Center"
        OnItemDataBound="RadGrid1_ItemDataBound" 
        onitemcommand="RadGrid1_ItemCommand" ShowGroupPanel="true">
        <PagerStyle AlwaysVisible="true" />
        <ItemStyle HorizontalAlign="Center" />
        <AlternatingItemStyle HorizontalAlign="Center" />
        <MasterTableView CommandItemDisplay="Bottom" EnableViewState="true"
            NoMasterRecordsText="" EditMode="InPlace" HorizontalAlign="Center" AutoGenerateColumns="False"
            Caption="Manual Assignment" TableLayout="Auto" GroupLoadMode="Server">

            <GroupByExpressions>
                <telerik:GridGroupByExpression>
                                    <SelectFields>
                        <telerik:GridGroupByField  FieldName="Seq" 
                            HeaderValueSeparator=":"></telerik:GridGroupByField>
                    </SelectFields>
                    <GroupByFields>
                        <telerik:GridGroupByField FieldName="Seq" SortOrder="Ascending"></telerik:GridGroupByField>
                    </GroupByFields>
                </telerik:GridGroupByExpression>
            </GroupByExpressions>

            <Columns>
                <telerik:GridButtonColumn ButtonType="ImageButton" ConfirmDialogType="RadWindow"
                    ConfirmText="Delete this Element?" CommandName="Delete" Text="Delete" ConfirmTitle="Delete"
                    UniqueName="DeleteColumn" ItemStyle-Width="50px" HeaderStyle-Width="50px">
                    <ItemStyle CssClass="MyImageButton" HorizontalAlign="Center" />
                </telerik:GridButtonColumn>
                <telerik:GridTemplateColumn ItemStyle-Width="125px" UniqueName="ManETypeCol"
                    HeaderText="Type" HeaderStyle-Width="125px">
                    <ItemTemplate>
                        <telerik:RadComboBox ID="ddlETypeEdit" runat="server" AutoPostBack="true" DataSourceID="SqlDataSource2"
                            DataTextField="Description" DataValueField="ID" Width="110px" EnableViewState="false"
                            OnSelectedIndexChanged="ddlETypeEdit_SelectedIndexChanged" NoWrap="true" OnDataBound="ddlETypeEdit_DataBound">
                        </telerik:RadComboBox>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn ItemStyle-Width="225px" UniqueName="ManCOIDColumn" HeaderText="Location" HeaderStyle-Width="225px">
                    <ItemTemplate>
                        <%--<telerik:RadComboBox ID="ddlCOIDEdit" runat="server" AutoPostBack="true" Width="200px"
                            DataSourceID="SqlDataSource3" DataTextField="CODescription" DataValueField="coID"
                            OnSelectedIndexChanged="ddlCOIDEdit_SelectedIndexChanged" EnableViewState="false" NoWrap="true" OnDataBound="ddlCOIDEdit_DataBound">
                        </telerik:RadComboBox>--%>
                        <telerik:RadComboBox ID="ddlCOIDEdit" runat="server" AutoPostBack="true" Width="200px"
                            OnSelectedIndexChanged="ddlCOIDEdit_SelectedIndexChanged" EnableViewState="false" NoWrap="true" OnDataBound="ddlCOIDEdit_DataBound">
                        </telerik:RadComboBox>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn ItemStyle-Width="225px" UniqueName="ManElementColumn"
                    HeaderText="Element" HeaderStyle-Width="225px">
                    <ItemTemplate>
                        <telerik:RadComboBox ID="ddlElementEdit" runat="server" AutoPostBack="true" Width="200px"
                            EnableViewState="false" OnSelectedIndexChanged="ddlElementEdit_SelectedIndexChanged" NoWrap="true" OnDataBound="ddlElementEdit_DataBound" 
                             EnableLoadOnDemand="true" ShowMoreResultsBox="true" EnableVirtualScrolling="true" OnItemsRequested="ddlElementEdit_ItemsRequested">
                        </telerik:RadComboBox>
                       
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
AratiS
Top achievements
Rank 1
 answered on 04 Feb 2013
3 answers
195 views
i try add custom button column as descripted in demo like:
private void AddGridButtonColumn(string name, string uniqueName, bool sortable)  
        {  
            //remove first if grid has a column with that name  
            RemoveGridColumn(uniqueName);  
            // Add a new column with the specified name  
            GridButtonColumn gridButtonColumn1 = new GridButtonColumn();  
            gridButtonColumn1.HeaderText = name;  
            if (sortable)  
                gridButtonColumn1.SortExpression = uniqueName;  
            gridButtonColumn1.UniqueName = uniqueName;  
            gridButtonColumn1.DataTextField = uniqueName;  
 
            RadFileExplorer_SharedFolderBrowser.Grid.Columns.Add(gridButtonColumn1);  
        } 

but no button appears in grid.

any solution?

Vessy
Telerik team
 answered on 04 Feb 2013
2 answers
88 views
Please take a look at the first screenshot I've attached.  That's the normal appearance of an editor I've built with the RadTreeView and some other standard controls.  Everything works fine except that testing has revealed one unacceptable peculiarity.

If the browser window is made quite narrow and then a fairly wide Description is chosen in the treeview (and displayed in the accompanying textbox) then everything suddenly shifts over to the left and the editor becomes unusable until the browser is refreshed.

Here's the pertinent layout code:

<div class="content1" style="margin:40px">
  <asp:UpdateProgress ID="UpdateProgress1" runat="server" Visible="true">
    <ProgressTemplate>
      <div id="progress" class="progress">
        <img src="../Images/Progress/indicator_big.gif" />
        <br /><br />
        Please Wait
      </div>
    </ProgressTemplate>
  </asp:UpdateProgress>
 
  <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
      <asp:HiddenField ID="scrollOkay" runat="server" />   <%-- If set true then the tree's scrollIntoView function will be used. --%>
 
      <asp:Panel ID="panelPath" runat="server" Width="720px" style="padding:5px">
        Path: <asp:Label ID="labelPath" runat="server" Text="" style="font-weight:bold" />
      </asp:Panel>
 
      <div style="height:15px"></div>
 
      <asp:Panel ID="panelTree" runat="server" Width="350" Height="500" BorderColor="DarkGray"
                 BorderStyle="Groove" BorderWidth="1" style="float:left">
        <telerik:RadTreeView ID="treeViewMain" runat="server"
                             ExpandAnimation-Duration="5"
                             ShowLineImages="true"
                             OnNodeExpand="treeViewMain_NodeExpand"
                             OnNodeClick="treeViewMain_NodeClick"
                             MultipleSelect="false"
                             AllowNodeEditing="false"
                             EnableDragAndDrop="true"
                             OnNodeDrop="treeViewMain_NodeDrop"
                             Height="500px" Width="350px"
                             style="background-color:#F0F8FF"
        />
      </asp:Panel>
 
      <div style="width:30px; float:left"></div>
       
      <asp:Panel ID="panelFields" runat="server" Width="340" Enabled="false" BorderColor="DarkGray" BorderStyle="Solid" BorderWidth="1" style="float:left; padding:10px">
        <asp:Table ID="tableFields" runat="server" CellSpacing="5">
          <asp:TableRow>
            <asp:TableCell HorizontalAlign="Right" style="padding-right:7px" Text="Type:" />
            <asp:TableCell>
              <asp:DropDownList ID="dropDownListType" runat="server" Width="240px" AutoPostBack="true"
                                OnSelectedIndexChanged="dropDownListType_SelectedIndexChanged" />
            </asp:TableCell>
          </asp:TableRow>
 
          <asp:TableRow>
            <asp:TableCell HorizontalAlign="Right" style="padding-right:7px" Text="SubType:" />
            <asp:TableCell>
              <asp:DropDownList ID="dropDownListSubType" runat="server" Width="240px" AutoPostBack="true"
                                OnSelectedIndexChanged="dropDownListSubType_SelectedIndexChanged" />
            </asp:TableCell>
          </asp:TableRow>
 
          <asp:TableRow>
            <asp:TableCell HorizontalAlign="Right" style="padding-right:7px" Text="Description:" />
            <asp:TableCell>
              <asp:TextBox ID="textBoxDescription" runat="server" Width="236px" AutoPostBack="true" OnTextChanged="textBoxDescription_TextChanged" />
            </asp:TableCell>
          </asp:TableRow>
 
          <asp:TableRow>
            <asp:TableCell HorizontalAlign="Right" style="padding-right:7px" Text="Equip No.:" />
            <asp:TableCell>
              <asp:TextBox ID="textBoxEquipNo" runat="server" Width="50" style="text-align:right; padding-right:1px" AutoPostBack="true"
                           OnTextChanged="textBoxEquipNo_TextChanged" />
            </asp:TableCell>
          </asp:TableRow>
 
          <asp:TableRow>
            <asp:TableCell HorizontalAlign="Right" style="padding-right:7px" Text="MIMS:" />
            <asp:TableCell>
              <asp:TextBox ID="textBoxMims" runat="server" Width="50" style="text-align:right; padding-right:1px" AutoPostBack="true"
                           OnTextChanged="textBoxMims_TextChanged" />
            </asp:TableCell>
          </asp:TableRow>
 
          <asp:TableRow>
            <asp:TableCell HorizontalAlign="Right" style="padding-right:7px" Text="Quantity:" />
            <asp:TableCell>
              <asp:TextBox ID="textBoxQuantity" runat="server" Width="50" style="text-align:right; padding-right:1px" AutoPostBack="true"
                           OnTextChanged="textBoxQuantity_TextChanged" />
            </asp:TableCell>
          </asp:TableRow>
        </asp:Table>
      </asp:Panel>
    </ContentTemplate>
  </asp:UpdatePanel>
 
  <div style="position:absolute; left:275px; top:762px; font-size:12px">
    <asp:LinkButton ID="linkButtonEquipSubtypeEditor" runat="server" Text="Equipment Subtypes" PostBackUrl="~/Editors/equipSubtypeEditor.aspx" style="color:Blue" />
  </div>
</div>

I've tried several different approaches to resolving this problem.  I really don't understand why the RadTreeView shifts to the left just because a string in a TextBox is long.  Or to look at it another way, why does a Panel control, which is the parent of the the TextBox shift over to the left just because a string in that TextBox is long?

Any suggestions would be much appreciated!

Robert
Robert
Top achievements
Rank 1
 answered on 04 Feb 2013
1 answer
64 views
Hi support Team,

Can please suggest for the below requirement. Attached is the Required Radchart.

The requirement is to produce a  multi-chart with stacked bar and line series.  The line series will be for part periods only

 

a)      One series for full date range scale

b)      One series for past period of date range scale

c)       One series for future period of date range scale

Missing User
 answered on 04 Feb 2013
3 answers
116 views
I am programmatically adding columns to the RadGrid.
The problem is, after a postback (when say expanding the grid even though there is no code to populate data for the next level down hierarchy), the heading columns are gone.

any ideas why?

I also need to state that, should there be a postback from a column, which will be added in the future, that I need to obtain the modified row column values also.

protected void Page_Load(object sender, EventArgs e)
        {
            this.DoSetDefaultMenuColumns();
        }
 
        private void DoSetDefaultMenuColumns()
        {
            // lets create the columns.
            GridBoundColumn menuIDColumn = new GridBoundColumn();
            menuIDColumn.HeaderText = "Menu ID";
            menuIDColumn.DataField = "MenuID";
 
            GridBoundColumn menuNameColumn = new GridBoundColumn();
            menuNameColumn.HeaderText = "Menu Name";
            menuNameColumn.DataField = "MenuName";
 
            GridDropDownColumn menuOrderColumn = new GridDropDownColumn();
            menuOrderColumn.HeaderText = "Menu Order ID";
            menuOrderColumn.DataField = "MenuOrderID";
 
            GridDropDownColumn parentIDColumn = new GridDropDownColumn();
            parentIDColumn.HeaderText = "Parent ID";
            parentIDColumn.DataField = "ParentID";
 
            GridCheckBoxColumn isAdminColumn = new GridCheckBoxColumn();
            isAdminColumn.HeaderText = "Is Admin";
            isAdminColumn.DataField = "IsAdmin";
 
            GridBoundColumn pageURLColumn = new GridBoundColumn();
            pageURLColumn.HeaderText = "Page URL";
            pageURLColumn.DataField = "PageURL";
 
            GridCheckBoxColumn employeeAccessColumn = new GridCheckBoxColumn();
            employeeAccessColumn.HeaderText = "Employee Access";
            employeeAccessColumn.DataField = "EmployeeAccess";
 
            GridCheckBoxColumn customerAccessColumn = new GridCheckBoxColumn();
            customerAccessColumn.HeaderText = "Customer Access";
            customerAccessColumn.DataField = "CustomerAccess";
 
            this.radGridMenus.MasterTableView.Columns.Add(menuIDColumn);
            this.radGridMenus.MasterTableView.Columns.Add(menuNameColumn);
            this.radGridMenus.MasterTableView.Columns.Add(menuOrderColumn);
            this.radGridMenus.MasterTableView.Columns.Add(parentIDColumn);
            this.radGridMenus.MasterTableView.Columns.Add(pageURLColumn);
            this.radGridMenus.MasterTableView.Columns.Add(isAdminColumn);
            this.radGridMenus.MasterTableView.Columns.Add(employeeAccessColumn);
            this.radGridMenus.MasterTableView.Columns.Add(customerAccessColumn);
        }

Pavlina
Telerik team
 answered on 04 Feb 2013
1 answer
87 views
2 answers
62 views
Hi.
So I have the RadControls for ASP.NET AJAX.

I have a hierarchy data (think of it as multi level sub menus).
I want to display this in the UI but in a grid view (no client side rendering/filtering) of some kind.
At the same time, I want to add custom controls or column to represent the item value, such as a checkbox or editable textbox.
I also want to add a column where it would have the options for "Update"
When they press Update, I want to be able to get the entire row details which contains the changes made by the user

does RadControls have anything like this? Any samples of it?
Many thanks!
Ahmed Ilyas
Top achievements
Rank 1
 answered on 04 Feb 2013
3 answers
154 views
Hi,

    I'm seeing white empty space above the scrollbar on the radgrid (first_Image.png). I went through several theards on this issue and found a css solution to modify the .rgHeaderDiv

.RadGrid

 

.rgHeaderDiv

 

{

 

border: 0px solid !important;

 

 

width: 100% !important;

 

}



This works fine for me except one issue.
This solution has distorted the alignment of the header and Items columns (second_Image.png). I could not figure out how to resolve this issue. Please help me.

Thanks
Rajesh
Pavlina
Telerik team
 answered on 04 Feb 2013
3 answers
101 views
Hi Telerik team,

I've been living through the annoying auto generated code in RadGrid for like 2-3 years. Today I find that enough is enough, so now I gonna report this to you guys and see if there's any solution. Please see code below: 

<telerik:RadGrid ID="grdTest" runat="server" Skin="custom" EnableEmbeddedSkins="false" EnableTheming="false"
                                                AllowPaging="false" AllowSorting="false" BorderStyle="None" ShowHeader="true" Width="680px">
                                                <ClientSettings EnablePostBackOnRowClick="true" EnableRowHoverStyle="true">
                                                    <Selecting AllowRowSelect="true" />
                                                <Selecting AllowRowSelect="true" /><Selecting AllowRowSelect="true" /><Selecting AllowRowSelect="true" /><Selecting AllowRowSelect="true" /><Selecting AllowRowSelect="true" /><Selecting AllowRowSelect="true" />
<Selecting AllowRowSelect="true" /><Selecting AllowRowSelect="true" /><Selecting AllowRowSelect="true" />
<Selecting AllowRowSelect="true" /><Selecting AllowRowSelect="true" /><Selecting AllowRowSelect="true" />

</ClientSettings>

Please take note on the BOLD part, all this code will be auto generated whenever i save the aspx file and only happen if EnablePostBackOnRowClick="true". The code will double up for every save, meaning from 1 line of <Selecting AllowRowSelect="true" /> will become 2 lines, then 4 lines, then 8 lines, and eventually crash my VS2010. Then I'll have to edit the aspx file manually to remove all the duplicate lines in order to run my VS2010 again.

By the way, I'm using Telerik WebUI VSExtensions 2010.03.1109.0.
Angel Petrov
Telerik team
 answered on 04 Feb 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?