Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
117 views
Hey there,

I am new with Rad controls.I am using a rad grid in which i want to add,Edit and delete items on button clicks outside the grid.Such that the selected row data comes sliding under the grid on clicking Edit after selecting a row.

Could someone help!!
Thanks
Amit.
Shinu
Top achievements
Rank 2
 answered on 01 Oct 2010
1 answer
107 views
Hello,

I was wondering if there is any sample code for using RAd Filter with RAd Grid in sharepoint.
The Scenario is
I need to create search condition based on three columns of the list, once the condition is set in filter it should show results in the RAD Grid.
That means i have to handle all the stuff from code behind. Rather then using the standard demo shown for RAD Filter with RAD Grid.

Thanks,
Govind.
Iana Tsolova
Telerik team
 answered on 01 Oct 2010
1 answer
307 views
Hi Telerik Team,

I got a problem with datepicker. I used date picker as you used in Advanced edit/insert template (Advanced Edit/Insert template).

Problem occurred when i try to open any activity in edit mode and activity end date is some thing like "10/30/2010 12:00:00 AM" and start date "10/29/2010 12:00:00 AM". In this case it opens edit form with end date "10/29/2010" and start date "10/29/2010". In calender tag i set DayStartTime="00:00:00" DayEndTime="23:59:59".

here is the code:
<ul class="rsTimePickers">
    <li class="rsTimePick">
        <label for='<%= StartDate.ClientID %>_dateInput_text'>
            <%= Owner.Localization.AdvancedFrom +":" %></label><%--
         Leaving a newline here will affect the layout, so we use a comment instead.
        --%><telerik:RadDatePicker runat="server" ID="StartDate" CssClass="rsAdvDatePicker"
            Width="83px" Culture='<%# Owner.Culture %>' Skin="Office2007" MinDate="1900-01-01">
            <DatePopupButton Visible="False" />
            <DateInput ID="DateInput1" runat="server" DateFormat='<%# Owner.AdvancedForm.DateFormat %>'
                EmptyMessageStyle-CssClass="riError" EmptyMessage=" " />
        </telerik:RadDatePicker>
        <%--
         
        --%><telerik:RadTimePicker runat="server" Width="70px" ID="StartTime" CssClass="rsAdvTimePicker"
            Culture='<%# Owner.Culture %>' Skin="Office2007" On>
            <DateInput ID="DateInput2" runat="server" EmptyMessageStyle-CssClass="riError" EmptyMessage=" " />
            <TimePopupButton Visible="false" />
            <TimeView ID="TimeView1" runat="server" Columns="4" ShowHeader="false" Interval="00:30" />
        </telerik:RadTimePicker>
    </li>
    <li class="rsTimePick">
        <label for='<%= EndDate.ClientID %>_dateInput_text'>
            <%= Owner.Localization.AdvancedTo +":"%></label><%--
         
        --%><telerik:RadDatePicker runat="server" ID="EndDate" CssClass="rsAdvDatePicker"
            Width="83px" Culture='<%# Owner.Culture %>' MinDate="1900-01-01" Skin="Office2007">
            <DatePopupButton Visible="False" />
            <DateInput ID="DateInput3" runat="server" DateFormat='<%# Owner.AdvancedForm.DateFormat %>'
                EmptyMessageStyle-CssClass="riError" EmptyMessage=" " />
        </telerik:RadDatePicker>
        <%--
         
        --%><telerik:RadTimePicker runat="server" Width="70px" ID="EndTime" CssClass="rsAdvTimePicker"
            Culture='<%# Owner.Culture %>' Skin="Office2007" On>
            <DateInput ID="DateInput4" runat="server" EmptyMessageStyle-CssClass="riError" EmptyMessage=" " />
            <TimePopupButton Visible="false" />
            <TimeView ID="TimeView2" runat="server" Columns="4" ShowHeader="false" Interval="00:30" />
        </telerik:RadTimePicker>
    </li>
    <li class="rsAllDayWrapper" style="display: none;">
        <asp:CheckBox runat="server" ID="AllDayEvent" CssClass="rsAdvChkWrap" Checked="false" />
    </li>
</ul>


Please help me to resolve this issue.

Regards
Manmeet Singh
Dimo
Telerik team
 answered on 01 Oct 2010
4 answers
85 views
Dear Telerik-Team,

in my scenario, I show an aspx page inside a RadWindow in order to update an item of a radgrid. I got the code from your demo located at: http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx?product=window .

Everything works fine for me but I want to ensure that my aspx-form is only accessible if it is inside the Window. In the current scenario a user could have found out that the page "behind" the window he is shown when he updates an item inside the grid is "myupdateform.aspx" and has a QueryString passed in order to load specific data.

Can I avoid that and ensure that the aspx-page cannot be called directly?

Can I somehow get a reference to the window that contains my form "myupdateform.aspx" and see if it is null (the user has typed the URL directly into the browser without clicking on an item inside the grid) or not null (he has called the window by double clicking an item in the grid?

Do you have an approach for me?

Kind regards,
Marco
Marco Beyer
Top achievements
Rank 1
 answered on 01 Oct 2010
7 answers
116 views
Hi all,

Is it possible to create a bar chart that has groups by a group of series but also stacks with another. For example a series for a breakdown of types of feedback but then a stacked bar series for how many of that type are over due and how many arent.

regards,

Ash
Velin
Telerik team
 answered on 01 Oct 2010
1 answer
45 views
Hi ppl!

I'm driving crazy, I have a Grid, that when in edit mode, i need to get one cells data [Id for the row in the db], for making the RadListBox1_ItemDataBound, that is another cell in the table,where i make a list of items for another db table.
So, why I need that id? because I need to check which items from the RadList are relevant for that specific row.

I hope you can help me... I been hours fighting with this, and I can't find the way!

Please help me!

Greetings
Princy
Top achievements
Rank 2
 answered on 01 Oct 2010
1 answer
194 views
I have a FormTemplate set up for when the user clicks the edit icon in the radgrid.  How do I set the default button?  The use case is, user clicks the edit button, edits a field, tabs, edits a 2nd field then hits the Enter or Return key. 

asp:Panel controls have a DefaultButton property which work well for this.  Is there some way to do this?

Thanks in advance.
Shinu
Top achievements
Rank 2
 answered on 01 Oct 2010
4 answers
109 views
I am using a NestedViewTemplate in a grid that has a custom context menu. Right-clicking anywhere within the NestedViewTemplate does not trigger the context menu of the main grid as right-clicking on a row does. Is it possible to do this?
Jason Rosensweig
Top achievements
Rank 1
 answered on 01 Oct 2010
7 answers
852 views
Hi,
I'm using RadNumericTextBox and I set DataType = System.Decimal.
But in code the value is double from this TextBox.
Is it normal?
maina
Top achievements
Rank 1
 answered on 30 Sep 2010
2 answers
141 views
I have a radgird on the screen andt uses onneeddata to fill the grid.  The filtering is done by dropdowns on the screen.
Here is my grid.
<rad:radgrid id="gridFilings" runat="server"
                allowsorting="True" autogeneratecolumns="False"
                enableajax="True" enableajaxloadingtemplate="True" gridlines="None" loadingtemplatetransparency="50"
                showstatusbar="True" skin="Windows"
                width="98%" ShowGroupPanel="True" AllowPaging="false" OnItemDataBound="gridFilings_ItemDataBound"
                OnNeedDataSource ="gridFilings_NeedDataSource"
                
                  
                <ClientSettings AllowDragToGroup="True">
                    <Selecting AllowRowSelect="True" />
                </ClientSettings>
                <MasterTableView AllowCustomPaging="True" DataKeyNames="FileID"
                     AutoGenerateColumns="False" DataSourcePersistenceMode="NoPersistence" AlternatingItemStyle-BackColor="ControlLight">
                    <Columns>  
                        <rad:GridBoundColumn DataField="FileID"
                        UniqueName="FileID" Groupable="False" AllowSorting="True" Visible="True" HeaderText="Job #" HeaderStyle-CssClass="headerLeft" DataType="System.String">
                        </rad:GridBoundColumn>              
                         <rad:GridTemplateColumn DataField="ClientName" HeaderText="Client Name" HeaderStyle-CssClass="headerLeft"
                         SortExpression="ClientName" UniqueName="ClientName" GroupByExpression="ClientName Group By ClientName">
                         <itemTemplate>
                             <%# Eval("ClientName")%>
                         </itemTemplate>
                         </rad:GridTemplateColumn>
                         <rad:GridTemplateColumn DataField="GroupName" HeaderText="Group" HeaderStyle-CssClass="headerLeft"
                         SortExpression="GroupName" UniqueName="GroupName" GroupByExpression="GroupName Group By GroupName">
                         <ItemTemplate>
                             <%# Eval("GroupName")%>  
                         </ItemTemplate>
                         </rad:GridTemplateColumn>                                                                          
                         <rad:GridTemplateColumn HeaderText="Operator" HeaderStyle-CssClass="headerLeft"
                         SortExpression="AssignedTo" UniqueName="OperatorTemplate" GroupByExpression="AssignedTo Group By AssignedTo">
                         <ItemTemplate>
                             <asp:DropDownList ID="OperatorDropDown" runat="server" EnableViewState="false"></asp:DropDownList>                     
                         </ItemTemplate>
                         </rad:GridTemplateColumn>                                                                          
                         <rad:GridTemplateColumn DataField="DateIn" HeaderText="Date In" HeaderStyle-CssClass="headerLeft"
                         SortExpression="DateIn" UniqueName="DateIn" GroupByExpression="DateIn Group By DateIn" >
                         <ItemTemplate>
                             <%# String.Format("{0:MM/dd/yyyy}", Eval("DateIn"))%>  
                         </ItemTemplate>
                         </rad:GridTemplateColumn>
                         <rad:GridTemplateColumn DataField="DueDate" 
                         HeaderText="Due Date" HeaderStyle-CssClass="headerLeft" SortExpression="DueDate" UniqueName="DueDate" GroupByExpression="DueDate Group By DueDate">
                         <ItemTemplate>
                             <%# String.Format("{0:MM/dd/yyyy}", Eval("DueDate"))%>
                         </ItemTemplate>
                         </rad:GridTemplateColumn>
                         <rad:GridTemplateColumn DataField="FileTypeName" HeaderText="Form Type" HeaderStyle-CssClass="headerLeft"
                         SortExpression="FileTypeName" UniqueName="FileTypeName" Groupable="False">
                             <ItemTemplate>
                             <%# Eval("FileTypeName")%>
                             </ItemTemplate>
                         </rad:GridTemplateColumn>
                         <rad:GridTemplateColumn DataField="ConvertedPageCount" Groupable="false" HeaderText="Converted<br>Page Count" HeaderStyle-CssClass="headerRight" ItemStyle-HorizontalAlign="Right" 
                          UniqueName="ConvertedPageCount">
                             <ItemTemplate>
                                 <%# Eval("ConvertedPageCount")%>
                             </ItemTemplate>
                         </rad:GridTemplateColumn>
                         <rad:GridTemplateColumn DataField="ChangedPageCount" Groupable="false" HeaderText="Changed<br>Page Count" HeaderStyle-CssClass="headerRight" ItemStyle-HorizontalAlign="Right" 
                          UniqueName="ChangedPageCount">
                             <ItemTemplate>
                                 <%# Eval("ChangedPageCount")%>
                             </ItemTemplate>
                         </rad:GridTemplateColumn>                         
                         <rad:GridTemplateColumn DataField="ConversionType" Groupable="false" HeaderText="Conversion" ItemStyle-HorizontalAlign="Center" 
                          UniqueName="ConversionType">
                             <ItemTemplate>
                                 <%# Eval("ConversionType")%>
                             </ItemTemplate>
                         </rad:GridTemplateColumn
                        <rad:GridBoundColumn DataField="FileStatusTypeID" 
                        UniqueName="FileStatusTypeID" Groupable="False" AllowFiltering="False" Visible="False">                    
                        </rad:GridBoundColumn>
                        <rad:GridBoundColumn DataField="AssignedTo"
                        UniqueName="AssignedTo" Groupable="False" AllowFiltering="False" Visible="False">                    
                        </rad:GridBoundColumn>
                           
                        <rad:GridTemplateColumn HeaderText="Status" HeaderStyle-CssClass="headerLeft" AllowFiltering="False" SortExpression="FileStatusTypeID" UniqueName="FileStatusTypeIDTemplate" GroupByExpression="FileStatusTypeID Group By FileStatusTypeID">
                        <ItemTemplate>
                        <asp:DropDownList ID="StatusTypeID" runat="server" EnableViewState="false" DataTextField="FileStatusTypeName" DataValueField="FileStatusTypeID"></asp:DropDownList>                
                        </ItemTemplate>
                        </rad:GridTemplateColumn>                                                 
                         <rad:GridTemplateColumn AllowFiltering="False" UniqueName="ViewFiling" Groupable="false">
                           <ItemTemplate>
                                <a href="javascript:openDialog('ViewFiling.aspx?fileid=<%# Eval("FileID")%>', 800, 600, 'file', 'scrollbars=yes,resizable=yes');">
                                    <img alt="View Filing" border="0" src="RadControls/Grid/Skins/Windows/View.gif"
                                        title="View Filing" /></a>
                           </ItemTemplate>
                         </rad:GridTemplateColumn>                                                
                         <rad:GridTemplateColumn AllowFiltering="False" UniqueName="EditFiling" Groupable="false">
                           <ItemTemplate>
                                <a href="EditFiling.aspx?fileid=<%# Eval("FileID")%>">
                                    <img alt="Edit Filing" border="0" src="RadControls/Grid/Skins/Windows/Edit.gif"
                                        title="Edit Filing" /></a>
                           </ItemTemplate>
                         </rad:GridTemplateColumn>
                        <rad:GridTemplateColumn AllowFiltering="False" UniqueName="DocumentLink" Groupable="false">
                            <ItemTemplate>
                                <a href="javascript:openDialog('FileManager.aspx?fileid=<%# Eval("FileID")%>', 800, 600, 'file', 'scrollbars=yes,resizable=yes');">
                                    <img alt="View Files" border="0" src="RadControls/Grid/Skins/Windows/folder.gif"
                                        title="View Files" /></a>
                            </ItemTemplate>
                            <HeaderStyle Width="20px" />
                        </rad:GridTemplateColumn
                        <rad:GridTemplateColumn DataField="GroupID"  
                         UniqueName="GroupID" Display="false">
                         <ItemTemplate>
                             <%# Eval("GroupID")%>
                         </ItemTemplate>
                         </rad:GridTemplateColumn>                        
                    </Columns>
                    <ExpandCollapseColumn Resizable="False" Visible="False">
                        <HeaderStyle Width="20px" />
                    </ExpandCollapseColumn>
                    <RowIndicatorColumn Visible="False">
                        <HeaderStyle Width="20px" />
                    </RowIndicatorColumn>                   
                </MasterTableView>    
            </rad:radgrid>

and this is the code behind
protected void gridFilings_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
        {
            SqlDataSource1.SelectCommand= "SELECT [FileID], [ClientID], [ClientName], [DateIn], [DueDate], [FileTypeName], [FileLocation], [FileStatusTypeName], [FileStatusTypeID] , [GroupID], [GroupName], [PageCount], [ConvertedPageCount], [ChangedPageCount], [ConversionType], IsNull([AssignedTo], '') as 'AssignedTo' FROM [FileDetailView] WHERE  [FileStatusTypeID] <= 90 ";
  
            if (Page.User.IsInRole("GROUP"))
                SqlDataSource1.SelectCommand += " and [GroupID] = " + Session["GroupID"].ToString();
            else if (Page.User.IsInRole("CLIENT"))
                SqlDataSource1.SelectCommand += " and [ClientID] = " + Session["ClientID"].ToString() + " and FileStatusTypeID = 0";
              
            if (ClientName.SelectedValue.Length > 0)
                SqlDataSource1.SelectCommand += " and ClientID = " + ClientName.SelectedValue;
  
            if (ClientGroup.SelectedValue.Length > 0)
                SqlDataSource1.SelectCommand +=  " and GroupID = " + ClientGroup.SelectedValue;               
  
            if (StartDueDate.Text.Length > 0)
            {
                if (EndDueDate.Text.Length > 0)
                    SqlDataSource1.SelectCommand +=  " and (DueDate >= '" + StartDueDate.Text + "' and DueDate <= '" + EndDueDate.Text + "')";                    
                else
                    SqlDataSource1.SelectCommand +=  " and DueDate = '" + StartDueDate.Text + "'";                    
            }
  
            if (StartDateIn.Text.Length > 0)
            {
                if (EndDateIn.Text.Length > 0)
                    SqlDataSource1.SelectCommand += " and (DateIn >= '" + StartDateIn.Text + "' and DateIn <= '" + EndDateIn.Text + "')";                    
                else
                    SqlDataSource1.SelectCommand +=  " and DateIn = '" + StartDateIn.Text + "'";                    
            }
  
            SqlDataSource1.SelectCommand += " Order by FileStatusTypeID";
              
            gridFilings.DataSource = SqlDataSource1;

The issue I am having is when the user click the header to sort you see the icon popup like it is working but it does not sort the grid.  I have put a stop in the NeedDataSource and when the grid sorts it runs throught this logic, so I am assumin git is lossing the sorting and just reloading the grid.  Is there a way I can get the sort informatioan and just add an orderby in the sql?
Eric Klein
Top achievements
Rank 1
 answered on 30 Sep 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?