Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
326 views
I need to ReBind the RadGrid on the Server Side.

I have a asp button on my page, and when user clicks, on the OnClick event of that asp button, I need to add some rows to my DataGrid, and bind my grid.

(I have seen the examples that uses input button's to bind radGrid, but i should bind my grid on asp button's OnClick event.)

Is there a way to do this?
Iana Tsolova
Telerik team
 answered on 13 Nov 2008
3 answers
97 views
Hi,

Following code does not work with Q2 2008:

code behind:
inside page load -
btnUpdate.Attributes.Add("onClick", "return validate('save');")
btnLoadGrid.Attributes.Add("onClick", "return validate('loadgrid');")
txtNoOfRows.Attributes.Add("onkeyup", "return EnableDisableBttns();")

<telerik:RadAjaxManager ID="AjaxMgr" runat="server" UpdatePanelsRenderMode="inline">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="btnLoadGrid">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="dgrdSeed" />
                    <telerik:AjaxUpdatedControl ControlID="rcb" />
                    <telerik:AjaxUpdatedControl ControlID="btnUpdate" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="dgrdSeed">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="dgrdSeed" />
                    <telerik:AjaxUpdatedControl ControlID="txtNoOfRows" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="btnCancel">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rsb" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
        
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="btnUpdate">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="lblErr" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
        
        
    </telerik:RadAjaxManager>



What happens is:
1) javascript function gets called but corresponding click event on code behind of buttons is not firing on returning true which was working fine with Q2 2007. I tried using radcodeblock, radscriptblock.
2) validation controls does not fire expected.

Any help please.

Thanks,
Vaibhav

Vaibhav
Top achievements
Rank 1
 answered on 13 Nov 2008
3 answers
179 views
Hi,
I have one tabstrip with two tabs, attached to a multipage with two pageviews. In each pageview there is a panelbar. 
It's kind of a product menu, tab 1 is showing product categories in a specified sorted order and the tab 2 is showing them in alphabetic order.
Now:
If I click on tab 2 to see the categories alphabeticly and then click on a category to navigate to that page the tab is reset to the first tab.
How can I persist the tabs to stay on no. 2 (and pageview no. 2)?

   <telerik:RadTabStrip ID="RadTabStrip1"  
        runat="server" Skin="Black" SelectedIndex="1"  
        MultiPageID="radMultiPageCategories" EnableEmbeddedSkins="False"
        <Tabs> 
            <telerik:RadTab runat="server" PageViewID="radPageViewSorted" Text="Kategorier" Selected="True"
            </telerik:RadTab> 
            <telerik:RadTab runat="server" PageViewID="radPageViewAlphabetic" Text="A-Ö"
            </telerik:RadTab> 
        </Tabs> 
    </telerik:RadTabStrip> 
     
    <telerik:RadMultiPage ID="radMultiPageCategories" runat="server" Width="100%"  
        SelectedIndex="0"
        <telerik:RadPageView runat="server" ID="radPageViewSorted"
            <telerik:RadPanelBar ID="radPanelBarSorted" runat="server"  
                onitemdatabound="radPanelBarSorted_ItemDataBound" Skin="Default" 
                EnableEmbeddedSkins="False" Width="100%" PersistStateInCookie="False"
                <CollapseAnimation Type="None" Duration="100"></CollapseAnimation> 
                <ExpandAnimation Type="None" Duration="100"></ExpandAnimation> 
            </telerik:RadPanelBar> 
        </telerik:RadPageView> 
        <telerik:RadPageView runat="server" ID="radPageViewAlphabetic"
            <telerik:RadPanelBar ID="radPanelBarAlphabetic" runat="server"  
                onitemdatabound="radPanelBarAlphabetic_ItemDataBound" Skin="Default" 
                EnableEmbeddedSkins="False" Width="100%" PersistStateInCookie="False"
                <CollapseAnimation Type="None" Duration="100"></CollapseAnimation> 
                <ExpandAnimation Type="None" Duration="100"></ExpandAnimation> 
            </telerik:RadPanelBar> 
        </telerik:RadPageView> 
    </telerik:RadMultiPage> 

Mattias
Top achievements
Rank 1
 answered on 13 Nov 2008
3 answers
115 views
I have a farley large form similar to http://demos.telerik.com/ASPNET/Prometheus/Panelbar/Examples/ApplicationScenarios/AccessingNestedControls/DefaultCS.aspx. One of the major diffrences is that I have a ajax loading panel that will only show once. When I hit the next button on step one it will show but on step two it does not, from that point on the loading panel is gone even if I go back to step one and press next.
Iana Tsolova
Telerik team
 answered on 13 Nov 2008
1 answer
92 views
HI,

good day, i just want to ask, how can i render the radeditor for asp.net ajax as textbox, and i want it to accept TAB and ENTER key,

Thanks
Svetlina Anati
Telerik team
 answered on 13 Nov 2008
1 answer
146 views

Hi again,

I have a Hierarchiel radgrid of 2levels. My first level is populated by LinqDataSourceTargetCategory.
2nd level is populated by LinqDataSourceTargetCategoryInfo.

Level 1 data is from tblTargetCategory.
Level 2 data is from tblTargetCategoryInfo.

LinqDataSourceTargetCategoryInfo has:

 Where="TargetCategoryId == @TargetCategoryId">        
          <WhereParameters>
               <asp:Parameter Name="TargetCategoryId" Type="Int32" />
          </WhereParameters>      

So it knows which record in level 2 grid belong to which record from level1. I also have:
         
     <MasterTableView DataKeyNames="TargetCategoryId" DataSourceID="LinqDataSourceTargetCategory"
          CommandItemDisplay="Top" Width="100%"> 

and have

     <ParentTableRelation>
          <telerik:GridRelationFields DetailKeyField="TargetCategoryId" MasterKeyField="TargetCategoryId" />                           
     </ParentTableRelation>

tblTargetCategoryInfo has a foreign key TargetCategoryId which comes from tblTargetCategoryId(is primarykey).

I've done this so that my radgrid can load correctly which is does. It loads the 2nd level and associates the records according to TargetCategoryId.

On level one i can INSERT UPDATE DELETE fine using:

         AllowAutomaticDeletes="True"
         AllowAutomaticInserts="True" 
         AllowAutomaticUpdates="True" 
         AutoGenerateDeleteColumn="True"
         AutoGenerateEditColumn="True"

But here is the problem. On my 2nd level the data loads correctly but when i want to do an INSERT it says:

"INSERT statement conflicted with COLUMN FOREIGN KEY constraint 'FK_tblTargetCategoryInfo_tblTargetCategory'. The conflict occurred in database 'spe', table

'tblTargetCategory', column 'TargetCategoryId'.
The statement has been terminated."

So i turned off "Enforce foreign key constraint rule" to see what value was been parsed into TargetCategoryId, i noticed it was 0. Obviously causing the error.
TargetCategoryId should be equal to the record which i'm working with, which is on level 1.
So if i'd have record x on level 1 with TargetCategoryId = 1,
then i expand and add a new item y. When i insert i want it to automatically know that i'm adding it to with TargetCategoryId = 1 which is x.

I'm using LINQ datasources.
Sorry for the long post but rather i give you all the information you need to help me. Hope it was a clear description of the problem.

 

--

I went to http://demos.telerik.com/aspnet/prometheus/Grid/Examples/DataEditing/ThreeLevel/DefaultCS.aspx and look at the ASPX. It's a custom type of Datasource.. How can i do that INSERT normally? Somehow my DELETE and UPDATE work fine.

Darren
Top achievements
Rank 2
 answered on 13 Nov 2008
7 answers
583 views
i want to know how to use tooltip in radgrid for applying validation on redtextbox in edit item template.
Svetlina Anati
Telerik team
 answered on 13 Nov 2008
12 answers
195 views
I downloaded the trial of Q2 ajax and used the RadFormdecorator on my checkbox and button. the checkbox bottom was cut off in Firefox.

So I downloaded the Q3 beta version, installed it into the toolbox and web.config, replaced all the /Scripts and /Skins folders, and now in Firefox the checkbox is still cut off on the bottom, but als the button is expanded to the entire width of my screen on two lines. I don't give a button width or style, I just let it default.

What do I need?
    <tr>
        <td colspan="2" class="TableField">
            <asp:CheckBox ID="chkAgree" runat="server" />
            <br /><br />
        </td>
    </tr>
    <tr>
        <td colspan="2" class="TableLabel">
            <asp:Button ID="btnRegister" runat="server" />
        </td>
    </tr>

In codebehind:
        chkAgree.Text = "I agree to the Terms and Conditions"
        btnRegister.Text = "Register"

I was wanting to register this by nov. 4th, but so far I'm just having troubles. :(
Martin
Telerik team
 answered on 13 Nov 2008
2 answers
258 views
Hi,

I am using Rad for ASP.NET Ajax Q3. My Menu Items have been created dynamically. And the exception above occurs.

Following is the stack trace. Theese lines run 3 times. and at the 3rd run throws an exception. (My menu contains 2 root items.)

_12a has a value for first and second run but is null for the last one. This is causing the exception I guess.


Telerik.Web.UI.RadMenuItem.callBaseMethod(

this,"_initialize",[json,_12a]);

 

 

return baseMethod.apply(instance, baseArguments);

 

this.set_element(_c8);

 

this

 

._element._item=this;


Kind regards.

 

caglar_ozkul
Top achievements
Rank 1
 answered on 13 Nov 2008
1 answer
49 views
Hi,
I have two grids,parent and detail,and one label.I want to know,if i click the row in my Parent grid,it should return the first column value to the label and it should fetch the corresponding related rows to Detail grid.I have tried like

         <%= ((RadAjaxManager)LoginView1.FindControl("RadAjaxManager1")).ClientID %>.ajaxRequest(this.gGetCellByColumnUniqueName(rowObject, "SizeScaleCode").innerHTML); 

but it is not working in 2008 controls.I want to know in C#.Please anyone help me solve this problems.
Daniel
Telerik team
 answered on 13 Nov 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?