iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hello,Thank you for the reply.If you want to get the checked row and get row object from the child table, you should modify the code.I have a WebGrid page with hierarchical mode and checkbox column in child table.Like in the WebGrid page in my prior post, there is an ASP.Net button control to get the checked row.Here’s the snippet code to get the checked row in button click event:
protected void Button1_Click(object sender, EventArgs e){ ArrayList checkedRows = WebGrid1.RootTable.ChildTables.GetNamedItem("Orders").GetCheckedRows(); string text = "Checked rows: " + checkedRows.Count + "\n\n"; foreach (object keyValue in checkedRows) { text += WebGrid1.RootTable.ChildTables.GetNamedItem("Orders").Rows.GetRowByKeyValue(keyValue.ToString()).Cells[3].Value.ToString() + "\n"; } TextBox1.Text = text; }
To get the row object from child table, you should set the “RestoreExpandedChildRows” property, under “LayoutSettings” tag, to “True”.Please kindly have review on the attached page to see result. To run the page, you could add the page to the WebGrid Solution Samples.Hope this helps.Regards,Hans K.
Hello,Thank you for the question.I made a page that contains WebGrid with CellTemplate feature.I bind the WebGrid to access data source control (Northwind.mdb database & Customers table).I add an ASP button to the page to get the CellTemplate value.So I add a line of code to get the first row CellTemplate column (ContactName column).
protected void Button1_Click(object sender, EventArgs e){ Label3.Text = WebGrid1.RootTable.Rows[0].Cells[2].Value.ToString(); }
Please kindly have review on the sample to see the result.You also could download the sample from this link: http://1drv.ms/1qEvgRcThank you.Regards,Hans K.
I am sorry that I don't explain the problem clearly.
I want to batch update in serverside click event,but the condition is that when I select several rows by webgrid row checker,how can I get the selected rows celltemplate value at serverside click event.
I can only get the selected row key values by this: ArrayList selectList = wg_sys_function.GetTableByName("TSysFunction").GetCheckedRows();
But how can I get the selected row celltemplate value like radiobutton value.Thank you
Hello,I apologize for the late response.Since you can get the key value each checked row, you could use GetRowByKeyValue() WebGrid’s method.With this method you could get WebGridRow object, then you could get CellTemplate column value.I modify the attached sample that I provide to you in my prior post.I add one Checker column to the WebGrid and I modify the Button click event code.
protected void Button1_Click(object sender, EventArgs e){ ArrayList checkedRows = WebGrid1.RootTable.GetCheckedRows(); string text = "Checked rows: " + checkedRows.Count + "\n\n"; foreach (string keyValue in checkedRows) { text += WebGrid1.RootTable.Rows.GetRowByKeyValue(keyValue.ToString()).Cells[3].Value.ToString() + "\n"; } TextBox1.Text = text; }
Hope this helps.Thank you.Regards,Hans K.
I apologize for the late response.
I use your opinion but when the program run at the sentence like " WebGrid1.RootTable.Rows.GetRowByKeyValue(keyValue.ToString()).Cells[3].Value.ToString() ",it called error.The WebgridRow object is null.The GetRowByKeyValue returns the webgridrow object,but it is null,Now I find why the error occurs.My webgrid has parent datamember and child datamember.When I select the parent rows ,this sentence is OK,but the child rows is wrong.So how can I get the child rows by GetRowByKeyValue?
By the way,I found an error in using webgrid in the latest version.The environment is that the webgrid is hierachical,in the childtable,there is a calendarCombo column,it can't work to select date in HTML5 mode,so please check it and fix the error as soon as possible,thank you
I use your method and solve the problem.Deeply thanks for your help.
In my latest reply,I found an error using CalendarCombo In webgrid In HTML5 mode.It can only input the number but can't use the calendar control.So could you tell this bug to the research and develop team to fix it?Thank you
Hello,I’m glad to hear that you have resolved the get cell template value scenario.Regarding your CalendarCombo issue, since this issue was different with the first one, please kindly create a new thread for this issue.While creating the new thread, please kindly provide us more information regarding this CalendarCombo issue.For example, what is your webpage DOCTYPE?What is your WebGrid configuration? What is your current WebGrid assembly version?And if possible, could you provide the simple working sample regarding this issue.Thank you very much for your help.Regards,Hans K.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname