Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
142 views
I have a grid with on of the column as below:
<telerik:GridBoundColumn DataField="productID" HeaderText="Product ID" UniqueName="productID" FilterControlWidth="70%" ColumnGroupName="ColGroup1" ShowFilterIcon="false" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true"/>
When I type "<something>" in the input field and try to search I get and error. See attachment. However this error is displayed inside a error page that appears inside my iframe. How can I handle this error. I don't want to have an error inside a page inside my iframe. 
Thank you...
Pavlina
Telerik team
 answered on 09 Apr 2014
1 answer
491 views
I use this snippet to export to excel all the data in RadGrid, viable and not visible, with some columns filtered out:

protected void ExpExcel_Click(object sender, EventArgs e)
{
    foreach (GridColumn col in RadGrid1.MasterTableView.Columns)
    {
        if (col.UniqueName.Contains("notes") || (col.UniqueName.Contains("EditCommandColumn")) ||
            (col.UniqueName.Contains("column1")))
        {
            col.Display = false;
        }
        else
        {
            col.Display = true;
        }
    }
    foreach (GridFilteringItem item in RadGrid1.MasterTableView.GetItems(GridItemType.FilteringItem))
        item.Visible = false;
    RadGrid1.ExportSettings.ExportOnlyData = true;
    RadGrid1.MasterTableView.ExportToExcel();       
}
It is working fine. My problem is with two columns where the values are exported with the formatting "." and "$" that I do not won't to be exported. Is there a way to replace those two chars with "" or to avoid the formatting to get exported?
Princy
Top achievements
Rank 2
 answered on 09 Apr 2014
3 answers
212 views
hi
first i sorry for my poor English

i have grid in batch mode whit row EditType . i have radtextbox and RadNumericTextBox in edititemtamplate . i want when the value/text of these change a client event fire.
when i use textchanged of radtextbox when i click on another row with cell have different value the event fire too and i don't want this.in keypress i cant get tab button because when i press tab focus changed and focus  another cell and don't fire event.

when i use these event:
OnBatchEditGetEditorValue
OnBatchEditSetEditorValue
OnBatchEditSetCellValue
OnBatchEditGetCellValue
OnBatchEditCellValueChanged
OnBatchEditCellValueChanging

all of them fire after selected row change

now what witch event i can use?
Kostadin
Telerik team
 answered on 09 Apr 2014
11 answers
283 views

Hi There

I have a situation in which I have grid with numeric column on the web page and I have a numeric column on the web page as well.

I would like to compare the sum of all the grid numeric column values with the value of numeric column on the web page.

For example I have a value of 10,000 on the numeric column on the page and I have four records in the grid with the value 1000, 2000, 4000,2500 total=9500 which is less than 10,000 the value of my numeric column on the web page

And I am going to edit the fourth record (using Edit form mode) with the value say 5000 from 2500. Now the total value is greater than 10000 so I would like to warn my user using client side Java script and put the focus back again inside the grid numeric column so that he can change the value so that the value should not be greater than 10,000

So I would like to know the way how to calculate the total of particular numeric column of all rows including the edited row using Java script on focus out or on update client side event

In short I need to find a way to loop through all the rows including the one I am editing on the client side

Your help will be much appreciated

Many thanks

Syed

Konstantin Dikov
Telerik team
 answered on 09 Apr 2014
5 answers
175 views
I have two data controls that users can switch between, one a datagrid and one a RadListView that is tied to the datapager below:

   <telerik:RadDataPager ID="RadDataPager1" runat="server" PagedControlID="listResults" PageSize="20">
                                      <Fields>
                                <telerik:RadDataPagerButtonField FieldType="FirstPrev" />
                                <telerik:RadDataPagerButtonField FieldType="Numeric"  />
                                <telerik:RadDataPagerButtonField FieldType="NextLast" />
                               <telerik:RadDataPagerNumericPageSizeField LabelText="Page Size:" SubmitButtonText="Change"  TextBoxWidth="25" Visible="true" />
                                <telerik:RadDataPagerGoToPageField CurrentPageText="Page: " TotalPageText="of" SubmitButtonText="Go" TextBoxWidth="30" />
                                
                            </Fields>
                                     </telerik:RadDataPager>

The datagrid works just fine when changing the page size and hitting the enter key. The RadListView version I have with datapager does not.

I ended up just creating a hidden submit button and setting the default button for the whole page to that but really this is just a work around and to me the RadDataPagerNumericPageSizeField in RadDatapager should act just like the pager control built in to RadDatagrid.

With the hidden submit button the Datagrid still acts normally when changing the page size and hitting enter (which is great and the way I want it to act).





Kalpesh
Top achievements
Rank 1
 answered on 09 Apr 2014
1 answer
453 views
I want to get all data of a Radgrid into a datatable but my Radgrid includes GridTemplateColumn and when I use the normal code to get the column and rows in a datatable it gets back some of bound columns empty. Would you please help me to know what should I do?



Pavlina
Telerik team
 answered on 09 Apr 2014
5 answers
176 views
When 'postback' event is triggered in a page, rad grid header style is reset. What could be the cause of this issue and how to fix it?
aspx code
<asp:UpdatePanel UpdateMode="Always" ID="upGridConfig" runat="server">
                                        <ContentTemplate>
                                            <asp:HiddenField ID="hdnId" runat="server" />
                                            <asp:HiddenField ID="hdnTowerNo" runat="server" />
                                            <telerik:RadGrid ID="gridWindTurbines" ViewStateMode="Enabled" AllowPaging="true"
                                                AllowMultiRowSelection="false" AllowSorting="true" OnPageIndexChanged="gridWindTurbines_PageIndexChanged"
                                                OnNeedDataSource="gridWindTurbines_NeedDataSource" AutoGenerateColumns="false"
                                                AllowAutomaticInserts="true" GridLines="Horizontal" ClientSettings-EnableRowHoverStyle="true"
                                                OnItemDataBound="gridWindTurbines_ItemDataBound" EnableAjaxSkinRendering="false"
                                                MasterTableView-RowIndicatorColumn-ItemStyle-BorderColor="ActiveBorder" Height="264px"
                                                 runat="server">
                                                <ClientSettings Scrolling-AllowScroll="true" Selecting-AllowRowSelect="true" Scrolling-UseStaticHeaders="true"
                                                    Selecting-UseClientSelectColumnOnly="true">
                                                    <ClientEvents OnRowSelecting="enablelink" OnRowDeselecting="disablelink" />
                                                </ClientSettings>
                                                <MasterTableView AllowPaging="true" DataKeyNames="NAME,OBJID,MODEL,POWER" Visible="true"
                                                    Width="100%" TableLayout="Fixed" EnableViewState="true" HeaderStyle-HorizontalAlign="Center"
                                                    ItemStyle-HorizontalAlign="Center" AlternatingItemStyle-HorizontalAlign="Center"
                                                    ClientDataKeyNames="NAME,OBJID">
                                                    <Columns>
                                                        <telerik:GridClientSelectColumn UniqueName="CHK" ItemStyle-HorizontalAlign="Center"
                                                            HeaderStyle-Width="5%">
                                                        </telerik:GridClientSelectColumn>
                                                        <telerik:GridBoundColumn DataField="OBJID" HeaderStyle-Font-Bold="true" Visible="false"
                                                            HeaderStyle-Width="10%">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn DataField="NAME" HeaderStyle-Font-Bold="true" HeaderText="WTG"
                                                            HeaderStyle-Width="10%">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn DataField="MODEL" HeaderText="TYPE" HeaderStyle-Font-Bold="true"
                                                            HeaderStyle-Width="25%">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridTemplateColumn UniqueName="POWER" SortExpression="POWER" HeaderStyle-Font-Bold="true"
                                                            HeaderText="POWER">
                                                            <ItemTemplate>
                                                                <asp:Label ID="LblPower" runat="server" />
                                                            </ItemTemplate>
                                                        </telerik:GridTemplateColumn>
                                                        <telerik:GridBoundColumn DataField="PLCCount" HeaderText="#PLC" HeaderStyle-Font-Bold="true"
                                                            HeaderStyle-Width="10%">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn DataField="CCUCount" HeaderText="#CCU" HeaderStyle-Font-Bold="true"
                                                            HeaderStyle-Width="10%">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn DataField="SMPCount" HeaderText="#SMP" HeaderStyle-Font-Bold="true"
                                                            HeaderStyle-Width="10%">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn DataField="DASCount" HeaderText="#DAS" HeaderStyle-Font-Bold="true"
                                                            HeaderStyle-Width="10%">
                                                        </telerik:GridBoundColumn>
                                                    </Columns>
                                                    <HeaderStyle CssClass="GridHeader" />
                                                </MasterTableView>
                                                <PagerStyle Mode="NextPrevAndNumeric" VerticalAlign="Bottom" Position="Bottom" AlwaysVisible="true" />
                                            </telerik:RadGrid>
                                        </ContentTemplate>
                                    </asp:UpdatePanel>
Konstantin Dikov
Telerik team
 answered on 09 Apr 2014
2 answers
557 views
Hi,

Can I set images URL from a data source instead of image data field? In my situation, we save only image url in database.

Thanx 
Saeid
Saeid Kdaimati
Top achievements
Rank 2
 answered on 09 Apr 2014
1 answer
103 views
Hi,

Is there a way to enable resizing but only when in 'Preview' edit mode? At the moment, it seems that resizing only works when editor is in 'All' edit mode. When set to a specific edit mode, the bottom of the editor (which allows resizing) disappears.

Thanks.
Ianko
Telerik team
 answered on 09 Apr 2014
11 answers
547 views

Has anyone managed to create a FileBrowserContentProvider to handle physical paths outside the web app? I have a scenario where I need files to be managed outside of the application, and it appears that everything wants virtual paths!

Looking at the demo I also thought of using a httphandler for the files, however that isn’t working. I got as far as getting the directory tree to show in the left tree view however no files are being shown.

I am by no means an ASP.net expert and am still learning the ropes, so if anyone can point me in the right direction I'd be most grateful.

I Keep getting errors like below thrown up:

---------------------------
Message from webpage
---------------------------
Callback Loading error:
D:\Test\
Unrecognized escape sequence. (14): { path : &quot;D:\Test\&quot;, sortExpression : &quot;&quot;}96|/wEWCAL4tITjBwL8w9uGDALztZepDwLytZepDwL1tZepDwL0tZepDwLvtZepDwLutZepD4v1sVL6WoAl9jmHj5iuS6WymetQ
---------------------------
OK  
---------------------------

Vessy
Telerik team
 answered on 09 Apr 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?