Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
69 views
How can I access each item on the edit form when the row is being updated/ inserted?
<MasterTableView EditMode="PopUp" CommandItemSettings-ShowAddNewRecordButton="True" DataKeyNames="RowId" >

keyfield RowID is getting displayed on the popup. I want to hide it.
Krutika
Top achievements
Rank 1
 answered on 15 Nov 2012
4 answers
198 views
Hello,

I use on .net Two FrameWork Telerik and Strataframe.

Strataframe can to interact with the sqlserver like entity but it's better.
For Example I can binding textbox with my Business Object Like this.

<SFWeb:TextBox runat="server" ID="Txt1" BindingField="MyField"  BusinessObjectName="TableBo" ></SFWeb:TextBox>

it's work on WebForm , on WebUserControl add on the WebForm,
and if i use the RadTabStrip , it's work in RadPageView so

But if i work with the PageViewCreated to load WebUserControl my Textbox doesn't load
the field on my Business Object. What 's the difference between PageViewCreated and load in the Webform ?

have you some code to fix it ?

It's important to use Strataframe cause it can to Bind in to Way,

With the simple syntax : this.TableBo.Save()  , i save in sql table without to reload the Value of the textbox.


Thanks For your help

Olivier,

Olivier
Top achievements
Rank 2
 answered on 15 Nov 2012
2 answers
72 views
I have a list view control within a user control that is exhibiting unexpected behavior.  The list view is within a panel that is itself within a RadAjaxLoadingPanel.  The panel is registered with a RadAjaxManager.  The list view is populated from an object data source.  There is an edit template defined with an update button inside it to issue the update command.  The user clicks a button to issue the edit command and the edit template is displayed.  When the update button is pressed, the ajax loading screen covers the panel.  When the ajax call is complete, the edit template has not gone away.  The item command event of the list view is triggered, but not the updating event of the object data source.  I ran this test in debug mode and did not receive any client or server error feedback.  It also seems to work when connected to a local database, but not our main testing one.  This suggests it has something to do with timing.  I cannot think of any further testing to conduct because the remaining processing of the update happens within the Telerik list view code.  Are there any ideas from the community on how to further debug this issue?
Jason
Top achievements
Rank 1
 answered on 15 Nov 2012
1 answer
136 views

I am retrieving data from database using RadGrid.  I have more columns in my RadGrid, so I need to show RadGrid horizontal scroll to keep the page from expanding but disable the vertical scroll so height of the grid should expand to always display all rows in the grid.  I got the result but there is whitespace in the bottom of the RadGrid.


My UI of the RadGrid:
-------------------------------

 <table style="table-layout: fixed;" width="100%" cellpadding="0" cellspacing="0"

        border="0">

        <tr>

            <td>

                <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="false" PagerStyle-AlwaysVisible="true"

                    CellPadding="0" CellSpacing="0" GridLines="None" Skin="Metro" CssClass="RadGrid_CBGrid"

                    HorizontalAlign="Left" AutoGenerateColumns="False" OnItemCommand="RadGrid1_ItemCommand"

                    OnDataBound="RadGrid1_DataBound">

                    <ClientSettings>

                        <Selecting CellSelectionMode="SingleCell"></Selecting>

                        <Scrolling AllowScroll="true" UseStaticHeaders="True"></Scrolling>

                    </ClientSettings>

                    <MasterTableView HierarchyLoadMode="Client" DataKeyNames="EmpID" AllowMultiColumnSorting="true"

                        Name="Parent">

                        <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>

                        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">

                        </RowIndicatorColumn>

                        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">

                        </ExpandCollapseColumn>

                        <Columns>

                            <telerik:GridBoundColumn DataField="EmpID" EmptyDataText="NA" HeaderText="Emp ID"

                                UniqueName="EmpID">

                            </telerik:GridBoundColumn>
                          and so on......
                          -------------------
                        </Columns>

                        <EditFormSettings>

                            <EditColumn FilterControlAltText="Filter EditCommandColumn column">

                            </EditColumn>

                        </EditFormSettings>

                    </MasterTableView>

                    <FilterMenu EnableImageSprites="False">

                    </FilterMenu>

                </telerik:RadGrid>

            </td>

        </tr>

    </table>

 

 

If I changed  ClientSettings-Scrolling-AllowScroll="true" in RadGrid and <Scrolling AllowScroll="false" UseStaticHeaders="True"></Scrolling>

I got the result and there is NO whitespace in the bottom of the RadGrid BUT Horizontal scroll bar is NOT coming in my RadGrid.

 

So can anybody please give me the solution.

Thanks in Advance.

Pavlina
Telerik team
 answered on 15 Nov 2012
1 answer
89 views

I am retrieving data from database using RadGrid.  I have more columns in my RadGrid, so I need to show RadGrid horizontal scroll to keep the page from expanding but disable the vertical scroll so height of the grid should expand to always display all rows in the grid.  I got the result but there is whitespace in the bottom of the RadGrid.


My UI of the RadGrid:
-------------------------------

 <table style="table-layout: fixed;" width="100%" cellpadding="0" cellspacing="0"

        border="0">

        <tr>

            <td>

                <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="false" PagerStyle-AlwaysVisible="true"

                    CellPadding="0" CellSpacing="0" GridLines="None" Skin="Metro" CssClass="RadGrid_CBGrid"

                    HorizontalAlign="Left" AutoGenerateColumns="False" OnItemCommand="RadGrid1_ItemCommand"

                    OnDataBound="RadGrid1_DataBound">

                    <ClientSettings>

                        <Selecting CellSelectionMode="SingleCell"></Selecting>

                        <Scrolling AllowScroll="true" UseStaticHeaders="True"></Scrolling>

                    </ClientSettings>

                    <MasterTableView HierarchyLoadMode="Client" DataKeyNames="EmpID" AllowMultiColumnSorting="true"

                        Name="Parent">

                        <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>

                        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">

                        </RowIndicatorColumn>

                        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">

                        </ExpandCollapseColumn>

                        <Columns>

                            <telerik:GridBoundColumn DataField="EmpID" EmptyDataText="NA" HeaderText="Emp ID"

                                UniqueName="EmpID">

                            </telerik:GridBoundColumn>
                          and so on......
                          -------------------
                        </Columns>

                        <EditFormSettings>

                            <EditColumn FilterControlAltText="Filter EditCommandColumn column">

                            </EditColumn>

                        </EditFormSettings>

                    </MasterTableView>

                    <FilterMenu EnableImageSprites="False">

                    </FilterMenu>

                </telerik:RadGrid>

            </td>

        </tr>

    </table>

 

 

If I changed  ClientSettings-Scrolling-AllowScroll="true" in RadGrid and <Scrolling AllowScroll="false" UseStaticHeaders="True"></Scrolling>

I got the result and there is NO whitespace in the bottom of the RadGrid BUT Horizontal scroll bar is NOT coming in my RadGrid.

 

So can anybody please give me the solution.

 

 

Thanks in Advance.

Pavlina
Telerik team
 answered on 15 Nov 2012
1 answer
261 views
is there any way to paste only plain text from HTML content on RadEditor.
When we are going to paste content of HTML  on RadEditor ,we have to filter all links and images from HTML content and only Palain text shold display on RadEditor's Content area.
any idea?
Note: With out using  PastePlainText tool


Best Regards,
Anwar

Rumen
Telerik team
 answered on 15 Nov 2012
1 answer
59 views
Hi,
         I have 3 radlistbox controls on my page. RadListBox1, RadListBox2, RadListBox3. When a user transfers from RadListBox1 or RadListBox2 they should go to the third one ( i have done it and works fine). Now, when the user puts back an item from 3 it should either go to 1 or to 2 (it depends on a condition which i should check in database). 

Can any one please tell how i can do this on the server side. basically these things should happen:

1. Stop the default transfer of the radlistbox
2. Check the condition
2. transfer depending on that condition.

Please help..Thanks



Nencho
Telerik team
 answered on 15 Nov 2012
2 answers
65 views
Hi,

I have a RadGrid with a GridTemplateColumn whose EditItemTemplate contains a DropDownList and a label control for displaying error messages. When I insert a new item and change the selection in the drop-down list, I would like to be able to update other drop-down list controls in the other columns of the grid. When editing an item, I am able to do so inside the SelectedIndexChanged event of the drop-down list control using the following code:

editedIndex = grid.EditIndexes[0];
item = grid.EditItems[editedIndex] as GridEditableItem;

list = item.FindControl("txtBox1") as DropDownList;
list.DataSource = listValues;
list.DataBind();

When inserting an item, however, grid.EditItems.Count is 0 and I don't know how to access the newly inserted line in the grid and its controls.

Could anyone point me in the right direction?
Angel Petrov
Telerik team
 answered on 15 Nov 2012
1 answer
117 views
Hi,

I've got a RadAJAXManager on my page to manage the AJAX requests and I think it's affecting how the page maintains values in internet explorer.

When the user submits the page and then hits the back button, the values of all the fields (standard asp TextBoxes) are lost.
If I disable AJAX, the values are maintained. I guess this is because the submit button is ajax'ed and the navigation is triggered during a serverside function using response.redirect? Not sure why it would work fine in other browsers though. 

Note that this only affects Internet Explorer, the other browsers keep the values with no issues. 

Any Ideas?


Thanks,
Bill
Pavlina
Telerik team
 answered on 15 Nov 2012
2 answers
121 views
Hi,
I have a radgrid which on one of its ItemCommands, it adds a new row to the database, rebinds to the grid.
When I use normal postback it works fine, but the ajaxified version does not work. 
I've looked at the http://www.telerik.com/community/forums/aspnet-ajax/grid/radgrid-not-refreshing-after-ajax-and-rebind.aspx which was not much of help for me.

Here is the aspx file:

<telerik:RadScriptManager runat="server" ID="radScriptManager1" />

<telerik:RadGrid    runat="server"
                                ID="radGrid1" 
                                AutoGenerateColumns="False"
                                EnableViewState="True"
                                OnItemCreated="radGrid1_OnItemCreated"
                                OnItemCommand="radGrid1_OnItemCommand"
                                OnNeedDataSource="lnkCopyGrade_OnNeedDataSource">
                <MasterTableView AllowFilteringByColumn="False" CommandItemDisplay="None" ClientDataKeyNames="grade_id">
                    <SortExpressions>
                        <telerik:GridSortExpression FieldName="grade_name" SortOrder="Ascending"/>
                    </SortExpressions>
                    <SortExpressions>
                        <telerik:GridSortExpression FieldName="sort_order" SortOrder="Ascending"/>
                    </SortExpressions>
                
                    <Columns>
                        <telerik:GridTemplateColumn HeaderText="" AllowFiltering="False">
                            <ItemTemplate>
                                <asp:ImageButton runat="server" ID="lnkCopyGrade" AlternateText="Copy Grade"
                                                CommandArgument='<%# DataBinder.Eval(Container.DataItem,"grade_id") %>' 
                                                CommandName="copyGrade" ImageUrl="../../../images/icons/CopyIconSmall24x24.png" ToolTip="Copy Grade"/>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn    HeaderText="Full Name" DataField="grade_name" 
                                                    AllowSorting="True" AllowFiltering="False"/>
                        <telerik:GridBoundColumn HeaderText="Sort<br>Order" DataField="sort_order" ItemStyle-HorizontalAlign="Center" AllowSorting="True" AllowFiltering="False"/>
                    </Columns>
                </MasterTableView>
            </telerik:RadGrid>
        
	<telerik:RadAjaxManager ID="ajaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="radGrid1" EventName="OnItemCommand">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="radGrid1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>

And here is the relevant codebehind 


	protected void radGrid1_OnItemCommand(object sender, GridCommandEventArgs e)
	    {
	        int iGradeID = RVConversion.ToInt32(e.CommandArgument);
	        string sGradeName = radGrid1.Items[e.Item.ItemIndex].Cells[(intCOLS.NAME].Text;
 
            	string sURL;
            	switch (e.CommandName)
            		{
                		case "copyGrade":
                    			CopyGrade(iGradeID);
                    		break;
            		}
	    }
 	private void CopyGrade(int gradeID)
	    {
            	//rv_copy_grade
            	var arrParams = new RVParamArrayList();
            	arrParams.addInt32Param("@gradeID", gradeID);
 
            	var result = RVDB.execCommand("rv_copy_grade", arrParams);
           	 radGrid1.Rebind();
	    }
	 protected void lnkCopyGrade_OnNeedDataSource(object sender, GridNeedDataSourceEventArgs e)
	    {
            	object o = null;
            	IRVPageData_Base_GetData(ref o, new object[] { Entity.EntityID, null });
            	var ds = (GradeDataSet)o;
 
            	DataTable table = ds.Tables[0];
 
            	const string sAccessColumnName = "access";
            	table.Columns.Add(sAccessColumnName, Type.GetType("System.Int32"));
            	RVUserMisc.AddGradeSecurityToTable(table, sAccessColumnName, this);
            	var dv = new DataView(table);
            	radGrid1.DataSource = dv;
	    }
Worth saying that at the end of
lnkCopyGrade_OnNeedDataSource database is getting updated but from the console window of the browser I can see that following exception is thrown : Uncaught Sys.WebForms.PageRequestManagerParserErrorException: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near '<!DOCTYPE html PUBLI'. Telerik.Web.UI.WebResource.axd:6
Error.create Telerik.Web.UI.WebResource.axd:6
Sys.WebForms.PageRequestManager._createPageRequestManagerParserError Telerik.Web.UI.WebResource.axd:15
Sys.WebForms.PageRequestManager._parseDelta Telerik.Web.UI.WebResource.axd:15
Sys.WebForms.PageRequestManager._onFormSubmitCompleted Telerik.Web.UI.WebResource.axd:15
(anonymous function) Telerik.Web.UI.WebResource.axd:6
(anonymous function) Telerik.Web.UI.WebResource.axd:6
Sys.Net.WebRequest.completed Telerik.Web.UI.WebResource.axd:6
_onReadyStateChange Telerik.Web.UI.WebResource.axd:6


Thanks.
Angel Petrov
Telerik team
 answered on 15 Nov 2012
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?