Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
203 views
Hi,
I'm searching the web for several days but couldn't find a solution yet.
What I want to do is to use the RADGrid with User Control Edit Form for insert and update. And I want to use SQLDatasource to reduce the code for insert/update operations. Displaying the data from the grids selected item in the user control works fine. But I have problems to insert and update records using the SQLDatasource with parameters. Seems that the insert/update events are not fired.

Is it possible to use SQLDataSource for update/insert when using a user control in RADGrid? Are there any samples for that available?

Thanks for your help.

Uwe
Princy
Top achievements
Rank 2
 answered on 30 Mar 2011
3 answers
547 views
ok I have RadGrid implemented, it works great and I can see my data
I implemented a checkbox control on that grid

<telerik:GridTemplateColumn HeaderText="Select"  UniqueName="AssetId">
    <ItemTemplate>
        <asp:CheckBox ID="CheckBox1" runat="server" />
    </ItemTemplate>
</telerik:GridTemplateColumn>


Now I have a button on the page, under its click event I want to read all the rows which are checked
I am doing something similar but its not working.
I am unable to check the checkbox is checked or not.

   protected void UpdateButton_Click(object sender, EventArgs e)
    {
    for (int i = 0; i < RadGrid1.MasterTableView.Items.Count; i++)
            {
                bool isChecked = ((CheckBox)RadGrid1.MasterTableView.FindControl("CheckBox1")).Checked;
 
                if (isChecked)
                {
                    Label lbl = ((Label)RadGrid1.FindControl("lblRadItemId")) as Label;
                    LabelValue = ((Label)RadGrid1.Rows[i].Cells[8].FindControl("lblRadItemId")).Text;
                }
 
}




Shinu
Top achievements
Rank 2
 answered on 30 Mar 2011
3 answers
61 views
dear all,
    I bind my radgrid with Need DataSource in code behind. I want to edit my radgrid when double click the grid row , I want one of the page appear with rowid. can? help me please.?
kham
Top achievements
Rank 1
 answered on 30 Mar 2011
2 answers
123 views
Hi;
I have a table that it is structured as self Referencing with ID and Parent ID. Can RADTreeView display this structure? If yes, any sample to see?

Thanks!
..Ben
Ben Hayat
Top achievements
Rank 2
 answered on 30 Mar 2011
3 answers
142 views
Hello,

For a ComboBox like this:

<telerik:RadComboBox ID="Persons" runat="server" DataTextField="Name" DataValueField="Id" MarkFirstMatch="true" AppendDataBoundItems="true">
    <Items>
        <telerik:RadComboBoxItem runat="server" Value="0" Text="" />
    </Items>
</telerik:RadComboBox>

When I select an item then click somewhere else, the combobox seems to reset or clear the selection. This is happening with various comboboxes on my page.

How can I get the selected item to stay where it should? There is no postback or anything. This happens on the client side and the control binds with data with no issue.

Richard
Richard Weeks
Top achievements
Rank 2
 answered on 29 Mar 2011
1 answer
153 views
I have a telerik radgrid with paging enabled and attaching the oncommand client event messes up paging.
Without the oncommand event, I am able to click on page numbers on the pager and it properly shows the selected page number text in bold.
But if I attach a oncommand event, it does not highlight the selected page number at all. And all the page numbers remain as hyperlinks including the selected page. Here is the sample code to reproduce this issue. Can some one please let me know if there is a fix ? I need to be able to trap the commands and cancel them if possible before postback happens to the server. And pagination is very critical for me as well. I tried to attach the oncommand event handler in the server side code(on page load event) but it doesnt help.

<telerik:RadCodeBlock ID="RadCodeBlock2" runat="server">
  <script type="text/javascript">
      function onInqGridCmd(sender, eventArgs) {
      }
   </script>
</telerik:RadCodeBlock>   
 
<telerik:RadGrid ID="RadGrid1" DataSourceID="SqlDataSource1" EnableEmbeddedSkins="true" Skin="Gray" AllowSorting="True"
    AllowPaging="True" PageSize="5" runat="server" GridLines="None" Width="100%">
    <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
    <ClientSettings>
        <Scrolling AllowScroll="true" SaveScrollPosition="true" UseStaticHeaders="true"   />
        <ClientEvents  OnCommand="onInqGridCmd"></ClientEvents>
    </ClientSettings>
     
</telerik:RadGrid>
 
<asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
    ProviderName="System.Data.SqlClient" SelectCommand="SELECT CustomerID, CompanyName, ContactName, ContactTitle, Address, PostalCode FROM              Customers" runat="server"></asp:SqlDataSource>

Appreciate your help.
Daniel
Telerik team
 answered on 29 Mar 2011
4 answers
184 views
Hi all,

I have a custom command created like so:

DockCommand settingsCommand = new DockCommand();
settingsCommand.Name = "Local Settings";
settingsCommand.Text = "Local Settings";
settingsCommand.CssClass = "LocalSettings";
settingsCommand.AutoPostBack = false;
settingsCommand.OnClientCommand = "ShowLocalSettings";
Commands.Add(settingsCommand);

function ShowLocalSettings(sender, eventArgs) {
    radDock = sender;
    var oWindow = window.radopen(null, "LocalSettingsWindow");
    oWindow.center();
}


The RadWindow appears fine and everything works as expected, but, in the background I can see my page refreshing when I click the custom command button -- even though autopostback is set to false. My RadWindow doesn't flash, and it's modal so the background can't be interacted with, but it is still distracting to see it refreshing once when my RadWindow is already displayed.

Any ideas on why this would be happening?

Sean
Top achievements
Rank 2
 answered on 29 Mar 2011
2 answers
62 views
Hello,

I am creating raddocs dynamically. I do have dynamic radzones. Also I wish to create raddocs with varible height dynamically. Its height should get varied as per the contents inside it.

If I do not set the height of raddoc while creating it dynamically then it set to some default value and displayes scrollbar.

Prayag
prayag ganoje
Top achievements
Rank 1
 answered on 29 Mar 2011
2 answers
105 views
Hallo community, I want to integrate mails into my webapplikation (like the demo). What mailserver is best to do this? Thank you!
Bernhard Rosenfelder
Top achievements
Rank 1
 answered on 29 Mar 2011
1 answer
97 views
Hi,

I have never posted before, I hope this is the correct place. My markup is below. When I click the edit button on a row and make a change in the Edit form, no update events are raised on the datasource . I have copied the sample several times from the website but I still cannot get my events wired up properly. I am using WCSF and am quite familiar with this framework. The datasource seems to work fine if I use an asp.net GridView. Any help would be appreciated.
Thanks

    <pp:ObjectContainerDataSource ID="ds1" runat="server" 
        DataObjectTypeName="Foo.Infrastructure.Interface.Object" 
        ondeleted="ds1_Deleted" UsingServerPaging="True" UsingServerSorting="True" 
        oninserted="ds1_Inserted" onselecting="ds1_Selecting" onupdated="ds1_Updated" />
    <telerik:RadGrid 
        ID="grid" runat="server" GridLines="None" AutoGenerateColumns="False"
        AllowAutomaticInserts="True"
        AllowAutomaticUpdates="True"
         PageSize="100" AllowPaging="True" AllowSorting="True"
        Width="100%" 
        AutoGenerateEditColumn="True" CellSpacing="0" DataSourceID="ds1">
        <MasterTableView CommandItemDisplay="Top" EditMode="EditForms" HorizontalAlign="NotSet"
            AllowAutomaticInserts="false" AllowAutomaticUpdates="true" InsertItemDisplay="Top"
            runat="server" DataSourceID="ds1">
            <Columns>
                <telerik:GridBoundColumn DataField="Id" HeaderText="Id" DataType="System.Int32" />
                <telerik:GridBoundColumn DataField="Name" HeaderText="Name" DataType="System.String" />
                <telerik:GridBoundColumn DataField="ApplicationDomain" HeaderText="Domain" DataType="System.String" />
                <telerik:GridBoundColumn DataField="DefaultTheme" HeaderText="Theme" DataType="System.String" />
                <telerik:GridBoundColumn DataField="DateCreated" HeaderText="Created" DataType="System.DateTime" DataFormatString="{0:MMM dd yyyy}" />
                <telerik:GridBoundColumn DataField="DateOnline" HeaderText="Online" DataType="System.DateTime" DataFormatString="{0:MMM dd yyyy}" />
                <telerik:GridBoundColumn DataField="DateOffline" HeaderText="Offline" DataType="System.DateTime" DataFormatString="{0:MMM dd yyyy}" />
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>
Ian
Top achievements
Rank 1
 answered on 29 Mar 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?