I am now so so so confused, I`v tried almost everything but my javascript isnt working. I also tried copying the code given for help, but no signs of any progress.
And after that i want the text to get from RadtextBox when one imagebutton is clicked out of two and some hiden columns values of that specific row to call my webservice, but all this at the client end. Please help me.
Can you provide me some code for it? Please....
Here`s my server side code for that above mentioned processes:
protected
void RadGrid_NoteBook_ItemCommand(object source, GridCommandEventArgs e)
{
if (e.CommandName == "Note") // when imageButton 'Note' is clicked
{
RadTextBox textBox = new RadTextBox();
foreach (GridItem item in RadGrid_NoteBook.MasterTableView.Items)
{
if (item.Edit)
{
GridEditFormItem editItem = (GridEditFormItem)RadGrid_NoteBook.MasterTableView.GetItems(GridItemType.EditFormItem)[item.ItemIndex];
textBox = (
RadTextBox)editItem.FindControl("NoteBook_NoteBackTextBox");
editItem.Edit =
false;
break;
}
}
GridDataItem gitem = (GridDataItem)e.Item;
Hashtable table = new Hashtable();
gitem.ExtractValues(table);
string temp_UserId = table["SenderUserId"].ToString(); // my hidden cloumn 'SenderUserId' value
Guid UserId = new Guid(temp_UserId);
string Username = table["SenderUsername"].ToString();
Guid SenderUserId = new Guid(Session["UserId"].ToString());
DataSetTableAdapters.
Queries query = new DataSetTableAdapters.Queries();
query.InsertNotes(Session[
"Username"].ToString(), SenderUserId, textBox.Text, DateTime.Now); // my query fo insertion in database
int NoteId = (int)query.GetNoteIdFromSenderUsernameAndSenderUserId(Session["Username"].ToString(), SenderUserId, textBox.Text, DateTime.Now);
query.InsertIntoUser_NoteBookFromNoteId(UserId, NoteId);
}
}