Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
88 views
I have a Grid with a group by; is it possible to show the group header without showing the column name?

Here's what I mean; I have a column called CATEGORY. When I use the group by, I see;

Category: Some category
   [datacol 1,...datacol n]
   [datacol 1,...datacol n]
Category: Some other category
   [datacol 1,...datacol n]

What I want to do is show the column value without the columnname, i.e. "Some Category" by itself without the leading text. I tried setting the headertext to nothing, but the colon still remains.

Is this possible? Thanks in advance.
Shinu
Top achievements
Rank 2
 answered on 02 Nov 2009
1 answer
282 views
Hi;
I have a problem with RadAjaxManager and RadUpload.
I need to add an radiobutton check to a form that developed uses telerik functions such as RadTabStrip, RadMultiPage and RadUpload. I want to use RadAjaxManager.UpDatedControls instead of autopostback of radiobuttons to make a textbox invisible before clicking "upload" button and upload a excel or csv file.
But by the time AjaxUpdatedControls works, RadUpload stops working and I can not upload my file to the system. When I disabled the AjaxUpdatedControls and use radiobutton autopostback I can load the file.
Here is a part of my code. Please help and show my mistakes.

<%@ Register Assembly="System.Web.Extensions" Namespace="System.Web.UI" TagPrefix="asp" %> 
<%@ Register Assembly="odc.Web" Namespace="odc.Web.Controls" TagPrefix="odc" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
 
<asp:Content ID="Content1" ContentPlaceHolderID="phMain" runat="Server">  
      
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="excelRadioButton">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="pnlDosyaBilgileri" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="csvRadioButton">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="pnlDosyaBilgileri" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
<div runat="server" id="divExcelLoad">  
                                <asp:Panel ID="pnlDosyaBilgileri" runat="server" SkinID="webPanel" GroupingText="Dosya Bilgileri">  
                                    <table border="0" cellpadding="3" cellspacing="0" width="100%">  
                                        <tr> 
                                            <td class="strB">  
                                                <asp:Literal ID="Literal1" runat="server" Text="Please choose the file type:"/>  
                                            </td> 
                                            <td>                                              
                                                <asp:RadioButton ID="excelRadioButton" runat="server" GroupName="excelCsvRadio"   
                                                    SkinID="webRadio" Text="Excel Dosyası" Checked="true" AutoPostBack="True" oncheckedchanged="excelRadioButton_CheckedChanged"/>  
                                                <asp:RadioButton ID="csvRadioButton" runat="server" GroupName="excelCsvRadio"   
                                                    SkinID="webRadio" Text="Csv Dosyası" AutoPostBack="True" oncheckedchanged="csvRadioButton_CheckedChanged"   
                                                     /> 
                                            </td> 
                                        </tr> 
                                        <tr> 
                                            <td class="strB">  
                                                <asp:Literal ID="lblSelectExcel" runat="server" Text="Dosyayı Seçiniz:"/>  
                                            </td> 
                                            <td> 
                                                <telerik:RadUpload ID="RadUpload1" Skin="Vista" runat="server" OverwriteExistingFiles="true" InitialFileInputsCount="1" MaxFileInputsCount="1" TargetFolder="~/Temp" ControlObjectsVisibility="None" /> 
                                            </td> 
                                            <td> 
                                            </td> 
                                        </tr> 
                                        <tr> 
                                            <td colspan="3" align="center">  
                                                <telerik:RadProgressManager ID="Radprogressmanager1" runat="server" /> 
                                                <telerik:RadProgressArea ID="progressArea1" runat="server" ProgressIndicators="FilesCountBar,FilesCountPercent,TransferSpeed" DisplayCancelButton="true" /> 
                                            </td> 
                                        </tr> 
 
                                        <tr> 
                                            <td class="strB">  
                                                <asp:Literal ID="lblWorkSheetName" runat="server" Text="Worksheet Name:" /> 
                                              
                                            </td> 
                                            <td> 
                                                <asp:TextBox ID="txtSheetName" SkinID="webTextbox" runat="server" Text="Sheet1" ></asp:TextBox>&nbsp;<asp:RequiredFieldValidator ID="rfvSheetName" runat="server" ErrorMessage="Please enter the worksheet name." ControlToValidate="txtSheetName"><img alt="" src="../Images/dikkat.gif"/></asp:RequiredFieldValidator> 
                                            </td> 
                                            <td valign="bottom" align="left">  
                                                <asp:Button ID="btnPreviousLoad" OnClick="Geri" runat="server" Text="Back" SkinID="webButtonM" /> 
                                                <asp:Button ID="btnLoadExcel" runat="server" SkinID="webButtonM" Text="Upload" OnClick="btnLoadExcel_Click" /> 
                                            </td> 
                                        </tr> 
                                    </table> 
                                </asp:Panel> 
                            </div> 
Genady Sergeev
Telerik team
 answered on 02 Nov 2009
1 answer
123 views
Hi, my grid has a CommandName="DeleteSelected".
On RadGrid1_ItemCommand event
    If (e.CommandName = "DeleteSelected") Then   
                If Not (RadGrid1.SelectedIndexes.Count = 0) Then 
 
                    Dim myItem As GridDataItem 
 
                    For Each myItem In RadGrid1.SelectedItems                     
                        e.Item.OwnerTableView.PerformDelete(myItem, True) 
                    Next 
 
                    e.Item.OwnerTableView.Rebind() 
 
                End If 
 
            End If

it works fine, delete the selected rows.
Now my goal is to hide/show things depending on how may row the grid has (if 0.. else...)
I use ths: RadGrid1.MasterTableView.Items.Count
but that one returns the number of rows before the delete task.
I tried to put it on RadGrid1_ItemDeleted event but still not getting the new number of rows.

What event? What way?

Thanks



Shinu
Top achievements
Rank 2
 answered on 02 Nov 2009
2 answers
131 views
Hello, i got a problem make Upload module work.

"RadUpload Ajax Callback Error: source url was not found"

i followed that link to put what's normally needed in web.config by RadUploadProgress but still no changes :

http://www.telerik.com/help/aspnet-ajax/upload-configuration.html

Here's my web.config system.webServer section (using local Visual Studio webserver, which must be IIS7)





<system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <modules>
      <remove name="ScriptModule" />
      <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <!-- *******  Register the RadUploadModule for IIS 7  ****** -->
      <add name="RadUploadModule" preCondition="integratedMode" type="Telerik.Web.UI.RadUploadHttpModule" />
    </modules>
    <handlers>
      <remove name="WebServiceHandlerFactory-Integrated" />
      <remove name="ScriptHandlerFactory" />
      <remove name="ScriptHandlerFactoryAppServices" />
      <remove name="ScriptResource" />
      <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <!-- *******  Register the RadUploadProgressHandler for IIS 7  ****** -->
      <add name="Telerik_RadUploadProgressHandler_ashx" verb="*" preCondition="integratedMode" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" />
    </handlers>
  </system.webServer>

Also, cause i'm using forms, i have put a location section with this :

<location path="Telerik.RadUploadProgressHandler.ashx">
 
<system.web>
      
<authorization>
         
<allow users="*"/>
      
</authorization >
 
</system.web>
</
location>

and i changed my C:\Windows\System32\inetsrv\config\applicationHost.config by switching to allow that line :

<section name="requestFiltering" overrideModeDefault="Allow" />

still getting error, Thanks for help


Genady Sergeev
Telerik team
 answered on 02 Nov 2009
6 answers
239 views
I have a radPanelBar called rpbAgenda.

I have a user control located within this panel bar called abConsent. This user control has several properties that I have exposed such as idCouncilMtgDate, Title, etc that I can set programmatically.

Below is my HTML code for the user control:

<telerik:RadPanelItem value="Consent" Text="Consent Agenda - Action Items" Font-Bold="True" BorderStyle="None"
                <Items> 
                    <telerik:RadPanelItem> 
                        <ItemTemplate> 
                            <uc1:ab ID="abConsent1" runat="server" Visible="true" /> 
                        </ItemTemplate> 
                    </telerik:RadPanelItem> 
                </Items> 
            </telerik:RadPanelItem> 


In a normal occurrence, I can set the properties of this user control by the following:
abConsent1.idCouncilMeetingDate = rcmbCouncilMtgDate.SelectedValue 
        abConsent1.isConsentAgenda = "Yes" 
        abConsent1.isOrdinance = "No" 
        abConsent1.isApproved = "Yes" 
        abConsent1.idCommittee = "%" 
        abConsent1.title = "<b>Other Approvals</b>" 

However, since this user control is nested within a panelbar, I am unable to access it. I've tried the following but I was unsuccessful:

Dim abconsent1 As ab = rpbAgenda.FindControl("abconsent1"

How can I access the user control and its corresponding exposed properties? Thanks. I've taken a look at the samples but seem to have run into a dead end no matter what.


PJ Rodriguez
Top achievements
Rank 1
 answered on 02 Nov 2009
1 answer
214 views
Hi,

I have a RadScheduler on a page, together in a splitter with a few other controls. When the user clicks on a time slot in the scheduler, a pop-up window in another web application is opened. This is accomplished using JS on the scheduler. When the user exits the other web application and closes that window, I want the scheduler to reload (i.e. re-read the data from the datasource).

I can only accomplish this by JavaScript in the other web application, but how can I reload the scheduler using JS?

Best regards
Allan Varcoe
Vesko
Top achievements
Rank 2
 answered on 02 Nov 2009
1 answer
119 views

Hi All,

 I need to use showInsertItem property that switches the grid in insert mode and displays the insertion form when i click "Add New  Record" on RadGrid.
 I Created RadGrid Programmatically and assigned grid.ClientSettings.ClientEvents.OnCommand = "addnewrecord";
 Then i register RegisterClientScriptBlock for addnewrecord on Page_Prerender.
 This is my code:

    RadGrid grid;

    protected void Page_Load(object sender, EventArgs e)
    {
        DataTable gridDataTable = new DataTable();
      

        grid = new RadGrid();
        grid.ID = "grid1";
       
        grid.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top;
        grid.MasterTableView.AllowAutomaticInserts = true;
        grid.MasterTableView.InsertItemDisplay = GridInsertItemDisplay.Bottom;

        GridBoundColumn col1 = new GridBoundColumn();
        col1.HeaderText = "col1";
        col1.DataField = "col1";
        GridBoundColumn col2 = new GridBoundColumn();
        col2.HeaderText = "col2";
        col2.DataField = "col2";
        grid.Columns.Add(col1);
        grid.Columns.Add(col2);

        grid.ClientSettings.ClientEvents.OnCommand = "addnewrecord";
       
        grid.DataSource = gridDataTable;
        grid.DataBind();
        Page.Form.Controls.Add(grid);
    }

    protected void Page_PreRender(object sender, EventArgs e)
    {
        string clientd = grid.ClientID;
        string gridScript = "function addnewrecord(sender, args){var masterTable = $find('" + clientd + "').get_masterTableView();masterTable.showInsertItem();}";
        ScriptManager.RegisterClientScriptBlock(this.Page, typeof(Page), "mykey", gridScript, true);
    }

Now,When i click "Add New Record" i get this error:Out of stack space.

Any Help is really appreciated.

Regards,
Ahmad

 

Princy
Top achievements
Rank 2
 answered on 02 Nov 2009
4 answers
290 views
I have a rad grid that I have set up filtering like this demo:
http://www.telerik.com/demos/aspnet/prometheus/Grid/Examples/Programming/FilteringTemplateColumns/DefaultCS.aspx,
except all fields are filtered with a rad combo box.  Now I need a way to clear all filtering.  I have been able to clear the grid, and reset all of the lists in the rad combo boxes.  What I have not been able to do is clear the selected item from the combo, so that when I clear the filtering all of the combos have a blank selection.

Any ideas?

Thanks,
Jim
Shinu
Top achievements
Rank 2
 answered on 02 Nov 2009
1 answer
98 views
I have a radgrid whose purpose is to allow users to page through a potentially large dataset and export it to excel or csv.  At first I was not able to get exporting to work while paging was enabled, but eventually I solved that by binding with the NeedDataSource event.  Now I have a weirder problem I can't figure out - the grid does not bind correctly the first time it is loaded, but it does bind correctly the second time.  And the export button works fine whether the grid renders or not.  Here's the code for the button which shows the grid, the NeedDataSource method, and the declaration of the grid itself:

protected void btnView_Click(object sender, EventArgs e) 
        { 
            grdReport.Visible = true
            lblExport.Visible = true
            rcbExportFormat.Visible = true
            btnExport.Visible = true
        } 

protected void grdReport_NeedDataSource(object sender, GridNeedDataSourceEventArgs e) 
        { 
            SqlCommand cmd = new SqlCommand(filterGrid(), new SqlConnection(Session["Connection"].ToString())); 
            DataTable dt = new DataTable(); 
            new SqlDataAdapter(cmd).Fill(dt); 
            cmd.Dispose(); 
            grdReport.DataSource = dt
        } 

<telerik:RadGrid ID='grdReport' runat='server' OnNeedDataSource='grdReport_NeedDataSource' AutoGenerateColumns='true' Skin='Simple' AllowPaging='true' /> 

There aren't any UpdatePanels or anything involved, the page is really pretty simple.  And it does all work great the second time the user clicks btnView.  But the first time that button is clicked, the grid just renders as a horizontal grey line.


Shinu
Top achievements
Rank 2
 answered on 02 Nov 2009
1 answer
103 views
Hi,

i have used rad grid with filtering in our project.
This implementation works perfectly except in below mentioned scenerio:
We want filters to implement like queries on grid.
So we have set query as :
([<column value>] like '% <Filter value> %')

But this scenerio does not work when single quote comes in filter value.
It seems we might need to compare encoded values, but i am not to sure how to achieve this as syntax is sql like and i relaly doubt that wheather HtmlEncoding will work in this scenerio?

Princy
Top achievements
Rank 2
 answered on 02 Nov 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?