Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
188 views
Hi,
I have been trying to extend the Telerik GridBoundColumn. Everything seems to be OK when it is used in the statdarnd RadGrid without Filtering.
When I turn on the AllowFilteringByColumn property of the RadGrid, I get the following error message:
 Multiple controls with the same ID 'FilterTextBox_Date' were found. FindControl requires that controls have unique IDs. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
 
Exception Details: System.Web.HttpException: Multiple controls with the same ID 'FilterTextBox_Date' were found. FindControl requires that controls have unique IDs. 
 
Source Error: 
 
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 
 
Stack Trace: 
 
[HttpException (0x80004005): Multiple controls with the same ID 'FilterTextBox_Date' were found. FindControl requires that controls have unique IDs.] 
   System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +273 
   System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +320 
   System.Web.UI.Control.EnsureNamedControlsTable() +61 
   System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +222 
   System.Web.UI.Control.FindControl(String id) +12 
   Telerik.Web.UI.GridColumn.PrepareCell(TableCell cell, GridItem item) +1238 
   Telerik.Web.UI.GridItemDecorator.DecorateItem(GridTableView owner, GridColumn[] columnArray) +364 
   Telerik.Web.UI.GridFilterItemDecorator.DecorateItem(GridTableView owner, GridColumn[] columnArray) +112 
   Telerik.Web.UI.GridItem.PrepareItemStyle() +259 
   Telerik.Web.UI.GridMultiRowItem.PrepareItemStyle() +109 
   Telerik.Web.UI.RadGrid.PrepareRows(GridTableView view) +132 
   Telerik.Web.UI.RadGrid.Render(HtmlTextWriter writer) +92 
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27 
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99 
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25 
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134 
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19 
   System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +163 
   System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32 
   System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +51 
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27 
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99 
   System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +40 
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134 
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19 
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29 
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27 
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99 
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25 
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1266 
 


And these are my code:

New GridBoundColumn
  public class MyGridBoundColumn : GridBoundColumn 
    { 
 
    } 




Aspx:
    <telerik:DDSGrid ID="uxGrid" runat="server" GridLines="None" Width="100%" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" AllowFilteringByColumn="true" 
            OnNeedDataSource="uxGrid_NeedDataSource" EnableEmbeddedSkins="false"
            <MasterTableView > 
                <Columns> 
                    <me:MyGridBoundColumn HeaderStyle-HorizontalAlign="Center" UniqueName="Row" HeaderText="Row" DataField="Row"/> 
                </Columns> 
                 
            </MasterTableView> 
        </telerik:DDSGrid> 

Codebehide:
protected void uxGrid_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e) 
 
    DataTable tb = new DataTable("tb"); 
    DataColumn col; 
    DataRow row; 
 
    col = new DataColumn("Row"); 
    tb.Columns.Add(col); 
 
 
    for (int i = 1; i <= 1; i++) 
    { 
        row = tb.NewRow(); 
        row["Row"] = "Row " + i; 
        tb.Rows.Add(row); 
    } 
    ((RadGrid)source).DataSource = tb; 

Is there anyone can help me to solve this problems? Thanks




$_$
Top achievements
Rank 1
 answered on 27 Jan 2014
1 answer
63 views
Hai All,
     I used  RadTabStrip with RadMultiPage control.  And also i am having popup in each screen.
   The case is ,
        1. i am going to open a popup form a page(which is from "SECOND" tab)
        2. after close that popup , the parent page of that popup should be refresh and the second tab should be open.
   but what happen is, the first tab is open always after any popup closed.

  
Shinu
Top achievements
Rank 2
 answered on 27 Jan 2014
1 answer
43 views
hi
i have a web application. in site master i have a rad window. i open in java script and i set negative url in default i have some rad button when i click them and open the rad window. rad window broken and don't show in right mode why

please help me
Shinu
Top achievements
Rank 2
 answered on 27 Jan 2014
4 answers
686 views
Hi,
I am Using the Radtextbox to save a string values. When it contains a "<" continued by String it generate a error on postback as follows

JavaScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500

If i replace the"<" with space as follows "< " it works fine, but i should not use this technique. i need a working solution for this issue.






Thanks
Princy
Top achievements
Rank 2
 answered on 27 Jan 2014
3 answers
120 views
I am starting off with a RadTextBox disabled and when I check a checkbox it enables the RadTextBox however it does not repaint/redraw and still looks disabled.


How would one go about fixing that?

I'm using jquery to do the enable/disable
    $('#CheckBox1').change(function () {
        if (this.checked) {
            $('#txtInput').prop('disabled', false);
        } else {
            $('#txtInput').prop('disabled', true);
        }
    });
Shinu
Top achievements
Rank 2
 answered on 27 Jan 2014
4 answers
87 views
I am trying to combine skel.js (http://skeljs.org) and the panels plugin with telerik controls - I cannot seem to get the two on the same page in IE without a java script error occurring. If I isolate each of the items on the page they both will work without one another, but as soon as I add a RadScriptManager to the page with the panels it causes the panels to not function. The results in Chrome, Firefox and Safari all seem to work with no problems, the problem only arises with IE 10.

My Index.aspx

<!DOCTYPE html>
<head>
    <title></title>
    <script src="/scripts/js/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script src="/scripts/js/skel.min.js" type="text/javascript"></script>
    <script src="/scripts/js/skel-panels.min.js" type="text/javascript"></script>
    <script src="/scripts/js/skel-init.js" type="text/javascript"></script>
 
</head>
<body>
<telerik:RadScriptManager ID="ScriptManager1" runat="server">
    <Groups>
        <telerik:ScriptReferenceGroup>
            <Scripts>
            </Scripts>
        </telerik:ScriptReferenceGroup>
    </Groups>
</telerik:RadScriptManager>
    <div id="leftPanel" style="background-color:grey">
        <div>Left Panel</div>
    </div>
    <div id="rightPanel" style="background-color:grey">
        <div>Right Panel</div>
                 
 
    </div>
</body>
</html>

The following is my skel-init.js
var settings = {
 
    skelJS: {
        prefix: '/styles/css/style',
        resetCSS: true,
        normalizeCSS: true,
        boxModel: 'border',
        grid: {
            gutters: 40
        },
        breakpoints: {
            'widest': { range: '1680-', hasStyleSheet: false, containers: 1400 },
            'wide': { range: '-1680', containers: 1200 },
            'normal': { range: '-1280', containers: 'fluid', grid: { gutters: 36 }, viewportWidth: 1140 },
            'narrow': { range: '-960', containers: 'fluid', grid: { gutters: 32 } },
            'narrower': { range: '-840', containers: 'fluid', grid: { gutters: 32, collapse: true } },
            'mobile': { range: '-640', containers: 'fluid', grid: { gutters: 32, collapse: true } }
        }
    },
 
    skelJSPlugins: {
        panels: {
            panels: {
                leftPanel: {
                    position: 'left',
                    size: 250,
                    style: 'push',
                    swipeToClose: 'true'
                },
                rightPanel: {
                    position: 'right',
                    size: 250,
                    style: 'push',
                    swipeToClose: 'true'
                }
            },
 
            overlays: {
                leftButton: {
                    position: 'top-left',
                    width: 100,
                    height: 50,
                    html: '<div class="toggle" data-action="togglePanel" data-args="leftPanel"></div>'
                },
 
                rightButton: {
                    position: 'top-right',
                    width: 100,
                    height: 50,
                    html: '<div class="toggle" data-action="togglePanel" data-args="rightPanel"></div>'
                }
            }
        }
    }
}
skel.init(settings.skelJS, settings.skelJSPlugins);
My style.css
    div.toggle
    {
        position: absolute;
        left: 0;
        top: 10px;
        width: 100%;
        height: 100%;
    }
         
    div.toggle:before
    {
        content:"";
        display: block;
        width: 60px;
        height: 30px;
        position: absolute;
        left: 50%;
        margin-left: -30px;
        background: center center no-repeat, rgba(25, 25, 25, .90);
        border-top: 0;
        border-radius: 0.35em 0.35em 0.35em 0.35em;
    }
 
        #leftPanel
    {
        position: relative;
        background: #1f1920;
        box-shadow: inset 0px -2px 5px 0px rgba(0,0,0,0.25);
        font-size: .8em;
        color:white;
         
 
    }
.photo {
    width: 115px;
    height: 150px;
    background-color: white;
    display: inline-block;
    margin: 5px 5px 5px 5px;
    border-radius: 5px;
    border: 1px solid black;
}
.info{
    width: 115px;
    height:150px;
    display: inline-block;
    font-size: 1.15em;
    margin: 5px 5px 5px 5px;
    border: 1px solid grey;
    float: right;
    border-radius: 5px;
    background-color: rgba(255, 255, 255, .15)
}
.status{
    padding: .25em .25em .25em .25em;
    border-bottom: 1px solid grey;
 
}
        #leftPanel:before
        {
            content: '';
            display: block;
            position: absolute;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
        }
Eliott
Top achievements
Rank 1
 answered on 26 Jan 2014
1 answer
444 views
I have a grid displaying some data.
The columns are dynamically generated in code behind.
The grid allows for grouping.
The grid has a footer displaying aggregates for columns with numeric values.

When I have a column displaying FLOAT values, and I try to group by any column I get "Specified cast is not valid." error.
If I remove the aggregates, the grouping works.

This is the full text of the error:

Specified cast is not valid.
Anonymously Hosted DynamicMethods Assembly
at lambda_method(Closure , DataRow ) at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext() at System.Linq.Enumerable.Sum(IEnumerable`1 source) at lambda_method(Closure ) at System.Linq.EnumerableExecutor`1.Execute() at System.Linq.EnumerableQuery`1.System.Linq.IQueryProvider.Execute[S](Expression expression) at System.Linq.Queryable.Sum(IQueryable`1 source) at Telerik.Web.UI.GridBoundColumn.GetAggregateByType[T](IQueryable queryable, String fieldName, GridAggregateFunction func)

Any assistance in pointing me in the right direction would be greatly appreciated
Peter From LA
Top achievements
Rank 1
 answered on 25 Jan 2014
3 answers
139 views
hi, I need use uploader  control in my project that is exactly like this Demo.So i write all information to my project but this never work,early i get the error because not add Handler.ashx from radasyncupload smart tag...
anyway now uploader work enough to save in RadUploadTemp and not insert to database table.please see pic:

I think problem is between my table in db or cline upload event:
function fileUploaded(sender, args) {
    var id = args.get_fileInfo().ImageID;
    $(".imageContainer").html("").append($("<img />").attr("src", getImageUrl(id)));
    $(".info").html(String.format("<strong>{0}</strong> successfully inserted. Record ID - {1}", args.get_fileName(), id));
}

please help me to fix this.if possible to telerik admin post download of this demo with full solution i will be grateful.otherwise tell the details of this demo that wasnot write in page that shown.such as table of database,...
thanks
Hasan
Top achievements
Rank 1
 answered on 25 Jan 2014
2 answers
84 views
This is my .aspx code
<telerik:RadWindow  ID="modalPopup" runat="server" Width="360px" Height="360px">
               <ContentTemplate>
                    <p style="text-align: center;">
                     <h3>Data</h3>

                     <telerik:RadGrid ID="RGrid" runat="server" AllowPaging="true" AllowSorting="true" OnNeedDataSource="RGrid_NeedDataSource">
                     <MasterTableView AutoGenerateColumns="true"></MasterTableView>
                     </telerik:RadGrid>    
                    </p>
               </ContentTemplate>
          </telerik:RadWindow>


<telerik:RadCodeBlock runat="server" ID="rdbScripts">
          <script type="text/javascript">

              function showDialogInitially() {
                  //alert("786");

                  var wnd = $find("<%=modalPopup.ClientID %>");
                 wnd.show();

               //   Sys.Application.remove_load(showDialogInitially);
              } 

          </script>
     </telerik:RadCodeBlock>

this is onbuttonclick code

<telerik:RadButton ID="btnPreview" Text="Preview" runat="server" OnClientClicked="showDialogInitially()" />
It is working only first time but as I close the window and press button again It does not open anymore.
i have already tried this code.
<telerik:RadButton ID="btnPreview" Text="Preview" runat="server" OnClientClicked="showDialogInitially" AutoPostBack="false" />
But its does not work
Arsalan
Top achievements
Rank 1
 answered on 25 Jan 2014
1 answer
75 views
I have a RadTreeList that uses the TreeListComboEditor as its input for some of the columns. That part works very nicely (aside from the fact that TreeListEditFormItem.ExtractValues returns the selected values from a TreeListComboEditor as a single char instead of the selected value).

However, I have a situation where a user can change one selected input element and have the list of available options in a different TreeListComboEditor change: the first dropdown asks "Is this currency or quantity" and the second dropdown should show either a list of dollar-values or a list of item-quantities. I turned AutoPostBack to 'true' for the first control, and I can see that it is indeed posting back. However, since the TreeListComboEditor is created dynamically, I can't wire up the object's events ahead of time, and I don't see any available events that I can listen for. Is my only option 'parse the request arguments and search the page controls for the update panel?'
Pavlina
Telerik team
 answered on 24 Jan 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?