Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
119 views

I am using grid with only GridTemplateColumns.How can we insert a row in grid with GridTemplateColumn(ItemTemplate,EditItemTemplate), when EditMode is "InPlace".  Please post some sample codes.

<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" AutoGenerateColumns="False" GridLines="None" OnNeedDataSource="RadGrid1_NeedDataSource" >

<MasterTableView CommandItemDisplay="Bottom" EditMode="InPlace" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True">
<EditFormSettings EditFormType="Template">
<PopUpSettings ScrollBars="None" />
<EditColumn UniqueName="EditCommandColumn1">
</EditColumn>
</EditFormSettings>
<ExpandCollapseColumn Resizable="False" Visible="False">
<HeaderStyle Width="20px" />
</ExpandCollapseColumn>
<RowIndicatorColumn Visible="False">
<HeaderStyle Width="20px" />
</RowIndicatorColumn>
<Columns>
<telerik:GridTemplateColumn UniqueName="TemplateColumn">
<ItemTemplate>
<asp:Label ID="lblCodeName" runat="server"></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<telerik:RadTextBox ID="txtCodeName" runat="server">
</telerik:RadTextBox>
</EditItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn UniqueName="TemplateColumn1">
<ItemTemplate>
<asp:Label ID="lblCodeShortName" runat="server"></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtCodeShortName" runat="server"></asp:TextBox>
</EditItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn UniqueName="TemplateColumn2">
<ItemTemplate>
<asp:Label ID="lblCodeDesc" runat="server"></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<telerik:RadTextBox ID="txtCodeDesc" runat="server">
</telerik:RadTextBox>
</EditItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridEditCommandColumn>
</telerik:GridEditCommandColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>

In Code Behind

public

partial class _Default : System.Web.UI.Page

{

DataSet CodeDs = new DataSet();

protected void Page_Load(object sender, EventArgs e)

{

if (!Page.IsPostBack)

{

dgtable();

}

}

private void dgtable()

{

DataTable CodeDtbl = null;

DataSet CodeDs = new DataSet();

DataColumn LookupCodeId = null;

DataColumn LookupCode = null;

DataColumn LookupCodeShortName = null;

DataColumn LookupCodeName = null;

DataColumn LookupCodeDesc = null;

CodeDtbl =

new DataTable("CodeDetails");

LookupCodeId =

new DataColumn("LookupCodeId", typeof(string));

LookupCodeId.DefaultValue = 0;

LookupCode =

new DataColumn("LookupCode", typeof(string));

LookupCodeShortName =

new DataColumn("LookupCodeShortName", typeof(string));

LookupCodeName =

new DataColumn("LookupCodeName", typeof(string));

LookupCodeDesc =

new DataColumn("LookupCodeDesc", typeof(string));

CodeDtbl.Columns.Clear();

CodeDtbl.Columns.Add(LookupCodeId);

CodeDtbl.Columns.Add(LookupCode);

CodeDtbl.Columns.Add(LookupCodeShortName);

CodeDtbl.Columns.Add(LookupCodeName);

CodeDtbl.Columns.Add(LookupCodeDesc);

CodeDs.Tables.Add(CodeDtbl);

RadGrid1.DataSource = CodeDs;

RadGrid1.DataBind();

Session[

"CodeDs"] = CodeDs;

Session[

"CodeDtbl"] = CodeDtbl;

}

protected void RadGrid1_NeedDataSource(object source, GridNeedDataSourceEventArgs e)

{

CodeDs = (

DataSet)Session["CodeDs"];

RadGrid1.DataSource = CodeDs;

}

}

Regards,
Sakthivel

Shinu
Top achievements
Rank 2
 answered on 18 Jun 2008
2 answers
636 views
Hi there,
I'm using custom providers to get and set cookies. This has worked fine up to the latest AjaxManager and AjaxPanel. With the latest If we try updating our cookie collection on an AjaxRequest we get this error below. Does anyone know of a workaround for this issue? I've tried this .config setting but no luck so far. Thanks for any help.

Setting we tried:
<roleManager enabled="true" defaultProvider="WebServiceProvider" cacheRolesInCookie="false">
 
"Server cannot modify cookies after HTTP headers have been sent."
Rory
Top achievements
Rank 1
 answered on 17 Jun 2008
6 answers
178 views
I'm using the RADMenu with DEFAULT skin. Now the problem is that with the DEFAULT skin on Hover of Menu is shows up with a white background. I wanted to change that color to a light Blue color but unfortunately I'm not able to do so.

Can anyone help me on customizing the DEFAULT skin for the RADMenu.

Thanks.
Ed
Top achievements
Rank 1
 answered on 17 Jun 2008
1 answer
173 views
Hi there,

I am trying to reproduce the partial update functionality shown on the Telerik examples site (http://www.telerik.com/demos/aspnet/prometheus/Controls/Examples/Default/DefaultCS.aspx) where the middle pane is refreshed on clicking an item in the left-hand nav without causing the whole page to flicker.  Is there a standard way to do this?  I have been experimenting with the following code in an ASPX file (the RadAjaxManager itself is in a master page):

    <telerik:RadAjaxManagerProxy runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="pnlTemp">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="btnTemp"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>

    <asp:Label ID="lblTemp" runat="server" Text="nothing"></asp:Label>
    <asp:Panel ID="pnlTemp" runat="server">
        <asp:Button ID="btnTemp" runat="server" Text="Button" />
        <asp:Button ID="btnTemp2" runat="server" Text="Button2" />
    </asp:Panel>  

If I specify the whole panel as the Ajax control, this doesn't work (i.e., clicking a button causes the whole page to be refreshed), whereas if I nominate one of the buttons directly, it does work.  Does this indicate anything?  Ultimately, I want to have a LH nav consisting of a RadPanelBar, with the "leaf" items (i.e., those with no children) triggering partial-page post-backs that refresh the centre pane but leave the top and LH navs unchanged (so no flicker).

All advice gratefully received,

Ed Graham
Ed
Top achievements
Rank 1
 answered on 17 Jun 2008
2 answers
143 views
I need to perform some actions on the grid on the original page load, not in Ajax calls:
<body onload="setupTopButtons()">

Please tell me how can I accees the grid client object from within setupTopButtons(). All examples I see refer to something like 

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script type="text/javascript"> 
 var grid = $find("<%=RadGrid1.ClientID %>"); 
 //execute some logic here
</script>
</telerik:RadCodeBlock>

which sets var grid to null on the original page load.
Eliyahu Goldin
Top achievements
Rank 1
 answered on 17 Jun 2008
1 answer
289 views
We are using the radScriptBlock to add our own Javascript and everything works fine.

We encountered an issue today and we are trying to debug our Javascript, prior to using the radScriptBlock we would use the debugger command to stop the Javascript and step through.

How can we step through the Javascript that is within a radScriptBlock.

Right now the debugger command is being ignored, to make sure the we were executing the code where the debugger command was I changed the debugger to an alert command and the aler is being fired.

Thanks
Alex
Top achievements
Rank 2
 answered on 17 Jun 2008
1 answer
154 views
When I click on a color, it disappears and the previous selected color reappears...
My Telerik version is 2008.1.415.
Idea ? thank you.
Etienne
Top achievements
Rank 1
 answered on 17 Jun 2008
2 answers
170 views
I use the export to ecel functioanlity to export my grid to an excel file.

When I had large amount of data in the grid(I am not talking of millions of records, maybe around 5-10,000) and I clicked the export button nothing happens. On some debugging it appeared that its throwing a Syste.OutofMemoryException.

Is this a known Issue?
Do I need to set some properties that will handle this scenario?

Please help.

newbie
Top achievements
Rank 1
 answered on 17 Jun 2008
1 answer
143 views
We were trying to implement a web site with advanced UI capabilities using the prototype.js framework (http://www.prototypejs.org/) and telerik treeview. However, It seems that both environments are not compatible. We have a lot of javascript errors.
Is there any solution for that?
Best regards
Philippe
Helen
Telerik team
 answered on 17 Jun 2008
5 answers
218 views
I want to change the grid BackColor and Forecolor based on user log in.

I tried to change the header style CSSClass property dynamically, but with no effect.

Can someone help.
maha
Top achievements
Rank 1
 answered on 17 Jun 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?