Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
832 views
Hi,

I'm not sure why can but I can't seem to retrieve the value of my DateKey which I've specified on my Grid.

Here is the markup where is specify the DataKeyNames="Id":
<telerik:RadGrid ID="grdCurrentNettpayDatails" runat="server" CellSpacing="0" GridLines="None"
                        AutoGenerateColumns="False" Skin="Windows7" AutoGenerateHierarchy="True" AllowPaging="True"
                        OnUpdateCommand="grdCurrentNettpayDetails_UpdateCommand" PageSize="15" OnNeedDataSource="grdDetails_NeedDataSource"
                        OnDetailTableDataBind="grdDetails_DetailTableDataBind">
                        <MasterTableView HierarchyDefaultExpanded="false" DataKeyNames="Id" NoDetailRecordsText="No payment records found.">

Not sure if this really matters, but I don't specify the DataSourceID on the grid. Instead I set the datasource and bind the grid as follows:
grdDatails.DataSource = myDataSet;
grdDatails.DataBind();

I also set up the detail table like this:
protected void grdDetails_DetailTableDataBind(object sender, GridDetailTableDataBindEventArgs e)
        {
            var proxy = new MySDomainServicesoapClient();
 
            var list= new List<Record>();
 
            foreach (GridDataItem dataItem in grdCurrentNettpay.MasterTableView.Items)
            {
                var checkBox = (dataItem.FindControl("CheckBox1") as CheckBox);
 
                if (checkBox != null && checkBox.Checked)
                {
                    var recordId = new Guid(dataItem["Id"].Text);
 
                    var record = proxy.GetRecrordsById(recordId).RootResults.SingleOrDefault();
 
                    list.Add(record);
                }
            }
 
            proxy.Close();
 
            var xmlDoc =
                XmlHelper.GetStructuredXmlForRecords(
                    list);
 
            var myDataSet= XmlHelper.GetHierarchicalDsFromXml(xmlDoc);
 
            string parentItemId = e.DetailTableView.ParentItem["Id"].Text;
 
            ((RadGrid)sender).DataSource = myDataSet.Tables[1].Select("RecordId= " + "'" + parentItemId + "'");
        }

Finally, I try to access the DataKey value ("Id") from the edit form on Update:
protected void grdDetails_UpdateCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
        {
            GridEditableItem gridEditFormItem = (GridEditableItem)e.Item;
 
            var id= new Guid(gridEditFormItem.GetDataKeyValue("Id").ToString()); // Give me null!
       }

Could it be due to how I bind the grid instread of specifying the DataSourceID on the grid? I'm not actually sure what else to try? I really appreciate your help.

Thanks
Jayesh Goyani
Top achievements
Rank 2
 answered on 14 Nov 2011
2 answers
79 views
I need to collect data from below webiste.  (date and closing price from table) .
their is execl option but i want to do it automatically. I have parser those run on daily basic and  collect data.
to collect data from that excel i need to save that excel  manually  on my local machine which is not the solution. :(

i right click on webpage and view source it but still it is not showing data which i want to collect.

How i will got it .. :(

http://www.nasdaqomxnordic.com/shares/Historical_prices/?Instrument=SSE4928

Is their any telerik control or something.. so i can read data from this lnk.
Mugdha Aditya
Top achievements
Rank 1
 answered on 14 Nov 2011
4 answers
192 views

I am using RadMenu & RadButton control in an application and I have customized the Radmenu with
www.stylebuilder.telerik.com
the problem is when radmenu child items are expand then another radmenu and radbutton is overlapped.

Please see the screenshot.

Md.Abdullah
Top achievements
Rank 1
 answered on 14 Nov 2011
2 answers
99 views
Hello

I am a Sharepoint developer working with Telerik 2010. I would like to know if there is any possibility to have space between the FilterMenu items such as EqualTo, EndsWith etc as Equal To, Ends With etc respectively.

Thanks in advance
Jiju John.
Jayesh Goyani
Top achievements
Rank 2
 answered on 14 Nov 2011
2 answers
69 views
Hello All,

My grid has skin windows7 and the grid has a lot of template columns. On selection of a row, the highlighted row has underline below the template column data due to Border-Bottom-Style: solid; I want to remove this style so that the underline disappears on selection of a row.


I applied the following style on the form with the grid to override the style but it doesn't work.. Can you please help me?

 .RadGrid_Windows7 .rgRow td, .RadGrid_Windows7 .rgAltRow td, .RadGrid_Windows7 .rgEditRow td, .RadGrid_Windows7 .rgFooter td
        {
            border-bottom-style: none;
            border-bottom-width:0px;
        }
Effat
Top achievements
Rank 1
 answered on 14 Nov 2011
5 answers
140 views
i have a RadEditor which contains text and image as its content,when exporting to word it displays onlt text but no image.suggest a solution for this issue
Rumen
Telerik team
 answered on 14 Nov 2011
3 answers
123 views
Hi Telerik,

we are using single radwindow to show 3 to 4 lookups. each time it loads new page for each popup.
my problem here is,
when we load a page which having heavy content like radcombobox having 1000 values in it, window loads and closes successfully,
but when we try to open new popup(it also using same radwindow to show another page) now problem begins old page content still in radwindow so obviously it taking too much time to respond and load.
even worse is when we press backspace it going to previous loading page.

i don't want previously loaded content it should destroy that entire page when user closes or we closed from server side.

please do need full, thank you in advance.
Marin Bratanov
Telerik team
 answered on 14 Nov 2011
3 answers
57 views
Hi:
I have 2 columns that are OADate type (per RadChart).  How do I format it in a data bound column?  The column appear as a #, and when I try to set the FormatString as a date then it throws an exception.
Phil
p.s. Telerik opened pandora's box in RadChart.
Iana Tsolova
Telerik team
 answered on 14 Nov 2011
3 answers
223 views
From the example in this link: http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/threelevel/defaultcs.aspx

Do the '?'s also apply for sqlDatasource updateCommand Parameters or only for sdsSessionDataSource parametersl? Im getting a ' use of undeclared scalar variable' error message if im passing the parameters prefixing them  with n '@' symbol. If i use ?, the error im getting is: Incorrect syntax near '?' 

Please advise
Sanele
Top achievements
Rank 1
 answered on 14 Nov 2011
7 answers
291 views
I have a RadComboBox in a PageView. When a user selects something from the combobox, I want to switch to a different PageView. However, I get the following error:

Microsoft JScript runtime error: Sys.ArgumentException: Value must not be null for Controls and Behaviors.
Parameter name: element


My AjaxManager is setup with the following AjaxSetting:

<telerik:AjaxSetting AjaxControlID="cboSchedules">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="tab" />
                    <telerik:AjaxUpdatedControl ControlID="mp" />
                </UpdatedControls>
            </telerik:AjaxSetting>
"mp" is the RadMultiPage. I think this is happening because the control that starts the Ajax request, which is "cboSchedules", is hidden the action of selecting an item.

First, am I right in this conclusion? Second, how do I get around it?
Dimitar Terziev
Telerik team
 answered on 14 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?