Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
94 views
Hi,
I want to set hierarchy in RadGrid programmatically. When I click on "show child items" first time, the data is fine. When I click it second time, it shows combination of parent rows and child rows. Each time I click on it parent rows are repeated that much time.
Please assist me....

Thanks  
Rohan
Top achievements
Rank 1
 asked on 12 Jan 2011
1 answer
240 views
Hello,

How can I make the Date Picker to show first days of week only
Or at least allow only selection of the first day of week.

Like for January 2011 month allow only 3,10,17,24 & 31 dates to be selected


Thanks,
Sanjay
Shinu
Top achievements
Rank 2
 answered on 12 Jan 2011
0 answers
122 views

i have used date time field with datepicker now i gets problem in find control .in below code..check code properly and reply as soon as possible.
 <telerik:GridDateTimeColumn  FilterControlWidth="120px" DataField="order_date" HeaderText="ORDER DATE" 
                        UniqueName="order_date" PickerType="DatePicker" DataFormatString="{0:D}" SortExpression="order_date" AllowFiltering ="true">
                        <HeaderStyle Width="160px" />



 if (filterPair.First.ToString() == "EqualTo")
            {
                                   string colName = filterPair.Second.ToString();
             //Here i gets problem--->       TextBox tbPattern = (e.Item as GridFilteringItem)[colName].Controls[0] as TextBox;
                    string values = tbPattern.Text;
                    string newFilter = "(([" + filterPair.Second + "] =" + values + "))";
                    DataTable dt = new DataTable();
                    dt = Session["dt"] as DataTable;
                    DataTable dtNew = new DataTable();
                    dtNew.Columns.Add("order_id");
                    dtNew.Columns.Add("order_date");
                    dtNew.Columns.Add("items_selected");
                    dtNew.Columns.Add("total_amount");
                    dtNew.Columns.Add("order_description");
                    dtNew.Columns.Add("username");
                    dtNew.Columns.Add("status");
                    DataRow row;
                    e.Canceled = true;
umar
Top achievements
Rank 1
 asked on 12 Jan 2011
1 answer
99 views
I have used the following code:-

<telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0">
       <telerik:RadPageView ID="RadPageView1" runat="server">
            <telerik:RadGrid ID="rgrd1" runat="server" AutoGenerateColumns="false" 
                      AllowPaging="true" AllowSorting="true"  PageSize="5"  OnSelectedIndexChanged="rgrdAandE_RowSelect"
                       OnPageIndexChanged="rgrd1_PageChange" OnSortCommand="rgrd1_Sort">
                            <MasterTableView>
                                <Columns>
........
                                </Columns>
                            </MasterTableView>
                            <ClientSettings EnableRowHoverStyle="true" EnablePostBackOnRowClick="true">
                                <Selecting AllowRowSelect="true" />
                            </ClientSettings>
                            <PagerStyle Mode="NextPrevNumericAndAdvanced" Position="Bottom" />
              </telerik:RadGrid>

            <telerik:RadGrid ID="rgrd2" runat="server" AutoGenerateColumns="false" 
                      AllowPaging="true" AllowSorting="true"  PageSize="5"  OnSelectedIndexChanged="rgrdAandE_RowSelect"
                       OnPageIndexChanged="rgrd2_PageChange" OnSortCommand="rgrd2_Sort">
                            <MasterTableView>
                                <Columns>
........
                                </Columns>
                            </MasterTableView>
                            <ClientSettings EnableRowHoverStyle="true" EnablePostBackOnRowClick="true">
                                <Selecting AllowRowSelect="true" />
                            </ClientSettings>
                            <PagerStyle Mode="NextPrevNumericAndAdvanced" Position="Bottom" />
              </telerik:RadGrid>
                        
            <telerik:RadGrid ID="rgrd3" runat="server" AutoGenerateColumns="false" 
                      AllowPaging="true" AllowSorting="true"  PageSize="5"  OnSelectedIndexChanged="rgrdAandE_RowSelect"
                       OnPageIndexChanged="rgrd3_PageChange" OnSortCommand="rgrd3_Sort">
                            <MasterTableView>
                                <Columns>
........
                                </Columns>
                            </MasterTableView>
                            <ClientSettings EnableRowHoverStyle="true" EnablePostBackOnRowClick="true">
                                <Selecting AllowRowSelect="true" />
                            </ClientSettings>
                            <PagerStyle Mode="NextPrevNumericAndAdvanced" Position="Bottom" />
              </telerik:RadGrid>

       </telerik:RadPageView>
  </telerik:RadMultiPage>

Code Behind
--------------
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                PopulateLists();
            }
        }


        private void PopulateGPViewists()
        {
               DataSet  data = ..........;
                this.rgrd1.DataSource = ............;
                this.rgrd1.DataBind();
                this.rgrd2.DataSource = ............;
                this.rgrd2.DataBind();
                this.rgrd3.DataSource = ............;
                this.rgrd3.DataBind();
            }
        }




When I change the pagesize to say 3 in the text box and click change the gird that I change the pagesize for just disappears. If I refresh the screen it goes back to the original pagesize of 5


Any clues as to why ?

Thanks
Princy
Top achievements
Rank 2
 answered on 12 Jan 2011
1 answer
167 views
 For Each itemcollection As GridDataItem In gvUserJobMapping.Items


            If itemcollection.OwnerTableView.Name = "gvUserJobMapping" Then

            End If


Next


I want to iterate my gridviewrows and how can i access my first column value field in my grid. Because I want to iterate all the rows and keep those values in the arraylist.
Princy
Top achievements
Rank 2
 answered on 12 Jan 2011
0 answers
137 views
I am having Country,Population,website textboxes and States dropdowns in a webform.
I am saving those details into database.
And I am populating Country as parent node and States as child nodes of radtreeview.
On Nodeclick event of the Country I have to populate the population , Country , Website and the relevant States.

I tried using DataValueFied and DataTextField.
I am getting value in e.Node.Text and I am not getting anything in e. Node.Value.

Can you please provide me some sample example for this scenario?

Thanks
Sreedhar Ambati
sreedhar ambati
Top achievements
Rank 1
 asked on 12 Jan 2011
5 answers
390 views
I have switched from a singe page display to a radtabstrip with dynamically created tabs linked to radpageviews.  Outside of all of this is a radtoolbar with controls that I need to control the currently opened radpageview.

Previously I had something like this in javascript:
function DefaultRadToolBarClick(sender, args)
            {
                var button = args.get_item().get_value();
                document.getElementById("txtAction").value = button;
                switch (button)
                {
                    case "tbrRunQuery" :
                        if ( window.frames(0).document.getElementById("loadingDiv")!= null)
                        {
                            window.frames[0].showLoading(true);
                        }
                        window.frames(0).document.getElementById("txtAction").innerText = button;
                        window.frames(0).document.forms(0).submit() ;
                        window.frames(0).document.getElementById("txtAction").innerText = "" ;
                        break ;
...

What would I replace the window.frames(0).document with to get the currently open radpageview?

Here is the HTML of the pane containing the tabs and pageviews:
<telerik:RadPane ID="DefaultRadPaneCont" runat="server">
<div class="content">
<telerik:RadTabStrip ID="DefaultRadTabStrip" align="left" Width="100%" runat="server" Skin="Office2007" MultiPageID="DefaultRadMultiPage">
<TabTemplate> 
<div class="textWrapper">
<%#DataBinder.Eval(Container, "Text")%> 
<img style="margin-left: 5px; margin-top: 5px" src="Images/delete.gif" alt="delete" onclick="deleteTab('<%# DataBinder.Eval(Container, "Text") %>')" /> 
</div>
</TabTemplate> 
</telerik:RadTabStrip>
<telerik:RadMultiPage ID="DefaultRadMultiPage" runat="server">
</telerik:RadMultiPage>
 </div>
</telerik:RadPane>


Kent
Top achievements
Rank 1
 answered on 12 Jan 2011
2 answers
114 views
my edit form type uses Template.
when i click on Add New Item the template opens in insert mode,

in each item i have a linkbutton templatecolumn called "Edit" when click on it i run the code below to open the template in edit mode.
GridDataItem gdi = (GridDataItem)LinkButton1.Parent.Parent;
RadGrid1.Items[gdi.ItemIndex].Edit = true;
RadGrid1.Rebind();

If the Edit link is clicked while the template is opened in Insert Mode i get error.

Any idea how to avoid this problem?
thanks in advance
sf
Top achievements
Rank 1
 answered on 12 Jan 2011
0 answers
141 views
I am having an issue with the text in the ToolBarButton. It overflow over the boundaries of the ToolBarButton. Please see the link below to download the code.
http://cid-396be546f23b9132.office.live.com/self.aspx/Public/code.zip
Thanks,
Jason


J
Top achievements
Rank 1
 asked on 12 Jan 2011
1 answer
108 views
Hi,

I am using RadGrid within a usercontrol sitting inside a SharePoint webpart. All my other functionalitites are working fine, but I am having issues when once I scroll through couple of pages in the grid and then try to hit filter button I get an error 'null' is null or not an object. Below is my RadGrid within a user control, any help will be greatly appreciated as I don't want to give a buggy UI to my clients:

 

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
  
        <script type="text/javascript">
            function GetSelectedItems() {
                alert($find("<%= grdAllContacts.MasterTableView.ClientID %>").get_selectedItems().length);
            }
        </script>
  
    </telerik:RadCodeBlock>
  
<br />
<!-- content start -->
            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
                <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="grdAllContacts" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>      
                    <telerik:AjaxSetting AjaxControlID="grdAllContacts">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="grdAllContacts" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
            </telerik:RadAjaxManager>
            <asp:Button ID="Button2" CssClass="button" Text="Get Selected Items Count" OnClientClick="GetSelectedItems(); return false;" runat="server" />
<br />
            <telerik:RadGrid ID="grdAllContacts" Width="97%" 
             AllowPaging="True" PageSize="20" runat="server" ShowGroupPanel="false"
             OnNeedDataSource="grdAllContacts_NeedDataSource" GridLines="None"  AutoGenerateColumns="false" AllowMultiRowSelection="true">
                
              <PagerStyle Mode="NextPrev" />                
              <GroupHeaderItemStyle BorderColor="Black" Font-Bold="true"></GroupHeaderItemStyle>
  
                 <MasterTableView Width="100%" GroupLoadMode="Server" TableLayout="Fixed" AllowPaging="True" PageSize="20" AllowFilteringByColumn="true">
                <GroupByExpressions>
                    <telerik:GridGroupByExpression>
                        <SelectFields>
                            <telerik:GridGroupByField FieldAlias="FamilyName" FieldName="FamilyName"></telerik:GridGroupByField>
                        </SelectFields>
                        <GroupByFields>
                            <telerik:GridGroupByField FieldName="FamilyName"></telerik:GridGroupByField>
                        </GroupByFields>
                    </telerik:GridGroupByExpression>
                </GroupByExpressions>
                 <Columns>
                 
                         <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" />
  
                    <telerik:GridBoundColumn SortExpression="FamilyName" HeaderText="Family Name" HeaderButtonType="TextButton"
                        DataField="FamilyName" HeaderStyle-HorizontalAlign="Center" Visible="false" AutoPostBackOnFilter="true">
                         <HeaderStyle Width="15%" />
                    </telerik:GridBoundColumn>
                     
                    <telerik:GridBoundColumn SortExpression="Context" HeaderText="Contact Type" HeaderButtonType="TextButton"
                        DataField="Context">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="OrganisationName" HeaderText="Organisation Name" HeaderButtonType="TextButton"
                        DataField="OrganisationName" >
                        <HeaderStyle Width="32%" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="RoleTitle" HeaderText="Role Title" HeaderButtonType="TextButton"
                        DataField="RoleTitle" >
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="Phone" HeaderText="Phone"
                        HeaderButtonType="TextButton" DataField="Phone" >
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="Mobile" HeaderText="Mobile"
                        HeaderButtonType="TextButton" DataField="Mobile">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="Fax" HeaderText="Fax"  AutoPostBackOnFilter="true" 
                        HeaderButtonType="TextButton" DataField="Fax">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="ID" HeaderText="ID"
                        HeaderButtonType="TextButton" DataField="ID" Visible="false">
                    </telerik:GridBoundColumn>
                </Columns>
                  
            </MasterTableView>
            <ClientSettings AllowGroupExpandCollapse="True" ReorderColumnsOnClient="false" AllowDragToGroup="false" 
                AllowColumnsReorder="false" EnableRowHoverStyle="false">
                <Selecting AllowRowSelect="True" />
                  
            </ClientSettings>
              
            </telerik:RadGrid>
Kunal
Top achievements
Rank 1
 answered on 12 Jan 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?