Lubna Ansari
Top achievements
Rank 1
Lubna Ansari
asked on 03 Mar 2010, 11:28 AM
Hi,
I am working with Rad gird Client-side Insert/Update/Delete. I'm referring the demo code.
I am working with Rad gird Client-side Insert/Update/Delete. I'm referring the demo code.
I'm getting a null vlaue error for args.get_gridDataItem() when i select a row
Here is your code
function
rowSelected(sender, args)
{
//controlID = args.getDataKeyValue("ControlID");
Id = getDataItemKeyValue(sender,args.get_gridDataItem());
currentRowIndex = args.get_gridDataItem().get_element().rowIndex;
$find(
"<%= RadTabStrip1.ClientID %>").set_selectedIndex(0);
GetControlByControlID(controlID, setValues)
}
Whts the problem??
4 Answers, 1 is accepted
0
Shinu
Top achievements
Rank 2
answered on 03 Mar 2010, 12:03 PM
Hello Lubna,
The get_gridDataItem() is not directly available on the client unless OnRowCreating/OnRowCreated events are hooked up. Try adding OnRowCreating/OnRowCreated events as shown below and see whether it works.
aspx:
javascript:
Regards,
Shinu.
The get_gridDataItem() is not directly available on the client unless OnRowCreating/OnRowCreated events are hooked up. Try adding OnRowCreating/OnRowCreated events as shown below and see whether it works.
aspx:
| </MasterTableView> |
| <ClientSettings> |
| <ClientEvents OnRowSelected="RowSelected" OnRowCreated="OnRowCreated" |
| OnRowCreating="OnRowCreating" /> |
| . . . |
javascript:
| function OnRowSelected(sender, eventArgs) { } |
| function OnRowSelecting(sender, eventArgs) { } |
| function RowSelected(sender, eventArgs) { |
| var item = eventArgs.get_gridDataItem(); |
| . . . |
| } |
Regards,
Shinu.
0
Lubna Ansari
Top achievements
Rank 1
answered on 03 Mar 2010, 12:23 PM
Thnxs Shinu
It worked
It worked
0
Lubna Ansari
Top achievements
Rank 1
answered on 03 Mar 2010, 02:39 PM
Hi,
I need to use Rad gird Client-side Insert/Update/Delete. In the demo code provided it is using webservice for all databse related operation. Can somebody send me the code with using simple database queries. I got stuck with
I need to use Rad gird Client-side Insert/Update/Delete. In the demo code provided it is using webservice for all databse related operation. Can somebody send me the code with using simple database queries. I got stuck with
HttpContext.
Current.Session["MyData"]
when doing without websrvices.
0
Accepted
Hi Lubna,
Attached is a small sample.
Regards,
Tsvetoslav
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Attached is a small sample.
Regards,
Tsvetoslav
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.